diff --git a/ailanyin-admin/src/main/java/com/ailanyin/admin/controller/HxDangerousPointController.java b/ailanyin-admin/src/main/java/com/ailanyin/admin/controller/HxDangerousPointController.java index 428eabc..abc3a3f 100644 --- a/ailanyin-admin/src/main/java/com/ailanyin/admin/controller/HxDangerousPointController.java +++ b/ailanyin-admin/src/main/java/com/ailanyin/admin/controller/HxDangerousPointController.java @@ -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, "危险点")); } } diff --git a/ailanyin-admin/src/main/java/com/ailanyin/admin/controller/HxDangerousSourceController.java b/ailanyin-admin/src/main/java/com/ailanyin/admin/controller/HxDangerousSourceController.java index b9b7484..dbf06ab 100644 --- a/ailanyin-admin/src/main/java/com/ailanyin/admin/controller/HxDangerousSourceController.java +++ b/ailanyin-admin/src/main/java/com/ailanyin/admin/controller/HxDangerousSourceController.java @@ -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, "危险源")); } } diff --git a/ailanyin-admin/src/main/java/com/ailanyin/admin/controller/HxScientificProductionController.java b/ailanyin-admin/src/main/java/com/ailanyin/admin/controller/HxScientificProductionController.java index 1936acc..07ed804 100644 --- a/ailanyin-admin/src/main/java/com/ailanyin/admin/controller/HxScientificProductionController.java +++ b/ailanyin-admin/src/main/java/com/ailanyin/admin/controller/HxScientificProductionController.java @@ -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") diff --git a/ailanyin-admin/src/main/java/com/ailanyin/admin/service/HxProductionPlanService.java b/ailanyin-admin/src/main/java/com/ailanyin/admin/service/HxProductionPlanService.java index e703e5f..0cb2048 100644 --- a/ailanyin-admin/src/main/java/com/ailanyin/admin/service/HxProductionPlanService.java +++ b/ailanyin-admin/src/main/java/com/ailanyin/admin/service/HxProductionPlanService.java @@ -15,7 +15,7 @@ public interface HxProductionPlanService { void importData(List list); - Map getProductionPlanPic(); + List getProductionPlanPic(String month); List getModelProductionStatisticPic(); } diff --git a/ailanyin-admin/src/main/java/com/ailanyin/admin/service/impl/HxDangerousPointServiceImpl.java b/ailanyin-admin/src/main/java/com/ailanyin/admin/service/impl/HxDangerousPointServiceImpl.java index 471a45f..417ac01 100644 --- a/ailanyin-admin/src/main/java/com/ailanyin/admin/service/impl/HxDangerousPointServiceImpl.java +++ b/ailanyin-admin/src/main/java/com/ailanyin/admin/service/impl/HxDangerousPointServiceImpl.java @@ -68,8 +68,13 @@ public class HxDangerousPointServiceImpl implements HxDangerousPointService { public void importData(List 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; + } } diff --git a/ailanyin-admin/src/main/java/com/ailanyin/admin/service/impl/HxDangerousSourceServiceImpl.java b/ailanyin-admin/src/main/java/com/ailanyin/admin/service/impl/HxDangerousSourceServiceImpl.java index ff4fef6..da4d311 100644 --- a/ailanyin-admin/src/main/java/com/ailanyin/admin/service/impl/HxDangerousSourceServiceImpl.java +++ b/ailanyin-admin/src/main/java/com/ailanyin/admin/service/impl/HxDangerousSourceServiceImpl.java @@ -52,8 +52,13 @@ public class HxDangerousSourceServiceImpl implements HxDangerousSourceService { public void importData(List 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; + } } diff --git a/ailanyin-admin/src/main/java/com/ailanyin/admin/service/impl/HxProductionPlanServiceImpl.java b/ailanyin-admin/src/main/java/com/ailanyin/admin/service/impl/HxProductionPlanServiceImpl.java index 941c977..d94a77d 100644 --- a/ailanyin-admin/src/main/java/com/ailanyin/admin/service/impl/HxProductionPlanServiceImpl.java +++ b/ailanyin-admin/src/main/java/com/ailanyin/admin/service/impl/HxProductionPlanServiceImpl.java @@ -45,8 +45,8 @@ public class HxProductionPlanServiceImpl implements HxProductionPlanService { } @Override - public Map getProductionPlanPic() { - Map returnMap = new HashMap(2); + public List getProductionPlanPic(String month) { +/* Map returnMap = new HashMap(2); List monthList = hxProductionPlanMapper.getAllMonth(); List 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 diff --git a/ailanyin-admin/src/main/resources/sql/hx_production_plan_0.sql b/ailanyin-admin/src/main/resources/sql/hx_production_plan_0.sql new file mode 100644 index 0000000..523624e --- /dev/null +++ b/ailanyin-admin/src/main/resources/sql/hx_production_plan_0.sql @@ -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 'Ԥ'; +COMMENT ON COLUMN "ROOT"."hx_production_plan"."forecast_assembly" IS 'Ԥװ'; +COMMENT ON COLUMN "ROOT"."hx_production_plan"."forecast_charge" IS 'Ԥװҩ'; +COMMENT ON COLUMN "ROOT"."hx_production_plan"."forecast_deliver" IS 'Ԥ⽻'; +COMMENT ON COLUMN "ROOT"."hx_production_plan"."product_model" IS 'Ʒͺ'; +COMMENT ON COLUMN "ROOT"."hx_production_plan"."production_number" IS ''; +COMMENT ON COLUMN "ROOT"."hx_production_plan"."real_adiabat" IS 'ʵʾ'; +COMMENT ON COLUMN "ROOT"."hx_production_plan"."real_assembly" IS 'ʵװ'; +COMMENT ON COLUMN "ROOT"."hx_production_plan"."real_charge" IS 'ʵװҩ'; +COMMENT ON COLUMN "ROOT"."hx_production_plan"."real_deliver" IS 'ʵʽ'; +COMMENT ON COLUMN "ROOT"."hx_production_plan"."review" IS ''; +COMMENT ON COLUMN "ROOT"."hx_production_plan"."settlement" IS ''; + + +CREATE UNIQUE INDEX "INDEX356532075240600" ON "ROOT"."hx_production_plan"("id" ASC) STORAGE(ON "AITEST", CLUSTERBTR) ; + diff --git a/ailanyin-model-mapper/src/main/java/com/ailanyin/mapper/HxDangerousPointMapper.java b/ailanyin-model-mapper/src/main/java/com/ailanyin/mapper/HxDangerousPointMapper.java index c784b4b..8660b10 100644 --- a/ailanyin-model-mapper/src/main/java/com/ailanyin/mapper/HxDangerousPointMapper.java +++ b/ailanyin-model-mapper/src/main/java/com/ailanyin/mapper/HxDangerousPointMapper.java @@ -38,4 +38,8 @@ public interface HxDangerousPointMapper { List selectAllLevelNumByDept(@Param("dept") String dept, @Param("pointLevelParentId") String pointLevelParentId); int selectNullRtmpCount(); + + int checkIsExist(String name); + + void updateStatus(HxDangerousPoint hxDangerousPoint); } diff --git a/ailanyin-model-mapper/src/main/java/com/ailanyin/mapper/HxDangerousSourceMapper.java b/ailanyin-model-mapper/src/main/java/com/ailanyin/mapper/HxDangerousSourceMapper.java index 45eb566..3726069 100644 --- a/ailanyin-model-mapper/src/main/java/com/ailanyin/mapper/HxDangerousSourceMapper.java +++ b/ailanyin-model-mapper/src/main/java/com/ailanyin/mapper/HxDangerousSourceMapper.java @@ -35,4 +35,8 @@ public interface HxDangerousSourceMapper { * @return map */ List selectAllLevelNumByDept(@Param("dept") String dept, @Param("sourceLevelParentId") String sourceLevelParentId); + + int checkIsExist(String name); + + void updateStatus(HxDangerousSource hxDangerousSource); } diff --git a/ailanyin-model-mapper/src/main/java/com/ailanyin/model/HxProductionPlan.java b/ailanyin-model-mapper/src/main/java/com/ailanyin/model/HxProductionPlan.java index caa0817..4619c54 100644 --- a/ailanyin-model-mapper/src/main/java/com/ailanyin/model/HxProductionPlan.java +++ b/ailanyin-model-mapper/src/main/java/com/ailanyin/model/HxProductionPlan.java @@ -25,25 +25,29 @@ public class HxProductionPlan implements Serializable { @Excel(name = "产品型号", width = 20) private String productModel; - @ApiModelProperty(value = "生产数量") - @Excel(name = "生产数量", width = 20) - private String productionNumber; - @ApiModelProperty(value = "绝热数量") - @Excel(name = "绝热数量", width = 20) - private String adiabat; + @Excel(name = "实际绝热数量", width = 20) + private String realAdiabat; + @Excel(name = "预测绝热数量", width = 20) + private String forecastAdiabat; @ApiModelProperty(value = "装药数量") - @Excel(name = "装药数量", width = 20) - private String charge; + @Excel(name = "实际装药数量", width = 20) + private String realCharge; + @Excel(name = "预测装药数量", width = 20) + private String forecastCharge; @ApiModelProperty(value = "总装数量") - @Excel(name = "总装数量", width = 20) - private String assembly; + @Excel(name = "实际总装数量", width = 20) + private String realAssembly; + @Excel(name = "预测总装数量", width = 20) + private String forecastAssembly; @ApiModelProperty(value = "交付数量") - @Excel(name = "交付数量", width = 20) - private String deliver; + @Excel(name = "实际交付数量", width = 20) + private String realDeliver; + @Excel(name = "预测交付数量", width = 20) + private String forecastDeliver; @ApiModelProperty(value = "评审数量") @Excel(name = "评审数量", width = 20) @@ -53,5 +57,9 @@ public class HxProductionPlan implements Serializable { @Excel(name = "结算数量", width = 20) private String settlement; + @ApiModelProperty(value = "生产数量") + @Excel(name = "生产数量", width = 20) + private String productionNumber; + private static final long serialVersionUID = 1L; } diff --git a/ailanyin-model-mapper/src/main/java/com/ailanyin/model/HxQualitySystemReview.java b/ailanyin-model-mapper/src/main/java/com/ailanyin/model/HxQualitySystemReview.java index 357ca5a..4bfedb9 100644 --- a/ailanyin-model-mapper/src/main/java/com/ailanyin/model/HxQualitySystemReview.java +++ b/ailanyin-model-mapper/src/main/java/com/ailanyin/model/HxQualitySystemReview.java @@ -21,15 +21,15 @@ public class HxQualitySystemReview implements Serializable { private String todayDate; @ApiModelProperty(value = "内审数量") - @Excel(name = "内审数量", width = 20) + @Excel(name = "内审问题数量", width = 20) private String internalReviewNumber; @ApiModelProperty(value = "外审数量") - @Excel(name = "外审数量", width = 20) + @Excel(name = "外审问题数量", width = 20) private String externalReviewNumber; @ApiModelProperty(value = "第三方审数量") - @Excel(name = "第三方审数量", width = 20) + @Excel(name = "第三方审问题数量", width = 20) private String otherReviewNumber; private static final long serialVersionUID = 1L; diff --git a/ailanyin-model-mapper/src/main/resources/com/ailanyin/mapper/HxDangerousPointMapper.xml b/ailanyin-model-mapper/src/main/resources/com/ailanyin/mapper/HxDangerousPointMapper.xml index 7f11127..48898cb 100644 --- a/ailanyin-model-mapper/src/main/resources/com/ailanyin/mapper/HxDangerousPointMapper.xml +++ b/ailanyin-model-mapper/src/main/resources/com/ailanyin/mapper/HxDangerousPointMapper.xml @@ -177,4 +177,14 @@ where "hx_dict"."parent_id" = #{pointLevelParentId} group BY ROOT."hx_dict"."name" + + + + + update ROOT."hx_dangerous_point" + set "status" = #{status,jdbcType=VARCHAR} + where "point_name" = #{pointName,jdbcType=VARCHAR} + diff --git a/ailanyin-model-mapper/src/main/resources/com/ailanyin/mapper/HxDangerousSourceMapper.xml b/ailanyin-model-mapper/src/main/resources/com/ailanyin/mapper/HxDangerousSourceMapper.xml index c90baf0..c4e5a86 100644 --- a/ailanyin-model-mapper/src/main/resources/com/ailanyin/mapper/HxDangerousSourceMapper.xml +++ b/ailanyin-model-mapper/src/main/resources/com/ailanyin/mapper/HxDangerousSourceMapper.xml @@ -156,4 +156,14 @@ where "hx_dict"."parent_id" = #{sourceLevelParentId} group BY ROOT."hx_dict"."name" + + + + + update ROOT."hx_dangerous_source" + set "status" = #{status,jdbcType=VARCHAR} + where "source_name" = #{sourceName,jdbcType=VARCHAR} + diff --git a/ailanyin-model-mapper/src/main/resources/com/ailanyin/mapper/HxProductionPlanMapper.xml b/ailanyin-model-mapper/src/main/resources/com/ailanyin/mapper/HxProductionPlanMapper.xml index 468dcff..d132e89 100644 --- a/ailanyin-model-mapper/src/main/resources/com/ailanyin/mapper/HxProductionPlanMapper.xml +++ b/ailanyin-model-mapper/src/main/resources/com/ailanyin/mapper/HxProductionPlanMapper.xml @@ -11,10 +11,14 @@ - - - - + + + + + + + + @@ -24,8 +28,20 @@ This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Tue Dec 21 03:29:17 UTC 2021. --> - "id", "month", "product_model", "production_number", "adiabat", "charge", "assembly", - "deliver", "review", "settlement" + "id", + "month", + "product_model", + "production_number", + "real_adiabat", + "forecast_adiabat", + "real_charge", + "forecast_charge", + "real_assembly", + "forecast_assembly", + "real_deliver", + "forecast_deliver", + "review", + "settlement"