修复已知问题

This commit is contained in:
2023-08-28 15:07:37 +08:00
parent 0beec730e8
commit 7264d82019
38 changed files with 6035 additions and 790 deletions

View File

@ -0,0 +1,21 @@
package com.ailanyin.admin;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
/**
* @author ailanyin
* @version 1.0
* @since 2022/7/29 0029 上午 8:50
*/
public class Test {
public static void main(String[] args) {
DateTime begin = DateUtil.beginOfWeek(new Date());
DateTime end = DateUtil.endOfWeek(new Date());
System.out.println(begin.toString("yyyy-MM-dd"));
System.out.println(end.toString("yyyy-MM-dd"));
}
}

View File

@ -210,7 +210,7 @@ public class HxScientificProductionController {
@ApiOperation(value = "项目管理-型号信息") @ApiOperation(value = "项目管理-型号信息")
public AjaxResult getModelYearPlanPic() { public AjaxResult getModelYearPlanPic() {
HxModelYearPlan yearPlan = new HxModelYearPlan(); HxModelYearPlan yearPlan = new HxModelYearPlan();
yearPlan.setYear(DateUtil.getNowYear().toString()); yearPlan.setYear(DateUtil.getNowYear().toString()+"%");
return AjaxResult.success(hxModelYearPlanService.selectList(yearPlan)); return AjaxResult.success(hxModelYearPlanService.selectList(yearPlan));
} }

View File

@ -71,13 +71,13 @@ public class HxDangerousWorkServiceImpl implements HxDangerousWorkService {
private Map handleDate(String type) { private Map handleDate(String type) {
Map<String, Object> map = new HashMap(2); Map<String, Object> map = new HashMap(2);
if (WEEK.equals(type)) { if (WEEK.equals(type)) {
map.put("start", DateFormatUtils.format(DateUtil.getBeginDayOfWeek(), "yyyyMMdd")); map.put("start", DateFormatUtils.format(DateUtil.getBeginDayOfWeek(), "yyyy-MM-dd"));
map.put("end", DateFormatUtils.format(DateUtil.getEndDayOfWeek(), "yyyyMMdd")); map.put("end", DateFormatUtils.format(DateUtil.getEndDayOfWeek(), "yyyy-MM-dd"));
} }
if (MONTH.equals(type)) { if (MONTH.equals(type)) {
map.put("start", DateFormatUtils.format(DateUtil.getBeginDayOfMonth(), "yyyyMMdd")); map.put("start", DateFormatUtils.format(DateUtil.getBeginDayOfMonth(), "yyyy-MM-dd"));
map.put("end", DateFormatUtils.format(DateUtil.getEndDayOfMonth(), "yyyyMMdd")); map.put("end", DateFormatUtils.format(DateUtil.getEndDayOfMonth(), "yyyy-MM-dd"));
} }
return map; return map;

View File

@ -1,13 +1,17 @@
package com.ailanyin.admin.service.impl; package com.ailanyin.admin.service.impl;
import com.ailanyin.admin.service.HxDeptOperateIndexService; import com.ailanyin.admin.service.HxDeptOperateIndexService;
import com.ailanyin.admin.service.HxRevenueProfitService;
import com.ailanyin.common.utils.DateUtil; import com.ailanyin.common.utils.DateUtil;
import com.ailanyin.common.utils.EmptyUtil; import com.ailanyin.common.utils.EmptyUtil;
import com.ailanyin.mapper.HxDeptOperateIndexMapper; import com.ailanyin.mapper.HxDeptOperateIndexMapper;
import com.ailanyin.model.HxDeptOperateIndex; import com.ailanyin.model.HxDeptOperateIndex;
import com.ailanyin.model.HxRevenueProfit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -23,6 +27,8 @@ public class HxDeptOperateIndexServiceImpl implements HxDeptOperateIndexService
@Resource @Resource
private HxDeptOperateIndexMapper hxDeptOperateIndexMapper; private HxDeptOperateIndexMapper hxDeptOperateIndexMapper;
@Autowired
private HxRevenueProfitService hxRevenueProfitService;
// type=1全年/2=月度 // type=1全年/2=月度
private static String TYPE_1 = "1"; private static String TYPE_1 = "1";
private static String TYPE_2 = "2"; private static String TYPE_2 = "2";
@ -34,8 +40,10 @@ public class HxDeptOperateIndexServiceImpl implements HxDeptOperateIndexService
@Override @Override
public void importData(List<HxDeptOperateIndex> list) { public void importData(List<HxDeptOperateIndex> list) {
List<HxRevenueProfit> list1 = new ArrayList<>();
list.forEach(hxDeptOperateIndex -> { list.forEach(hxDeptOperateIndex -> {
if (EmptyUtil.isNotEmpty(hxDeptOperateIndex)) { if (EmptyUtil.isNotEmpty(hxDeptOperateIndex)) {
list1.add(handleHxRevenueProfit(hxDeptOperateIndex));
if (checkIsExist(hxDeptOperateIndex)) { if (checkIsExist(hxDeptOperateIndex)) {
hxDeptOperateIndexMapper.updateSelective(hxDeptOperateIndex); hxDeptOperateIndexMapper.updateSelective(hxDeptOperateIndex);
} else { } else {
@ -43,8 +51,25 @@ public class HxDeptOperateIndexServiceImpl implements HxDeptOperateIndexService
} }
} }
}); });
hxRevenueProfitService.importData(list1);
} }
private HxRevenueProfit handleHxRevenueProfit(HxDeptOperateIndex hxDeptOperateIndex) {
HxRevenueProfit profit = new HxRevenueProfit();
// =======================
profit.setForecastProfit(hxDeptOperateIndex.getForecastProfit());
profit.setTargetProfit(hxDeptOperateIndex.getTargetProfit());
profit.setCompletedProfit(hxDeptOperateIndex.getRealProfit());
// =======================
profit.setForecastRevenue(hxDeptOperateIndex.getForecastIncome());
profit.setTargetRevenue(hxDeptOperateIndex.getTargetIncome());
profit.setCompletedRevenue(hxDeptOperateIndex.getRealIncome());
// =======================
profit.setDeptName(hxDeptOperateIndex.getDeptName());
profit.setMonth(hxDeptOperateIndex.getMonth());
return profit;
}
@Override @Override
public Map getDeptOperateIndexPic(String type,String month) { public Map getDeptOperateIndexPic(String type,String month) {
Map returnMap = new HashMap(2); Map returnMap = new HashMap(2);

View File

@ -2,6 +2,7 @@ package com.ailanyin.admin.service.impl;
import com.ailanyin.admin.service.HxModelYearPlanService; import com.ailanyin.admin.service.HxModelYearPlanService;
import com.ailanyin.common.utils.BigDecimalUtil; import com.ailanyin.common.utils.BigDecimalUtil;
import com.ailanyin.common.utils.DateUtil;
import com.ailanyin.common.utils.EmptyUtil; import com.ailanyin.common.utils.EmptyUtil;
import com.ailanyin.mapper.HxModelYearPlanMapper; import com.ailanyin.mapper.HxModelYearPlanMapper;
import com.ailanyin.model.HxModelYearPlan; import com.ailanyin.model.HxModelYearPlan;
@ -24,7 +25,24 @@ public class HxModelYearPlanServiceImpl implements HxModelYearPlanService {
@Override @Override
public List<HxModelYearPlan> selectList(HxModelYearPlan hxModelYearPlan) { public List<HxModelYearPlan> selectList(HxModelYearPlan hxModelYearPlan) {
return hxModelYearPlanMapper.selectList(hxModelYearPlan); List<HxModelYearPlan> list = hxModelYearPlanMapper.select(hxModelYearPlan);
for (HxModelYearPlan plan : list) {
plan.setYear(DateUtil.getNowYear().toString());
String total = hxModelYearPlanMapper.selectTargetTotal(DateUtil.getNowYear().toString(), plan.getProductModel());
plan.setTargetCharge(total);
plan.setTargetDeliver(total);
try {
plan.setChargeRate(String.valueOf(BigDecimalUtil.div(plan.getRealCharge(), plan.getTargetCharge(), 2) * 100));
} catch (Exception e) {
plan.setChargeRate("0");
}
try {
plan.setDeliverRate(String.valueOf(BigDecimalUtil.div(plan.getRealDeliver(), plan.getTargetDeliver(), 2) * 100));
} catch (Exception e) {
plan.setDeliverRate("0");
}
}
return list;
} }
@Override @Override

View File

@ -24,7 +24,7 @@ public class HxMonthFactoryPlanServiceImpl implements HxMonthFactoryPlanService
@Override @Override
public List<HxMonthFactoryPlan> selectList(HxMonthFactoryPlan hxMonthFactoryPlan) { public List<HxMonthFactoryPlan> selectList(HxMonthFactoryPlan hxMonthFactoryPlan) {
return hxMonthFactoryPlanMapper.selectList(hxMonthFactoryPlan); return hxMonthFactoryPlanMapper.select(hxMonthFactoryPlan);
} }
@Override @Override

View File

@ -23,7 +23,30 @@ public class HxMonthPlanServiceImpl implements HxMonthPlanService {
@Override @Override
public List<HxMonthPlan> selectList(HxMonthPlan hxMonthPlan) { public List<HxMonthPlan> selectList(HxMonthPlan hxMonthPlan) {
return hxMonthPlanMapper.selectList(hxMonthPlan); List<HxMonthPlan> list = null;
if (hxMonthPlan.getMonth() != null) {
list = hxMonthPlanMapper.selectByMonth(hxMonthPlan);
} else {
list = hxMonthPlanMapper.selectAll(hxMonthPlan);
}
for (HxMonthPlan plan : list) {
try {
plan.setDeliverRate(String.valueOf(BigDecimalUtil.div(plan.getRealDeliver(), plan.getTargetDeliver(), 2) * 100));
} catch (Exception e) {
plan.setDeliverRate("0");
}
try {
plan.setChargeRate(String.valueOf(BigDecimalUtil.div(plan.getRealCharge(), plan.getTargetCharge(), 2) * 100));
} catch (Exception e) {
plan.setChargeRate("0");
}
try {
plan.setAssembleRate(String.valueOf(BigDecimalUtil.div(plan.getRealAssemble(), plan.getTargetAssemble(), 2) * 100));
} catch (Exception e) {
plan.setAssembleRate("0");
}
}
return list;
} }
@Override @Override

View File

@ -2,7 +2,9 @@ package com.ailanyin.admin.service.impl;
import com.ailanyin.admin.service.HxProductCompletionOverviewService; import com.ailanyin.admin.service.HxProductCompletionOverviewService;
import com.ailanyin.common.utils.BigDecimalUtil; import com.ailanyin.common.utils.BigDecimalUtil;
import com.ailanyin.common.utils.DateUtil;
import com.ailanyin.common.utils.EmptyUtil; import com.ailanyin.common.utils.EmptyUtil;
import com.ailanyin.mapper.HxModelYearPlanMapper;
import com.ailanyin.mapper.HxProductCompletionOverviewMapper; import com.ailanyin.mapper.HxProductCompletionOverviewMapper;
import com.ailanyin.model.HxProductCompletionOverview; import com.ailanyin.model.HxProductCompletionOverview;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -22,7 +24,8 @@ public class HxProductCompletionOverviewServiceImpl implements HxProductCompleti
@Resource @Resource
private HxProductCompletionOverviewMapper completionOverviewMapper; private HxProductCompletionOverviewMapper completionOverviewMapper;
@Resource
private HxModelYearPlanMapper hxModelYearPlanMapper;
/** /**
* 红峡交付产品完成概况列表 * 红峡交付产品完成概况列表
* *
@ -31,7 +34,17 @@ public class HxProductCompletionOverviewServiceImpl implements HxProductCompleti
*/ */
@Override @Override
public List<HxProductCompletionOverview> selectHxProductCompletionOverviewList(HxProductCompletionOverview completionOverview) { public List<HxProductCompletionOverview> selectHxProductCompletionOverviewList(HxProductCompletionOverview completionOverview) {
return completionOverviewMapper.selectHxProductCompletionOverviewList(completionOverview); List<HxProductCompletionOverview> list = completionOverviewMapper.selectList(completionOverview);
for (HxProductCompletionOverview overview : list) {
try {
String total = hxModelYearPlanMapper.selectTargetTotal(overview.getMonth().substring(0,4), overview.getProductName());
overview.setTargetDeliveryQuantity(total);
overview.setCompletionRate(String.valueOf(BigDecimalUtil.div(overview.getActualDeliveryQuantity(),total,2) * 100));
} catch (Exception e) {
overview.setCompletionRate("0");
}
}
return list;
} }
/** /**

View File

@ -4,6 +4,7 @@ import com.ailanyin.admin.service.HxProductionResponsibilityService;
import com.ailanyin.common.utils.BigDecimalUtil; import com.ailanyin.common.utils.BigDecimalUtil;
import com.ailanyin.common.utils.DateUtil; import com.ailanyin.common.utils.DateUtil;
import com.ailanyin.common.utils.EmptyUtil; import com.ailanyin.common.utils.EmptyUtil;
import com.ailanyin.mapper.HxModelYearPlanMapper;
import com.ailanyin.mapper.HxProductionResponsibilityMapper; import com.ailanyin.mapper.HxProductionResponsibilityMapper;
import com.ailanyin.model.HxProductionResponsibility; import com.ailanyin.model.HxProductionResponsibility;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -47,14 +48,28 @@ public class HxProductionResponsibilityServiceImpl implements HxProductionRespon
list.forEach(this::handleData); list.forEach(this::handleData);
} }
@Resource
private HxModelYearPlanMapper hxModelYearPlanMapper;
@Override @Override
public Map getPic() { public Map getPic() {
String year = DateUtil.getNowYear() + "-%";
String year = DateUtil.getNowYear().toString();
List<Map> mapList = responsibilityMapper.getCategoryAndTotal(year + "-%");
for (Map map : mapList) {
String model = map.get("translateName").toString();
String completedTotal = map.get("completedTaskNumber").toString();
String total = hxModelYearPlanMapper.selectTargetTotal(year, model);
try {
map.put("completionRate",BigDecimalUtil.div(completedTotal,total,2));
} catch (Exception e) {
map.put("completionRate","0");
}
}
Map map = new HashMap(2); Map map = new HashMap(2);
HxProductionResponsibility responsibility = new HxProductionResponsibility();
responsibility.setMonth(year); map.put("list",mapList);
map.put("list",selectHxProductionResponsibilityList(responsibility)); map.put("rate",responsibilityMapper.getRateByYear(year+"%"));
map.put("rate",responsibilityMapper.getRateByYear(year));
return map; return map;
} }

View File

@ -16,6 +16,7 @@ import javax.annotation.Resource;
import java.io.IOException; import java.io.IOException;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.util.Arrays;
import java.util.List; import java.util.List;
/** /**
@ -43,7 +44,11 @@ public class HxWorkHomeInfoServiceImpl implements HxWorkHomeInfoService {
public void importData(List<HxWorkHomeInfo> list) { public void importData(List<HxWorkHomeInfo> list) {
list.forEach(hxWorkHomeInfo -> { list.forEach(hxWorkHomeInfo -> {
if (EmptyUtil.isNotEmpty(hxWorkHomeInfo.getWorkHomeName())) { if (EmptyUtil.isNotEmpty(hxWorkHomeInfo.getWorkHomeName())) {
hxWorkHomeInfoMapper.insertSelective(hxWorkHomeInfo); if (checkIsExist(hxWorkHomeInfo)) {
hxWorkHomeInfoMapper.updateSelective(hxWorkHomeInfo);
} else {
hxWorkHomeInfoMapper.insertSelective(hxWorkHomeInfo);
}
handleRtmpToVideo(hxWorkHomeInfo); handleRtmpToVideo(hxWorkHomeInfo);
} }
}); });
@ -51,13 +56,18 @@ public class HxWorkHomeInfoServiceImpl implements HxWorkHomeInfoService {
@Override @Override
public List<HxWorkHomeInfo> getHxWorkHomePic() { public List<HxWorkHomeInfo> getHxWorkHomePic() {
List<HxWorkHomeInfo> list = selectList(new HxWorkHomeInfo()); HxWorkHomeInfo info = new HxWorkHomeInfo();
info.setWorkFlag("");
List<HxWorkHomeInfo> list = selectList(info);
list.forEach(hxWorkHomeInfo -> { list.forEach(hxWorkHomeInfo -> {
if (redisService.hasKey(database + ":rtmp:hxWorkHomeInfo" + hxWorkHomeInfo.getId())) { if (redisService.hasKey(database + ":rtmp:hxWorkHomeInfo" + hxWorkHomeInfo.getId())) {
String url = redisService.get(database + ":rtmp:hxWorkHomeInfo" + hxWorkHomeInfo.getId()).toString(); String url = redisService.get(database + ":rtmp:hxWorkHomeInfo" + hxWorkHomeInfo.getId()).toString();
hxWorkHomeInfo.setAvAddress(url); hxWorkHomeInfo.setAvAddress(url);
} }
hxWorkHomeInfo.setUserList(hxWorkHomeInfoMapper.getWorkshopAllUserByName(hxWorkHomeInfo.getWorkshop()));
if (hxWorkHomeInfo.getUsers() != null) {
hxWorkHomeInfo.setUserList(Arrays.asList(hxWorkHomeInfo.getUsers().split(",")));
}
}); });
return list; return list;
} }
@ -65,7 +75,7 @@ public class HxWorkHomeInfoServiceImpl implements HxWorkHomeInfoService {
@Override @Override
public void handleRtmpToVideo(HxWorkHomeInfo hxWorkHomeInfo) { public void handleRtmpToVideo(HxWorkHomeInfo hxWorkHomeInfo) {
if (EmptyUtil.isNotEmpty(hxWorkHomeInfo.getId()) && EmptyUtil.isNotEmpty(hxWorkHomeInfo.getAvAddress())) { if (EmptyUtil.isNotEmpty(hxWorkHomeInfo.getId()) && EmptyUtil.isNotEmpty(hxWorkHomeInfo.getAvAddress())) {
System.out.println("开始推: " +hxWorkHomeInfo.getWorkHomeName() +" 工房"); System.out.println("开始推: " + hxWorkHomeInfo.getWorkHomeName() + " 工房");
String[] cmd = new String[]{"sh", "-c", "nohup ffmpeg -re -i " + hxWorkHomeInfo.getAvAddress() + " -vcodec copy -acodec copy -f flv -y rtmp://127.0.0.1:1935/live/hxWorkHomeInfo" + hxWorkHomeInfo.getId() + " >/opt/null 2>&1 &"}; String[] cmd = new String[]{"sh", "-c", "nohup ffmpeg -re -i " + hxWorkHomeInfo.getAvAddress() + " -vcodec copy -acodec copy -f flv -y rtmp://127.0.0.1:1935/live/hxWorkHomeInfo" + hxWorkHomeInfo.getId() + " >/opt/null 2>&1 &"};
try { try {
Runtime.getRuntime().exec(cmd); Runtime.getRuntime().exec(cmd);
@ -74,7 +84,7 @@ public class HxWorkHomeInfoServiceImpl implements HxWorkHomeInfoService {
} }
try { try {
String url = "http://" + IpUtil.getLocalIp() + "/stream/live/hxWorkHomeInfo" + hxWorkHomeInfo.getId()+".flv"; String url = "http://" + IpUtil.getLocalIp() + "/stream/live/hxWorkHomeInfo" + hxWorkHomeInfo.getId() + ".flv";
redisService.set(database + ":rtmp:hxWorkHomeInfo" + hxWorkHomeInfo.getId(), url); redisService.set(database + ":rtmp:hxWorkHomeInfo" + hxWorkHomeInfo.getId(), url);
} catch (UnknownHostException e) { } catch (UnknownHostException e) {
e.printStackTrace(); e.printStackTrace();

View File

@ -25,7 +25,15 @@ public class HxYearDutyServiceImpl implements HxYearDutyService {
@Override @Override
public List<HxYearDuty> selectList(HxYearDuty hxYearDuty) { public List<HxYearDuty> selectList(HxYearDuty hxYearDuty) {
return hxYearDutyMapper.selectList(hxYearDuty); List<HxYearDuty> list = hxYearDutyMapper.selectList(hxYearDuty);
for (HxYearDuty duty : list) {
Integer total = hxYearDutyMapper.selectRealTotal(duty.getYear()+'%',duty.getProductModel());
if (total == null) {
total = 0;
}
duty.setRate(String.valueOf(BigDecimalUtil.div(Double.valueOf(total),Double.valueOf(duty.getTargetTotal()),2) * 100));
}
return list;
} }
@Override @Override

View File

@ -1,35 +0,0 @@
drop table "ROOT"."hx_production_plan";
CREATE TABLE "ROOT"."hx_production_plan"
(
"id" BIGINT IDENTITY(1, 1) NOT NULL,
"month" VARCHAR(255),
"product_model" VARCHAR(255),
"real_adiabat" VARCHAR(255),
"real_charge" VARCHAR(255),
"real_assembly" VARCHAR(255),
"real_deliver" VARCHAR(255),
"forecast_adiabat" VARCHAR(255),
"forecast_charge" VARCHAR(255),
"forecast_assembly" VARCHAR(255),
"forecast_deliver" VARCHAR(255),
"review" VARCHAR(255),
"settlement" VARCHAR(255),
"production_number" VARCHAR(255),
NOT CLUSTER PRIMARY KEY("id")) STORAGE(ON "AITEST", CLUSTERBTR) ;
COMMENT ON COLUMN "ROOT"."hx_production_plan"."forecast_adiabat" IS 'Ԥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_production_plan"."forecast_assembly" IS 'Ԥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ';
COMMENT ON COLUMN "ROOT"."hx_production_plan"."forecast_charge" IS 'Ԥ<EFBFBD><EFBFBD>װҩ';
COMMENT ON COLUMN "ROOT"."hx_production_plan"."forecast_deliver" IS 'Ԥ<EFBFBD><EFBFBD><EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_production_plan"."product_model" IS '<EFBFBD><EFBFBD>Ʒ<EFBFBD>ͺ<EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_production_plan"."production_number" IS '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_production_plan"."real_adiabat" IS 'ʵ<EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_production_plan"."real_assembly" IS 'ʵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ';
COMMENT ON COLUMN "ROOT"."hx_production_plan"."real_charge" IS 'ʵ<EFBFBD><EFBFBD>װҩ';
COMMENT ON COLUMN "ROOT"."hx_production_plan"."real_deliver" IS 'ʵ<EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_production_plan"."review" IS '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_production_plan"."settlement" IS '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
CREATE UNIQUE INDEX "INDEX356532075240600" ON "ROOT"."hx_production_plan"("id" ASC) STORAGE(ON "AITEST", CLUSTERBTR) ;

View File

@ -1,31 +0,0 @@
drop table "ROOT"."hx_reader_info";
CREATE TABLE "ROOT"."hx_reader_info"
(
"id" BIGINT NOT NULL,
"reader_name" VARCHAR(255),
"abscissa" INT,
"ordinate" INT,
"north_angle" INT,
"reader_ip" VARCHAR(255),
"reader_port" INT,
"record_distance" INT,
"create_time" TIMESTAMP(0),
NOT CLUSTER PRIMARY KEY("id")) STORAGE(ON "AITEST", CLUSTERBTR) ;
COMMENT ON TABLE "ROOT"."hx_reader_info" IS '读卡器';
COMMENT ON COLUMN "ROOT"."hx_reader_info"."abscissa" IS '横坐标';
COMMENT ON COLUMN "ROOT"."hx_reader_info"."create_time" IS '录入时间';
COMMENT ON COLUMN "ROOT"."hx_reader_info"."id" IS 'ID';
COMMENT ON COLUMN "ROOT"."hx_reader_info"."north_angle" IS '与正北夹角';
COMMENT ON COLUMN "ROOT"."hx_reader_info"."ordinate" IS '纵坐标';
COMMENT ON COLUMN "ROOT"."hx_reader_info"."reader_ip" IS '读卡器静态ip';
COMMENT ON COLUMN "ROOT"."hx_reader_info"."reader_name" IS '读卡器名称';
COMMENT ON COLUMN "ROOT"."hx_reader_info"."reader_port" IS '读卡器端口';
COMMENT ON COLUMN "ROOT"."hx_reader_info"."record_distance" IS '进出工房设置距离';
CREATE UNIQUE INDEX "INDEX6215806402700" ON "ROOT"."hx_reader_info"("id" ASC) STORAGE(ON "AITEST", CLUSTERBTR) ;

View File

@ -0,0 +1,21 @@
drop table "ROOT"."hx_responsibility_status";
CREATE TABLE "ROOT"."hx_responsibility_status"
(
"id" BIGINT IDENTITY(1, 1) NOT NULL,
"responsibility_content" VARCHAR(255),
"progress_status" VARCHAR(255),
"completion_status" VARCHAR(255),
"dept_name" VARCHAR(255),
"month" CHAR(30),
NOT CLUSTER PRIMARY KEY("id")) STORAGE(ON "AITEST", CLUSTERBTR) ;
COMMENT ON COLUMN "ROOT"."hx_responsibility_status"."completion_status" IS '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_responsibility_status"."dept_name" IS '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_responsibility_status"."month" IS '<EFBFBD>·<EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_responsibility_status"."progress_status" IS '<EFBFBD><EFBFBD>չ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_responsibility_status"."responsibility_content" IS '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
CREATE UNIQUE INDEX "INDEX8279916944200" ON "ROOT"."hx_responsibility_status"("id" ASC) STORAGE(ON "AITEST", CLUSTERBTR) ;

View File

@ -0,0 +1,14 @@
drop table if exists "ROOT"."hx_table";
CREATE TABLE "ROOT"."hx_table"
(
"name" VARCHAR(50),
"sql" TEXT,
"table" VARCHAR(50),
UNIQUE("name")) STORAGE(ON "AITEST", CLUSTERBTR) ;
COMMENT ON COLUMN "ROOT"."hx_table"."name" IS '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_table"."sql" IS 'ִ<EFBFBD>е<EFBFBD>sql';
COMMENT ON COLUMN "ROOT"."hx_table"."table" IS '<EFBFBD><EFBFBD>';

View File

@ -0,0 +1,20 @@
drop table if exists "ROOT"."hx_work_home_info";
CREATE TABLE "ROOT"."hx_work_home_info"
(
"id" BIGINT IDENTITY(1, 1) NOT NULL,
"work_home_name" VARCHAR(255),
"abscissa" VARCHAR(255),
"ordinate" VARCHAR(255),
"workshop" VARCHAR(255),
"job_content" VARCHAR(255),
"error_info" VARCHAR(255),
"av_address" VARCHAR(255),
"users" VARCHAR(1000),
"work_flag" VARCHAR(50),
NOT CLUSTER PRIMARY KEY("id")) STORAGE(ON "AITEST", CLUSTERBTR) ;
COMMENT ON COLUMN "ROOT"."hx_work_home_info"."work_home_name" IS '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
CREATE UNIQUE INDEX "INDEX555455965509700" ON "ROOT"."hx_work_home_info"("id" ASC) STORAGE(ON "AITEST", CLUSTERBTR) ;

View File

@ -1,8 +1,8 @@
package com.ailanyin.common.utils; package com.ailanyin.common.utils;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.lang.UUID; import cn.hutool.core.lang.UUID;
import com.ailanyin.common.exception.Asserts; import com.ailanyin.common.exception.Asserts;
import com.alibaba.fastjson.util.IOUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -91,8 +91,8 @@ public class FileUtil {
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
} finally { } finally {
IOUtils.close(os); IoUtil.close(os);
IOUtils.close(fis); IoUtil.close(fis);
} }
} }
@ -261,7 +261,7 @@ public class FileUtil {
String filePath = FileUtil.class.getProtectionDomain().getCodeSource().getLocation().getFile(); String filePath = FileUtil.class.getProtectionDomain().getCodeSource().getLocation().getFile();
String jarPath = filePath.split(".jar!")[0]; String jarPath = filePath.split(".jar!")[0];
jarPath = jarPath.split("file:")[1]; jarPath = jarPath.split("file:")[1];
return jarPath.substring(0,jarPath.lastIndexOf("/")); return jarPath.substring(0, jarPath.lastIndexOf("/"));
} catch (Exception e) { } catch (Exception e) {
File desc = new File("/opt/jar"); File desc = new File("/opt/jar");
if (!desc.exists()) { if (!desc.exists()) {

View File

@ -1,6 +1,8 @@
package com.ailanyin.mapper; package com.ailanyin.mapper;
import com.ailanyin.model.HxModelYearPlan; import com.ailanyin.model.HxModelYearPlan;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
@ -12,9 +14,12 @@ import java.util.List;
public interface HxModelYearPlanMapper { public interface HxModelYearPlanMapper {
int checkIsExist(HxModelYearPlan hxModelYearPlan); int checkIsExist(HxModelYearPlan hxModelYearPlan);
List<HxModelYearPlan> selectList(HxModelYearPlan hxModelYearPlan); List<HxModelYearPlan> select(HxModelYearPlan hxModelYearPlan);
void insertSelective(HxModelYearPlan hxModelYearPlan); void insertSelective(HxModelYearPlan hxModelYearPlan);
void updateSelective(HxModelYearPlan hxModelYearPlan); void updateSelective(HxModelYearPlan hxModelYearPlan);
String selectTargetTotal(@Param("year") String year,@Param("model") String productModel);
} }

View File

@ -1,6 +1,8 @@
package com.ailanyin.mapper; package com.ailanyin.mapper;
import com.ailanyin.model.HxMonthFactoryPlan; import com.ailanyin.model.HxMonthFactoryPlan;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
@ -9,8 +11,10 @@ import java.util.List;
* @version 1.0 * @version 1.0
* @since 2021/12/22 0022 下午 16:30 * @since 2021/12/22 0022 下午 16:30
*/ */
@Mapper
public interface HxMonthFactoryPlanMapper { public interface HxMonthFactoryPlanMapper {
List<HxMonthFactoryPlan> selectList(HxMonthFactoryPlan hxMonthFactoryPlan);
List<HxMonthFactoryPlan> select(HxMonthFactoryPlan hxMonthFactoryPlan);
void updateSelective(HxMonthFactoryPlan hxMonthFactoryPlan); void updateSelective(HxMonthFactoryPlan hxMonthFactoryPlan);

View File

@ -1,6 +1,7 @@
package com.ailanyin.mapper; package com.ailanyin.mapper;
import com.ailanyin.model.HxMonthPlan; import com.ailanyin.model.HxMonthPlan;
import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
@ -17,4 +18,25 @@ public interface HxMonthPlanMapper {
void updateSelective(HxMonthPlan hxMonthPlan); void updateSelective(HxMonthPlan hxMonthPlan);
void insertSelective(HxMonthPlan hxMonthPlan); void insertSelective(HxMonthPlan hxMonthPlan);
@Select("select \"month\", \"product_model\" as \"model\",\"ascription\",\n" +
"\"real_deliver\" as \"realDeliver\",\n" +
"\"real_assembly\" as \"realAssemble\",\n" +
"\"real_charge\" as \"realCharge\",\n" +
"\"forecast_deliver\" as \"targetDeliver\",\n" +
"\"forecast_assembly\" as \"targetAssemble\",\n" +
"\"forecast_charge\" as \"targetCharge\"\n" +
"from ROOT.\"hx_production_plan\"\n" +
"where \"month\" = #{month}")
List<HxMonthPlan> selectByMonth(HxMonthPlan hxMonthPlan);
@Select("select \"month\", \"product_model\" as \"model\",\"ascription\",\n" +
"\"real_deliver\" as \"realDeliver\",\n" +
"\"real_assembly\" as \"realAssemble\",\n" +
"\"real_charge\" as \"realCharge\",\n" +
"\"forecast_deliver\" as \"targetDeliver\",\n" +
"\"forecast_assembly\" as \"targetAssemble\",\n" +
"\"forecast_charge\" as \"targetCharge\"\n" +
"from ROOT.\"hx_production_plan\"")
List<HxMonthPlan> selectAll(HxMonthPlan hxMonthPlan);
} }

View File

@ -2,6 +2,7 @@ package com.ailanyin.mapper;
import com.ailanyin.model.HxProductCompletionOverview; import com.ailanyin.model.HxProductCompletionOverview;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
@ -49,4 +50,6 @@ public interface HxProductCompletionOverviewMapper {
* @param id id * @param id id
*/ */
void delHxProductCompletionOverviewById(Long id); void delHxProductCompletionOverviewById(Long id);
List<HxProductCompletionOverview> selectList(HxProductCompletionOverview completionOverview);
} }

View File

@ -3,6 +3,7 @@ package com.ailanyin.mapper;
import com.ailanyin.model.HxProductionResponsibility; import com.ailanyin.model.HxProductionResponsibility;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -47,4 +48,10 @@ public interface HxProductionResponsibilityMapper {
void insertSelective(HxProductionResponsibility productionResponsibility); void insertSelective(HxProductionResponsibility productionResponsibility);
Map getRateByYear(String year); Map getRateByYear(String year);
@Select("select \"translate_name\" as \"translateName\",sum(\"completed_task_number\") as \"completedTaskNumber\"\n" +
"from ROOT.\"hx_production_responsibility\"\n" +
"where \"month\" like #{year}\n" +
"group by \"translate_name\"")
List<Map> getCategoryAndTotal(String year);
} }

View File

@ -1,6 +1,9 @@
package com.ailanyin.mapper; package com.ailanyin.mapper;
import com.ailanyin.model.HxYearDuty; import com.ailanyin.model.HxYearDuty;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
@ -9,6 +12,7 @@ import java.util.List;
* @version 1.0 * @version 1.0
* @since 2021/12/22 0022 下午 14:40 * @since 2021/12/22 0022 下午 14:40
*/ */
@Mapper
public interface HxYearDutyMapper { public interface HxYearDutyMapper {
int checkIsExist(HxYearDuty hxYearDuty); int checkIsExist(HxYearDuty hxYearDuty);
@ -17,4 +21,7 @@ public interface HxYearDutyMapper {
void updateSelective(HxYearDuty hxYearDuty); void updateSelective(HxYearDuty hxYearDuty);
void insertSelective(HxYearDuty hxYearDuty); void insertSelective(HxYearDuty hxYearDuty);
@Select("select sum(\"assembly\") from ROOT.\"actual_production_base\" where \"month\" like #{year} and \"model\" = #{model}")
Integer selectRealTotal(@Param("year") String year, @Param("model") String model);
} }

View File

@ -28,24 +28,27 @@ public class HxProductionPlan implements Serializable {
@ApiModelProperty(value = "绝热数量") @ApiModelProperty(value = "绝热数量")
@Excel(name = "实际绝热数量", width = 20) @Excel(name = "实际绝热数量", width = 20)
private String realAdiabat; private String realAdiabat;
@Excel(name = "预测绝热数量", width = 20)
private String forecastAdiabat;
@ApiModelProperty(value = "装药数量")
@Excel(name = "实际装药数量", width = 20) @Excel(name = "实际装药数量", width = 20)
private String realCharge; private String realCharge;
@Excel(name = "实际总装数量", width = 20)
private String realAssembly;
@Excel(name = "实际交付数量", width = 20)
private String realDeliver;
@ApiModelProperty(value = "装药数量")
@Excel(name = "预测绝热数量", width = 20)
private String forecastAdiabat;
@Excel(name = "预测装药数量", width = 20) @Excel(name = "预测装药数量", width = 20)
private String forecastCharge; private String forecastCharge;
@ApiModelProperty(value = "总装数量") @ApiModelProperty(value = "总装数量")
@Excel(name = "实际总装数量", width = 20)
private String realAssembly;
@Excel(name = "预测总装数量", width = 20) @Excel(name = "预测总装数量", width = 20)
private String forecastAssembly; private String forecastAssembly;
@ApiModelProperty(value = "交付数量") @ApiModelProperty(value = "交付数量")
@Excel(name = "实际交付数量", width = 20)
private String realDeliver;
@Excel(name = "预测交付数量", width = 20) @Excel(name = "预测交付数量", width = 20)
private String forecastDeliver; private String forecastDeliver;
@ -61,5 +64,9 @@ public class HxProductionPlan implements Serializable {
@Excel(name = "生产数量", width = 20) @Excel(name = "生产数量", width = 20)
private String productionNumber; private String productionNumber;
@ApiModelProperty(value = "计划归属")
@Excel(name = "计划归属", width = 20)
private String ascription;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -17,6 +17,10 @@ public class HxResponsibilityStatus implements Serializable {
private Long id; private Long id;
@ApiModelProperty(value = "月份")
@Excel(name = "月份", width = 20)
private String month;
@ApiModelProperty(value = "责任令内容") @ApiModelProperty(value = "责任令内容")
@Excel(name = "责任令内容", width = 20) @Excel(name = "责任令内容", width = 20)
private String responsibilityContent; private String responsibilityContent;

View File

@ -35,6 +35,10 @@ public class HxWorkHomeInfo implements Serializable {
@Excel(name = "车间名称", width = 20) @Excel(name = "车间名称", width = 20)
private String workshop; private String workshop;
@ApiModelProperty(value = "是否正在作业")
@Excel(name = "是否正在作业(是/否)", width = 25)
private String workFlag;
@ApiModelProperty(value = "作业内容") @ApiModelProperty(value = "作业内容")
@Excel(name = "作业内容", width = 20) @Excel(name = "作业内容", width = 20)
private String jobContent; private String jobContent;
@ -49,7 +53,11 @@ public class HxWorkHomeInfo implements Serializable {
private boolean flag = false; private boolean flag = false;
private List<Map> userList; @ApiModelProperty(value = "作业人员")
@Excel(name = "作业人员", width = 30)
private String users;
private List<String> userList;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -26,6 +26,18 @@
"id", "year", "product_model", "real_charge", "target_charge", "charge_rate", "real_deliver", "id", "year", "product_model", "real_charge", "target_charge", "charge_rate", "real_deliver",
"target_deliver", "deliver_rate" "target_deliver", "deliver_rate"
</sql> </sql>
<select id="select" resultMap="BaseResultMap">
select "product_model" as "productModel",
sum("real_charge") as "realCharge",
sum("real_deliver") as "realDeliver"
from ROOT."hx_production_plan"
where "month" LIKE #{year}
group BY "hx_production_plan"."product_model"
</select>
<select id="selectTargetTotal" resultType="string">
select sum("total") from ROOT."production_responsibility_base" where "year" = #{year} and "model" = #{model}
</select>
<select id="selectList" resultMap="BaseResultMap"> <select id="selectList" resultMap="BaseResultMap">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated

View File

@ -30,6 +30,19 @@
"real_assemble", "target_assemble", "bad_reason", "insulate_rate", "charge_rate", "real_assemble", "target_assemble", "bad_reason", "insulate_rate", "charge_rate",
"assemble_rate" "assemble_rate"
</sql> </sql>
<select id="select" resultMap="BaseResultMap">
select "month",
sum("real_adiabat") as "realInsulate",
sum("real_assembly") as "realAssemble",
sum("real_charge") as "realCharge",
sum("forecast_adiabat") as "targetInsulate",
sum("forecast_assembly") as "targetAssemble",
sum("forecast_charge") as "targetCharge"
from ROOT."hx_production_plan"
where "ascription" = '厂计划' and "month" = #{month}
group BY "month"
</select>
<select id="selectList" resultMap="BaseResultMap"> <select id="selectList" resultMap="BaseResultMap">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated

View File

@ -14,6 +14,10 @@
"id", "product_name", "actual_delivery_quantity", "target_delivery_quantity", "completion_rate","month", "id", "product_name", "actual_delivery_quantity", "target_delivery_quantity", "completion_rate","month",
"create_time" "create_time"
</sql> </sql>
<select id="selectList" resultMap="BaseResultMap">
select "month","model" as "productName","deliver" as "actualDeliveryQuantity" from ROOT."actual_production_base"
</select>
<select id="selectHxProductCompletionOverviewList" resultMap="BaseResultMap"> <select id="selectHxProductCompletionOverviewList" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />

View File

@ -21,6 +21,7 @@
<result column="forecast_deliver" jdbcType="VARCHAR" property="forecastDeliver" /> <result column="forecast_deliver" jdbcType="VARCHAR" property="forecastDeliver" />
<result column="review" jdbcType="VARCHAR" property="review" /> <result column="review" jdbcType="VARCHAR" property="review" />
<result column="settlement" jdbcType="VARCHAR" property="settlement" /> <result column="settlement" jdbcType="VARCHAR" property="settlement" />
<result column="ascription" jdbcType="VARCHAR" property="ascription" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!-- <!--
@ -41,7 +42,8 @@
"real_deliver", "real_deliver",
"forecast_deliver", "forecast_deliver",
"review", "review",
"settlement" "settlement",
"ascription"
</sql> </sql>
<select id="selectList" resultMap="BaseResultMap"> <select id="selectList" resultMap="BaseResultMap">
<!-- <!--
@ -132,6 +134,9 @@
<if test="settlement != null"> <if test="settlement != null">
"settlement", "settlement",
</if> </if>
<if test="ascription != null">
"ascription",
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -176,6 +181,9 @@
<if test="settlement != null"> <if test="settlement != null">
#{settlement,jdbcType=VARCHAR}, #{settlement,jdbcType=VARCHAR},
</if> </if>
<if test="ascription != null">
#{ascription,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateSelective" parameterType="com.ailanyin.model.HxProductionPlan"> <update id="updateSelective" parameterType="com.ailanyin.model.HxProductionPlan">
@ -219,6 +227,9 @@
<if test="settlement != null"> <if test="settlement != null">
"settlement" = #{settlement,jdbcType=VARCHAR}, "settlement" = #{settlement,jdbcType=VARCHAR},
</if> </if>
<if test="ascription != null">
"ascription" = #{ascription,jdbcType=VARCHAR},
</if>
</set> </set>
where "month" = #{month,jdbcType=VARCHAR} and "product_model" = #{productModel,jdbcType=VARCHAR} where "month" = #{month,jdbcType=VARCHAR} and "product_model" = #{productModel,jdbcType=VARCHAR}
</update> </update>

View File

@ -130,7 +130,7 @@
<select id="selectGeneralFactory" resultType="map"> <select id="selectGeneralFactory" resultType="map">
select "month",sum("plan_number") as "total",sum("complete_number") as "completed", select "month",sum("plan_number") as "total",sum("complete_number") as "completed",
sum("complete_number")/sum("plan_number") as "rate" sum("complete_number")/sum("plan_number")*100 as "rate"
from ROOT."hx_quality_plan" from ROOT."hx_quality_plan"
group BY "month" group BY "month"
order by "month" ASC order by "month" ASC
@ -138,7 +138,7 @@
<select id="selectDept" resultType="map"> <select id="selectDept" resultType="map">
select "dept_name" as "deptName",sum("plan_number") as "total",sum("complete_number") as "completed", select "dept_name" as "deptName",sum("plan_number") as "total",sum("complete_number") as "completed",
sum("complete_number")/sum("plan_number") as "rate" sum("complete_number")/sum("plan_number")*100 as "rate"
from ROOT."hx_quality_plan" from ROOT."hx_quality_plan"
group BY "dept_name" group BY "dept_name"
</select> </select>

View File

@ -12,6 +12,7 @@
<result column="progress_status" jdbcType="VARCHAR" property="progressStatus" /> <result column="progress_status" jdbcType="VARCHAR" property="progressStatus" />
<result column="completion_status" jdbcType="VARCHAR" property="completionStatus" /> <result column="completion_status" jdbcType="VARCHAR" property="completionStatus" />
<result column="dept_name" jdbcType="VARCHAR" property="deptName" /> <result column="dept_name" jdbcType="VARCHAR" property="deptName" />
<result column="month" jdbcType="VARCHAR" property="month" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!-- <!--
@ -19,7 +20,7 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Dec 14 02:43:38 UTC 2021. This element was generated on Tue Dec 14 02:43:38 UTC 2021.
--> -->
"id", "responsibility_content", "progress_status", "completion_status", "dept_name" "id", "responsibility_content", "progress_status", "completion_status", "dept_name","month"
</sql> </sql>
<select id="selectHxResponsibilityStatusList" resultMap="BaseResultMap"> <select id="selectHxResponsibilityStatusList" resultMap="BaseResultMap">
select select
@ -69,6 +70,9 @@
<if test="deptName != null"> <if test="deptName != null">
"dept_name", "dept_name",
</if> </if>
<if test="month != null">
"month",
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -86,6 +90,9 @@
<if test="deptName != null"> <if test="deptName != null">
#{deptName,jdbcType=VARCHAR}, #{deptName,jdbcType=VARCHAR},
</if> </if>
<if test="month != null">
#{month,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateSelective" parameterType="com.ailanyin.model.HxResponsibilityStatus"> <update id="updateSelective" parameterType="com.ailanyin.model.HxResponsibilityStatus">
@ -94,7 +101,7 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Dec 14 02:43:38 UTC 2021. This element was generated on Tue Dec 14 02:43:38 UTC 2021.
--> -->
update "hx_responsibility_status" update ROOT."hx_responsibility_status"
<set> <set>
<if test="progressStatus != null"> <if test="progressStatus != null">
"progress_status" = #{progressStatus,jdbcType=VARCHAR}, "progress_status" = #{progressStatus,jdbcType=VARCHAR},
@ -103,7 +110,7 @@
"completion_status" = #{completionStatus,jdbcType=VARCHAR}, "completion_status" = #{completionStatus,jdbcType=VARCHAR},
</if> </if>
</set> </set>
where "dept_name" = #{deptName} and "responsibility_content" = #{responsibilityContent} where "dept_name" = #{deptName} and "responsibility_content" = #{responsibilityContent} and "month" = #{month}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.ailanyin.model.HxResponsibilityStatus"> <update id="updateByPrimaryKey" parameterType="com.ailanyin.model.HxResponsibilityStatus">
<!-- <!--
@ -120,14 +127,13 @@
</update> </update>
<select id="getTotalAndRate" resultType="map"> <select id="getTotalAndRate" resultType="map">
select count("id") as "total",convert(float,(select count("id") select count("id") as "total",convert(float,(count("id"))/convert(float,(select count(1) from ROOT."hx_responsibility_status"))) * 100 as "rate"
from ROOT."hx_responsibility_status" where "completion_status" = '已完成'))/convert(float,count("id")) * 100 as "rate" from ROOT."hx_responsibility_status" where "completion_status" = '已完成'
from ROOT."hx_responsibility_status"
</select> </select>
<select id="checkIsExist" resultType="int"> <select id="checkIsExist" resultType="int">
select count("id") from ROOT."hx_responsibility_status" select count("id") from ROOT."hx_responsibility_status"
where "dept_name" = #{deptName} and "responsibility_content" = #{responsibilityContent} where "dept_name" = #{deptName} and "responsibility_content" = #{responsibilityContent} and "month" = #{month}
limit 1 limit 1
</select> </select>
</mapper> </mapper>

View File

@ -15,6 +15,8 @@
<result column="job_content" jdbcType="VARCHAR" property="jobContent" /> <result column="job_content" jdbcType="VARCHAR" property="jobContent" />
<result column="error_info" jdbcType="VARCHAR" property="errorInfo" /> <result column="error_info" jdbcType="VARCHAR" property="errorInfo" />
<result column="av_address" jdbcType="VARCHAR" property="avAddress" /> <result column="av_address" jdbcType="VARCHAR" property="avAddress" />
<result column="users" jdbcType="VARCHAR" property="users" />
<result column="work_flag" jdbcType="VARCHAR" property="workFlag" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!-- <!--
@ -23,7 +25,7 @@
This element was generated on Thu Dec 23 10:21:10 UTC 2021. This element was generated on Thu Dec 23 10:21:10 UTC 2021.
--> -->
"id", "work_home_name", "abscissa", "ordinate", "workshop", "job_content", "error_info", "id", "work_home_name", "abscissa", "ordinate", "workshop", "job_content", "error_info",
"av_address" "av_address","work_flag","users"
</sql> </sql>
<select id="selectList" resultMap="BaseResultMap"> <select id="selectList" resultMap="BaseResultMap">
<!-- <!--
@ -99,6 +101,12 @@
<if test="avAddress != null"> <if test="avAddress != null">
"av_address", "av_address",
</if> </if>
<if test="users != null">
"users",
</if>
<if test="workFlag != null">
"work_flag",
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -125,6 +133,12 @@
<if test="avAddress != null"> <if test="avAddress != null">
#{avAddress,jdbcType=VARCHAR}, #{avAddress,jdbcType=VARCHAR},
</if> </if>
<if test="users != null">
#{users,jdbcType=VARCHAR},
</if>
<if test="workFlag != null">
#{workFlag,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateSelective" parameterType="com.ailanyin.model.HxWorkHomeInfo"> <update id="updateSelective" parameterType="com.ailanyin.model.HxWorkHomeInfo">
@ -156,6 +170,12 @@
<if test="avAddress != null"> <if test="avAddress != null">
"av_address" = #{avAddress,jdbcType=VARCHAR}, "av_address" = #{avAddress,jdbcType=VARCHAR},
</if> </if>
<if test="users != null">
"users" = #{users,jdbcType=VARCHAR},
</if>
<if test="workFlag != null">
"work_flag" = #{workFlag,jdbcType=VARCHAR},
</if>
</set> </set>
where "work_home_name" = #{workHomeName,jdbcType=VARCHAR} where "work_home_name" = #{workHomeName,jdbcType=VARCHAR}
</update> </update>

View File

@ -1,49 +0,0 @@
create or replace FUNCTION ROOT.FIND_IN_SET(piv_str1 varchar2, piv_str2 varchar2, p_sep varchar2 := ',')
RETURN NUMBER IS
l_idx number:=0; -- <20><><EFBFBD>ڼ<EFBFBD><DABC><EFBFBD>piv_str2<72>зָ<D0B7><D6B8><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
str varchar2(500); -- <20><><EFBFBD>ݷָ<DDB7><D6B8><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
piv_str varchar2(500) := piv_str2; -- <20><>piv_str2<72><32>ֵ<EFBFBD><D6B5>piv_str
res number:=0; -- <20><><EFBFBD>ؽ<EFBFBD><D8BD><EFBFBD>
res_place number:=0;-- ԭ<>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>е<EFBFBD>λ<EFBFBD><CEBB>
BEGIN
-- <20><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>null <20>򷵻<EFBFBD>0
IF piv_str2 IS NULL THEN
RETURN res;
END IF;
-- <20><><EFBFBD><EFBFBD>piv_str<74><72>û<EFBFBD>зָ<D0B7><D6B8><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD>ж<EFBFBD>piv_str1<72><31>piv_str<74>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD> res_place=1
IF instr(piv_str, p_sep, 1) = 0 THEN
IF piv_str = piv_str1 THEN
res_place:=1;
res:= res_place;
END IF;
ELSE
-- ѭ<><D1AD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD>ȡpiv_str
LOOP
l_idx := instr(piv_str,p_sep);
--
res_place := res_place + 1;
-- <20><>piv_str<74>л<EFBFBD><D0BB>зָ<D0B7><D6B8><EFBFBD>ʱ
IF l_idx > 0 THEN
-- <20><>ȡ<EFBFBD><C8A1>һ<EFBFBD><D2BB><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ֶ<EFBFBD>str
str:= substr(piv_str,1,l_idx-1);
-- <20>ж<EFBFBD> str <20><>piv_str1 <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD>ж<EFBFBD>
IF str = piv_str1 THEN
res:= res_place;
EXIT;
END IF;
piv_str := substr(piv_str,l_idx+length(p_sep));
ELSE
-- <20><><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>piv_str <20>в<EFBFBD><D0B2><EFBFBD><EFBFBD>ڷָ<DAB7><D6B8><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ж<EFBFBD>piv_str<74><72>piv_str1<72>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD> res=res_path
IF piv_str = piv_str1 THEN
res:= res_place;
END IF;
-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD>
EXIT;
END IF;
END LOOP;
-- <20><><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD>
END IF;
-- <20><><EFBFBD><EFBFBD>res
RETURN res;
END FIND_IN_SET;

File diff suppressed because one or more lines are too long

5666
doc/vis389.sql Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,6 +0,0 @@
1. 装一个mysql5.7
2. 执行ailanyin-boot-mysql5.7.sql到mysql5.7中
3. 装dm8
4. 用达梦数据迁移工具,将mysql迁移到dm8
5. 复制FIND_IN_SET.sql中的内容并运行
(将ROOT.FIND_IN_SET中的ROOT改成实际的)

View File

@ -60,7 +60,7 @@
<!-- knife4接口文档 --> <!-- knife4接口文档 -->
<knife4j.version>2.0.8</knife4j.version> <knife4j.version>2.0.8</knife4j.version>
<!-- 阿里json工具 --> <!-- 阿里json工具 -->
<fastjson.version>1.2.78</fastjson.version> <fastjson.version>2.0.4</fastjson.version>
<!-- office处理工具类 --> <!-- office处理工具类 -->
<easypoi.version>4.4.0</easypoi.version> <easypoi.version>4.4.0</easypoi.version>
<!-- knife4的依赖 --> <!-- knife4的依赖 -->