修复已知问题

This commit is contained in:
2022-05-17 17:59:26 +08:00
parent 12c7273f21
commit 0beec730e8
15 changed files with 209 additions and 61 deletions

View File

@ -55,6 +55,6 @@ public class HxDangerousPointController {
@ApiOperation(value = "导出模板")
//@PreAuthorize("hasAuthority('system:user:import')")
public AjaxResult importTemplate() throws Exception {
return AjaxResult.success(ExcelUtil.exportExcel(new ArrayList<>(), "危险点表", "危险点", HxDangerousPoint.class, "危险点"));
return AjaxResult.success(ExcelUtil.exportExcel(new ArrayList<>(), "危险点表(等级:Ⅰ级/Ⅱ级/Ⅲ级)", "危险点", HxDangerousPoint.class, "危险点"));
}
}

View File

@ -56,6 +56,6 @@ public class HxDangerousSourceController {
@ApiOperation(value = "导出模板")
//@PreAuthorize("hasAuthority('system:user:import')")
public AjaxResult importTemplate() throws Exception {
return AjaxResult.success(ExcelUtil.exportExcel(new ArrayList<>(), "危险源表", "危险源", HxDangerousSource.class, "危险源"));
return AjaxResult.success(ExcelUtil.exportExcel(new ArrayList<>(), "危险源表(等级:一级/二级/三级/四级)", "危险源", HxDangerousSource.class, "危险源"));
}
}

View File

@ -216,8 +216,8 @@ public class HxScientificProductionController {
@GetMapping("/getProductionPlanPic")
@ApiOperation(value = "项目管理-生产计划")
public AjaxResult getProductionPlanPic() {
return AjaxResult.success(hxProductionPlanService.getProductionPlanPic());
public AjaxResult getProductionPlanPic(@RequestParam(value = "month") String month) {
return AjaxResult.success(hxProductionPlanService.getProductionPlanPic(month));
}
@GetMapping("/getModelProductionStatisticPic")

View File

@ -15,7 +15,7 @@ public interface HxProductionPlanService {
void importData(List<HxProductionPlan> list);
Map getProductionPlanPic();
List<HxProductionPlan> getProductionPlanPic(String month);
List<Map> getModelProductionStatisticPic();
}

View File

@ -68,8 +68,13 @@ public class HxDangerousPointServiceImpl implements HxDangerousPointService {
public void importData(List<HxDangerousPoint> list) {
list.forEach(hxDangerousPoint -> {
if (EmptyUtil.isNotEmpty(hxDangerousPoint.getPointName())) {
hxDangerousPoint.setCreateTime(new Date());
hxDangerousPointMapper.insertSelective(hxDangerousPoint);
if (checkIsExist(hxDangerousPoint.getPointName())) {
hxDangerousPointMapper.updateStatus(hxDangerousPoint);
} else {
hxDangerousPoint.setCreateTime(new Date());
hxDangerousPointMapper.insertSelective(hxDangerousPoint);
}
handleRtmpToVideo(hxDangerousPoint);
}
});
@ -142,4 +147,8 @@ public class HxDangerousPointServiceImpl implements HxDangerousPointService {
}
}
}
private boolean checkIsExist(String name) {
return hxDangerousPointMapper.checkIsExist(name) > 0;
}
}

View File

@ -52,8 +52,13 @@ public class HxDangerousSourceServiceImpl implements HxDangerousSourceService {
public void importData(List<HxDangerousSource> list) {
list.forEach(hxDangerousSource -> {
if (EmptyUtil.isNotEmpty(hxDangerousSource.getSourceName())) {
hxDangerousSource.setCreateTime(new Date());
hxDangerousSourceMapper.insertSelective(hxDangerousSource);
if (checkIsExist(hxDangerousSource.getSourceName())) {
hxDangerousSourceMapper.updateStatus(hxDangerousSource);
} else {
hxDangerousSource.setCreateTime(new Date());
hxDangerousSourceMapper.insertSelective(hxDangerousSource);
}
}
});
}
@ -74,4 +79,8 @@ public class HxDangerousSourceServiceImpl implements HxDangerousSourceService {
returnMap.put("allLevel",hxDictMapper.selectNameListByParentId(sourceLevelParentId));
return returnMap;
}
private boolean checkIsExist(String name) {
return hxDangerousSourceMapper.checkIsExist(name) > 0;
}
}

View File

@ -45,8 +45,8 @@ public class HxProductionPlanServiceImpl implements HxProductionPlanService {
}
@Override
public Map getProductionPlanPic() {
Map returnMap = new HashMap(2);
public List<HxProductionPlan> getProductionPlanPic(String month) {
/* Map returnMap = new HashMap(2);
List<String> monthList = hxProductionPlanMapper.getAllMonth();
List<Map> mapList = new ArrayList<>();
monthList.forEach(month -> {
@ -59,7 +59,10 @@ public class HxProductionPlanServiceImpl implements HxProductionPlanService {
returnMap.put("allMonth",monthList);
returnMap.put("allModel",hxProductionPlanMapper.getAllModel());
returnMap.put("list",mapList);
return returnMap;
return returnMap;*/
HxProductionPlan hxProductionPlan = new HxProductionPlan();
hxProductionPlan.setMonth(month);
return hxProductionPlanMapper.selectList(hxProductionPlan);
}
@Override

View File

@ -0,0 +1,35 @@
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) ;