修复已知问题

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) ;

View File

@ -38,4 +38,8 @@ public interface HxDangerousPointMapper {
List<Map> selectAllLevelNumByDept(@Param("dept") String dept, @Param("pointLevelParentId") String pointLevelParentId);
int selectNullRtmpCount();
int checkIsExist(String name);
void updateStatus(HxDangerousPoint hxDangerousPoint);
}

View File

@ -35,4 +35,8 @@ public interface HxDangerousSourceMapper {
* @return map
*/
List<Map> selectAllLevelNumByDept(@Param("dept") String dept, @Param("sourceLevelParentId") String sourceLevelParentId);
int checkIsExist(String name);
void updateStatus(HxDangerousSource hxDangerousSource);
}

View File

@ -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;
}

View File

@ -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;

View File

@ -177,4 +177,14 @@
where "hx_dict"."parent_id" = #{pointLevelParentId}
group BY ROOT."hx_dict"."name"
</select>
<select id="checkIsExist" resultType="int">
select count("id") from ROOT."hx_dangerous_point" where "point_name" = #{name} limit 1
</select>
<update id="updateStatus">
update ROOT."hx_dangerous_point"
set "status" = #{status,jdbcType=VARCHAR}
where "point_name" = #{pointName,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -156,4 +156,14 @@
where "hx_dict"."parent_id" = #{sourceLevelParentId}
group BY ROOT."hx_dict"."name"
</select>
<select id="checkIsExist" resultType="int">
select count("id") from ROOT."hx_dangerous_source" where "source_name" = #{name} limit 1
</select>
<update id="updateStatus">
update ROOT."hx_dangerous_source"
set "status" = #{status,jdbcType=VARCHAR}
where "source_name" = #{sourceName,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -11,10 +11,14 @@
<result column="month" jdbcType="VARCHAR" property="month" />
<result column="product_model" jdbcType="VARCHAR" property="productModel" />
<result column="production_number" jdbcType="VARCHAR" property="productionNumber" />
<result column="adiabat" jdbcType="VARCHAR" property="adiabat" />
<result column="charge" jdbcType="VARCHAR" property="charge" />
<result column="assembly" jdbcType="VARCHAR" property="assembly" />
<result column="deliver" jdbcType="VARCHAR" property="deliver" />
<result column="real_adiabat" jdbcType="VARCHAR" property="realAdiabat" />
<result column="forecast_adiabat" jdbcType="VARCHAR" property="forecastAdiabat" />
<result column="real_charge" jdbcType="VARCHAR" property="realCharge" />
<result column="forecast_charge" jdbcType="VARCHAR" property="forecastCharge" />
<result column="real_assembly" jdbcType="VARCHAR" property="realAssembly" />
<result column="forecast_assembly" jdbcType="VARCHAR" property="forecastAssembly" />
<result column="real_deliver" jdbcType="VARCHAR" property="realDeliver" />
<result column="forecast_deliver" jdbcType="VARCHAR" property="forecastDeliver" />
<result column="review" jdbcType="VARCHAR" property="review" />
<result column="settlement" jdbcType="VARCHAR" property="settlement" />
</resultMap>
@ -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"
</sql>
<select id="selectList" resultMap="BaseResultMap">
<!--
@ -86,17 +102,29 @@
<if test="productionNumber != null">
"production_number",
</if>
<if test="adiabat != null">
"adiabat",
<if test="realAdiabat != null">
"real_adiabat",
</if>
<if test="charge != null">
"charge",
<if test="forecastAdiabat != null">
"forecast_adiabat",
</if>
<if test="assembly != null">
"assembly",
<if test="realCharge != null">
"real_charge",
</if>
<if test="deliver != null">
"deliver",
<if test="forecastCharge != null">
"forecast_charge",
</if>
<if test="realAssembly != null">
"real_assembly",
</if>
<if test="forecastAssembly != null">
"forecast_assembly",
</if>
<if test="realDeliver != null">
"real_deliver",
</if>
<if test="forecastDeliver != null">
"forecast_deliver",
</if>
<if test="review != null">
"review",
@ -118,17 +146,29 @@
<if test="productionNumber != null">
#{productionNumber,jdbcType=VARCHAR},
</if>
<if test="adiabat != null">
#{adiabat,jdbcType=VARCHAR},
<if test="realAdiabat != null">
#{realAdiabat},
</if>
<if test="charge != null">
#{charge,jdbcType=VARCHAR},
<if test="forecastAdiabat != null">
#{forecastAdiabat},
</if>
<if test="assembly != null">
#{assembly,jdbcType=VARCHAR},
<if test="realCharge != null">
#{realCharge},
</if>
<if test="deliver != null">
#{deliver,jdbcType=VARCHAR},
<if test="forecastCharge != null">
#{forecastCharge},
</if>
<if test="realAssembly != null">
#{realAssembly},
</if>
<if test="forecastAssembly != null">
#{forecastAssembly},
</if>
<if test="realDeliver != null">
#{realDeliver},
</if>
<if test="forecastDeliver != null">
#{forecastDeliver},
</if>
<if test="review != null">
#{review,jdbcType=VARCHAR},
@ -149,17 +189,29 @@
<if test="productionNumber != null">
"production_number" = #{productionNumber,jdbcType=VARCHAR},
</if>
<if test="adiabat != null">
"adiabat" = #{adiabat,jdbcType=VARCHAR},
<if test="realAdiabat != null">
"real_adiabat" = #{realAdiabat},
</if>
<if test="charge != null">
"charge" = #{charge,jdbcType=VARCHAR},
<if test="forecastAdiabat != null">
"forecast_adiabat" = #{forecastAdiabat},
</if>
<if test="assembly != null">
"assembly" = #{assembly,jdbcType=VARCHAR},
<if test="realCharge != null">
"real_charge" = #{realCharge},
</if>
<if test="deliver != null">
"deliver" = #{deliver,jdbcType=VARCHAR},
<if test="forecastCharge != null">
"forecast_charge" = #{forecastCharge},
</if>
<if test="realAssembly != null">
"real_assembly" = #{realAssembly},
</if>
<if test="forecastAssembly != null">
"forecast_assembly" = #{forecastAssembly},
</if>
<if test="realDeliver != null">
"real_deliver" = #{realDeliver},
</if>
<if test="forecastDeliver != null">
"forecast_deliver" = #{forecastDeliver},
</if>
<if test="review != null">
"review" = #{review,jdbcType=VARCHAR},
@ -212,10 +264,14 @@
<select id="getModelProductionStatisticPic" resultType="map">
select "product_model" as "model",
sum("production_number") as "productionNumber",
sum("adiabat") as "adiabat",
sum("charge") as "charge",
sum("assembly") as "assembly",
sum("deliver") as "deliver",
sum("real_adiabat") as "realAdiabat",
sum("forecast_adiabat") as "forecastAdiabat",
sum("real_charge") as "realCharge",
sum("forecast_charge") as "forecastCharge",
sum("real_assembly") as "realAssembly",
sum("forecast_assembly") as "forecastAssembly",
sum("real_deliver") as "realDeliver",
sum("forecast_deliver") as "forecastDeliver",
sum("review") as "review",
sum("settlement") as "settlement"
from ROOT."hx_production_plan"