任务进度bug修复
This commit is contained in:
parent
68822a580c
commit
0679636869
@ -2,7 +2,7 @@
|
||||
* @Author:gongyijun
|
||||
* @Title: DateUtils.java
|
||||
* @Package com.zhgd.utils
|
||||
* @Description: TODO
|
||||
* @Description:
|
||||
* @date 2017年12月22日 下午5:47:05
|
||||
* @version V1.0
|
||||
*/
|
||||
@ -18,7 +18,6 @@ import java.util.*;
|
||||
/**
|
||||
* @Author:gongyijun
|
||||
* @ClassName: DateUtils
|
||||
* @Description: TODO
|
||||
* @date 2017年12月22日 下午5:47:05
|
||||
*/
|
||||
@Slf4j
|
||||
@ -261,7 +260,6 @@ public class DateUtil {
|
||||
try {
|
||||
date = simpleDateFormat.parse(dateStr);
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
return date;
|
||||
@ -357,7 +355,6 @@ public class DateUtil {
|
||||
try {
|
||||
date1 = sdf.parse(date);
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
Calendar rightNow = Calendar.getInstance();
|
||||
@ -384,7 +381,6 @@ public class DateUtil {
|
||||
datetime = sdf.parse(dateTime).getTime();
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
return datetime;
|
||||
}
|
||||
|
||||
@ -75,8 +75,8 @@ public class AmmeterRecordDetail implements Serializable {
|
||||
private java.lang.String ammeterName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "哪天的用量")
|
||||
private java.util.Date day;
|
||||
|
||||
|
||||
@ -131,10 +131,10 @@ public class AmmeterRecordDetailServiceImpl extends ServiceImpl<AmmeterRecordDet
|
||||
AmmeterRecordDetail ard = m.get(ammeter.getAmmeterNo());
|
||||
if (ard == null) {
|
||||
ard = new AmmeterRecordDetail();
|
||||
ard.setAmmeterNo(ammeter.getAmmeterNo());
|
||||
ard.setAmmeterName(ammeter.getAmmeterName());
|
||||
ard.setDegree(BigDecimal.valueOf(0.0));
|
||||
}
|
||||
ard.setAmmeterNo(ammeter.getAmmeterNo());
|
||||
ard.setAmmeterName(ammeter.getAmmeterName());
|
||||
rtList.add(ard);
|
||||
}
|
||||
return rtList;
|
||||
|
||||
@ -3,6 +3,7 @@ package com.zhgd.xmgl.modules.dangerous.controller;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.base.entity.vo.TrendVo;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectRecord;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectionStatistics;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.vo.*;
|
||||
@ -42,21 +43,21 @@ public class HiddenDangerInspectRecordController {
|
||||
*/
|
||||
@ApiOperation(value = "分页列表查询隐患检查记录信息", notes = "分页列表查询隐患检查记录信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "faultLevel", value = "事故隐患等级,1一般,2重大", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "changeUser", value = "整改人", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "itemId", value = "子任务ID", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "engineeringId", value = "危大工程记录ID", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "createUser", value = "创建人", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "recordType", value = "类型,1隐患问题,2排查记录", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "reviewId", value = "复查人", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "status", value = "状态,1无需整改,2待整改,3待复查,4合格", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "inspectStartTime", value = "检查开始时间", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "inspectEndTime", value = "检查结束时间", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "selectType", value = "查询类型,1排查次数,2整改扣分,3超期扣分", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "enterpriseSn", value = "单位sn", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "faultLevel", value = "事故隐患等级,1一般,2重大", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "changeUser", value = "整改人", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "itemId", value = "子任务ID", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "engineeringId", value = "危大工程记录ID", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "createUser", value = "创建人", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "recordType", value = "类型,1隐患问题,2排查记录", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "reviewId", value = "复查人", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "status", value = "状态,1无需整改,2待整改,3待复查,4合格", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "inspectStartTime", value = "检查开始时间", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "inspectEndTime", value = "检查结束时间", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "selectType", value = "查询类型,1排查次数,2整改扣分,3超期扣分", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "enterpriseSn", value = "单位sn", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "body", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "body", required = true, dataType = "Integer"),
|
||||
})
|
||||
@PostMapping(value = "/list")
|
||||
public Result<IPage<HiddenDangerInspectRecord>> queryPageList(@RequestBody Map<String, Object> map) {
|
||||
@ -69,7 +70,7 @@ public class HiddenDangerInspectRecordController {
|
||||
*/
|
||||
@ApiOperation(value = "安全巡检-台账数据列表", notes = "安全巡检-台账数据列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String")
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String")
|
||||
})
|
||||
@PostMapping(value = "/getList")
|
||||
public Result<IPage<HiddenDangerInspectRecord>> getList(@RequestBody Map<String, Object> map) {
|
||||
@ -78,17 +79,17 @@ public class HiddenDangerInspectRecordController {
|
||||
|
||||
@ApiOperation(value = "项目检查记录统计", notes = "项目检查记录统计", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "faultLevel", value = "事故隐患等级,1一般,2重大", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "changeUser", value = "整改人", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "itemId", value = "子任务ID", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "engineeringId", value = "危大工程记录ID", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "createUser", value = "创建人", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "recordType", value = "类型,1隐患问题,2排查记录", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "reviewId", value = "复查人", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "status", value = "状态,1无需整改,2待整改,3待复查,4合格", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "inspectStartTime", value = "检查开始时间", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "inspectEndTime", value = "检查结束时间", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "faultLevel", value = "事故隐患等级,1一般,2重大", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "changeUser", value = "整改人", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "itemId", value = "子任务ID", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "engineeringId", value = "危大工程记录ID", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "createUser", value = "创建人", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "recordType", value = "类型,1隐患问题,2排查记录", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "reviewId", value = "复查人", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "status", value = "状态,1无需整改,2待整改,3待复查,4合格", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "inspectStartTime", value = "检查开始时间", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "inspectEndTime", value = "检查结束时间", paramType = "body", required = false, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/getProjectInspectRecordCount")
|
||||
public Result<ProjectInspectRecordCountVo> getProjectInspectRecordCount(@RequestBody Map<String, Object> map) {
|
||||
@ -157,7 +158,7 @@ public class HiddenDangerInspectRecordController {
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除隐患检查记录信息", notes = "删除隐患检查记录信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "隐患检查记录ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@ApiImplicitParam(name = "id", value = "隐患检查记录ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<HiddenDangerInspectRecord> delete(@RequestBody Map<String, Object> map) {
|
||||
hiddenDangerInspectRecordService.deleteHiddenDangerInspectRecord(MapUtils.getLong(map, "id"));
|
||||
@ -172,7 +173,7 @@ public class HiddenDangerInspectRecordController {
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询隐患检查记录信息", notes = "通过id查询隐患检查记录信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "隐患检查记录ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@ApiImplicitParam(name = "id", value = "隐患检查记录ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/selectHiddenDangerInspectRecordById")
|
||||
public Result<EntityMap> selectHiddenDangerInspectRecordById(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(hiddenDangerInspectRecordService.selectHiddenDangerInspectRecordById(map));
|
||||
@ -180,7 +181,7 @@ public class HiddenDangerInspectRecordController {
|
||||
|
||||
|
||||
@ApiOperation(value = "项目自检检查任务统计", notes = "项目自检检查任务统计", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "taskId", value = "任务ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@ApiImplicitParam(name = "taskId", value = "任务ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/selectInspectTaskCount")
|
||||
public Result<Map<String, Object>> selectInspectTaskCount(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(hiddenDangerInspectRecordService.selectInspectTaskCount(map));
|
||||
@ -188,7 +189,7 @@ public class HiddenDangerInspectRecordController {
|
||||
|
||||
|
||||
@ApiOperation(value = "查询涉及到用户的重大检查记录", notes = "查询涉及到用户的重大检查记录", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "userId", value = "任务ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@ApiImplicitParam(name = "userId", value = "任务ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/selectUserInspectRecordCount")
|
||||
public Result<Map<String, Object>> selectUserInspectRecordCount(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(hiddenDangerInspectRecordService.selectUserInspectRecordCount(map));
|
||||
@ -196,7 +197,7 @@ public class HiddenDangerInspectRecordController {
|
||||
|
||||
@ApiOperation(value = "隐患检查安全管理统计", notes = "隐患检查安全管理统计", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/selectHiddenDangerSecurityManageStatistics")
|
||||
public Result<HiddenDangerSecurityManageStatisticsVo> selectHiddenDangerSecurityManageStatistics(@RequestBody Map<String, Object> map) {
|
||||
@ -205,7 +206,7 @@ public class HiddenDangerInspectRecordController {
|
||||
|
||||
@ApiOperation(value = "查询最新20条有操作的数据整改动态", notes = "查询最新20条有操作的数据整改动态", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/selectRectifiedHiddenDangerList")
|
||||
public Result<List<HiddenDangerInspectRecord>> selectRectifiedHiddenDangerList(@RequestBody Map<String, Object> map) {
|
||||
@ -214,7 +215,7 @@ public class HiddenDangerInspectRecordController {
|
||||
|
||||
@ApiOperation(value = "查询最新20条待整改的隐患检查安全管理数据", notes = "查询最新20条待整改的隐患检查安全管理数据", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/getNewestHiddenDangerDataList")
|
||||
public Result<List<EntityMap>> getNewestHiddenDangerDataList(@RequestBody Map<String, Object> map) {
|
||||
@ -223,7 +224,7 @@ public class HiddenDangerInspectRecordController {
|
||||
|
||||
@ApiOperation(value = "按照检查类型统计检查数", notes = "按照检查类型统计检查数", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/selectInspectTypeStatisticsList")
|
||||
public Result<List<EntityMap>> selectInspectTypeStatisticsList(@RequestBody Map<String, Object> map) {
|
||||
@ -232,11 +233,11 @@ public class HiddenDangerInspectRecordController {
|
||||
|
||||
@ApiOperation(value = "查询企业单位隐患检查得分列表", notes = "查询企业单位隐患检查得分列表", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "enterpriseTypeId", value = "企业类型", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "enterpriseName", value = "企业名称", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "inspectStartTime", value = "检查开始时间,格式2021-01-22", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "inspectEndTime", value = "检查结束时间,格式2021-01-22", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "enterpriseTypeId", value = "企业类型", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "enterpriseName", value = "企业名称", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "inspectStartTime", value = "检查开始时间,格式2021-01-22", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "inspectEndTime", value = "检查结束时间,格式2021-01-22", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/selectEnterpriseScoreList")
|
||||
public Result<List<EntityMap>> selectEnterpriseScoreList(@RequestBody Map<String, Object> map) {
|
||||
@ -244,7 +245,7 @@ public class HiddenDangerInspectRecordController {
|
||||
}
|
||||
|
||||
@ApiOperation(value = "按问题检查类型统计问题占比", notes = "按问题检查类型统计问题占比", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String")
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String")
|
||||
@PostMapping(value = "/selectHiddenDangerTypeRatio")
|
||||
public Result<List<EntityMap>> selectHiddenDangerTypeRatio(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(hiddenDangerInspectRecordService.selectHiddenDangerTypeRatio(map));
|
||||
@ -252,8 +253,8 @@ public class HiddenDangerInspectRecordController {
|
||||
|
||||
@ApiOperation(value = "按问题状态统计问题趋势", notes = "按问题状态统计问题趋势", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "offsetDay", value = "查询天数(不填默认15天)", paramType = "query", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "offsetDay", value = "查询天数(不填默认15天)", paramType = "body", dataType = "Integer"),
|
||||
})
|
||||
@PostMapping(value = "/selectHiddenDangerStateTrend")
|
||||
public Result<List<HiddenDangerInspectionStatistics>> selectHiddenDangerStateTrend(@RequestBody Map<String, Object> map) {
|
||||
@ -262,8 +263,8 @@ public class HiddenDangerInspectRecordController {
|
||||
|
||||
@ApiOperation(value = "按问题状态统计问题趋势(按周算)", notes = "按问题状态统计问题趋势(按周算)", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "offsetWeek", value = "查询几周的数量(不填默认5周)", paramType = "query", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "offsetWeek", value = "查询几周的数量(不填默认5周)", paramType = "body", dataType = "Integer"),
|
||||
})
|
||||
@PostMapping(value = "/selectHiddenDangerStateTrendByWeek")
|
||||
public Result<List<HiddenDangerInspectionStatistics>> selectHiddenDangerStateTrendByWeek(@RequestBody Map<String, Object> map) {
|
||||
@ -272,11 +273,20 @@ public class HiddenDangerInspectRecordController {
|
||||
|
||||
@ApiOperation(value = "查询过去一个月的新增问题趋势", notes = "查询过去一个月的新增问题趋势", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/getDangerInspectionPassMonthStatics")
|
||||
public Result<List<DangerInspectionPassMonthStaticsVo>> getDangerInspectionPassMonthStatics(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(hiddenDangerInspectRecordService.getDangerInspectionPassMonthStatics(map));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "责任单位统计", notes = "责任单位统计", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/countResponsibleUnit")
|
||||
public Result<List<TrendVo>> countResponsibleUnit(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(hiddenDangerInspectRecordService.countResponsibleUnit(map));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,34 +5,38 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ProjectInspectRecordCountVo {
|
||||
@ApiModelProperty(value = "其他数量,就是除了月、周的检查数量")
|
||||
private Integer otherInspectNum;
|
||||
@ApiModelProperty(value = "")
|
||||
@ApiModelProperty(value = "总数")
|
||||
private String totalNum;
|
||||
@ApiModelProperty(value = "隐患总数")
|
||||
private Integer dangerNum;
|
||||
@ApiModelProperty(value = "已关闭数量(通过)(合格+无须整改)")
|
||||
private Integer closeNum;
|
||||
@ApiModelProperty(value = "合格,就是已整改数量")
|
||||
@ApiModelProperty(value = "合格数量")
|
||||
private Integer rectifyCompleteNum;
|
||||
@ApiModelProperty(value = "待复查,待审核数量")
|
||||
@ApiModelProperty(value = "待复查数量")
|
||||
private Integer reviewNum;
|
||||
@ApiModelProperty(value = "")
|
||||
private Integer investigateNum;
|
||||
@ApiModelProperty(value = "")
|
||||
private Integer overdueNotCloseNum;
|
||||
@ApiModelProperty(value = "待整改问题")
|
||||
@ApiModelProperty(value = "待整改数量")
|
||||
private Integer rectificationNum;
|
||||
@ApiModelProperty(value = "问题总数")
|
||||
private String totalNum;
|
||||
@ApiModelProperty(value = "周检查数量")
|
||||
private Integer weekInspectNum;
|
||||
@ApiModelProperty(value = "月检查数量")
|
||||
private Integer monthInspectNum;
|
||||
@ApiModelProperty(value = "已整改数量")
|
||||
private Integer rectificationDoneNum;
|
||||
@ApiModelProperty(value = "及时整改率")
|
||||
private Double closeRatio;
|
||||
@ApiModelProperty(value = "")
|
||||
private Double completeRatio;
|
||||
@ApiModelProperty(value = "")
|
||||
private Integer inspectNum;
|
||||
@ApiModelProperty(value = "")
|
||||
@ApiModelProperty(value = "超期未闭合数")
|
||||
private Integer overdueNotCloseNum;
|
||||
@ApiModelProperty(value = "超期未整改数")
|
||||
private Integer overdueRectificationNum;
|
||||
@ApiModelProperty(value = "未整改")
|
||||
@ApiModelProperty(value = "未闭合数量")
|
||||
private Integer notCloseNum;
|
||||
@ApiModelProperty(value = "周检查数量")
|
||||
private Integer weekInspectNum;
|
||||
@ApiModelProperty(value = "月检查数量")
|
||||
private Integer monthInspectNum;
|
||||
@ApiModelProperty(value = "其他数量,就是除了月、周的检查数量")
|
||||
private Integer otherInspectNum;
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.base.entity.vo.TrendVo;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectRecord;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectionStatistics;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.vo.*;
|
||||
@ -67,4 +68,6 @@ public interface HiddenDangerInspectRecordMapper extends BaseMapper<HiddenDanger
|
||||
HiddenDangerInspectionStatistics statisticsByStatue(DateTime startTime, DateTime endTime, String projectSn);
|
||||
|
||||
List<DangerInspectionPassMonthStaticsVo> getDangerInspectionPassMonthStatics(Map<String, Object> map);
|
||||
|
||||
List<TrendVo> countResponsibleUnit(Map<String, Object> map);
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
a.create_user,
|
||||
a.create_time,
|
||||
a.inspect_time,
|
||||
DATE_FORMAT(a.change_limit_time,'%Y-%m-%d %H:%i:%S') change_limit_time,
|
||||
DATE_FORMAT(a.change_limit_time, '%Y-%m-%d %H:%i:%S') change_limit_time,
|
||||
a.image_url,
|
||||
a.change_user,
|
||||
a.record_type,
|
||||
@ -157,8 +157,8 @@
|
||||
IFNULL(SUM((CASE WHEN a.record_type = 2 THEN 1 ELSE 0 END)), 0) investigateNum,
|
||||
IFNULL(SUM((CASE WHEN a.record_type = 1 THEN 1 ELSE 0 END)), 0) inspectNum,
|
||||
IFNULL(SUM((CASE WHEN a.status = 1 or a.status = 4 THEN 1 ELSE 0 END)), 0) closeNum,
|
||||
IFNULL(SUM((CASE WHEN a.status = 4 THEN 1 ELSE 0 END)), 0) rectifyCompleteNum, <!--合格,就是已整改-->
|
||||
IFNULL(SUM((CASE WHEN a.status = 2 OR a.status = 3 THEN 1 ELSE 0 END)), 0) notCloseNum, <!--未整改-->
|
||||
IFNULL(SUM((CASE WHEN a.status = 4 THEN 1 ELSE 0 END)), 0) rectifyCompleteNum,
|
||||
IFNULL(SUM((CASE WHEN a.status = 2 OR a.status = 3 THEN 1 ELSE 0 END)), 0) notCloseNum,
|
||||
IFNULL(SUM((CASE
|
||||
WHEN (a.status = 2 OR a.status = 3)
|
||||
AND DATE_FORMAT(now(), "%Y-%m-%d") > a.change_limit_time THEN 1
|
||||
@ -168,7 +168,9 @@
|
||||
ELSE 0 END)),
|
||||
0) overdueRectificationNum,
|
||||
IFNULL(SUM((CASE WHEN a.status = 2 THEN 1 ELSE 0 END)), 0) rectificationNum,
|
||||
IFNULL(SUM((CASE WHEN a.status = 3 THEN 1 ELSE 0 END)), 0) reviewNum, <!--待复查,待审核-->
|
||||
IFNULL(SUM((CASE WHEN a.status != 2 THEN 1 ELSE 0 END)), 0) rectificationDoneNum,
|
||||
IFNULL(SUM((CASE WHEN a.status != 1 THEN 1 ELSE 0 END)), 0) dangerNum,
|
||||
IFNULL(SUM((CASE WHEN a.status = 3 THEN 1 ELSE 0 END)), 0) reviewNum,
|
||||
IFNULL(SUM((CASE WHEN tr.frequency_type = 3 THEN 1 ELSE 0 END)), 0) weekInspectNum, <!--周检查数量-->
|
||||
IFNULL(SUM((CASE WHEN tr.frequency_type = 4 THEN 1 ELSE 0 END)), 0) monthInspectNum <!--月检查数量-->
|
||||
from hidden_danger_inspection_record a
|
||||
@ -469,4 +471,15 @@
|
||||
and a.inspect_time >= CONCAT(DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -30 DAY), '%Y-%m-%d'), ' 00:00:00')
|
||||
group by day
|
||||
</select>
|
||||
|
||||
<select id="countResponsibleUnit" resultType="com.zhgd.xmgl.base.entity.vo.TrendVo">
|
||||
select count(*) y,i.enterprise_name x
|
||||
from hidden_danger_inspection_record r
|
||||
join enterprise_info i on i.enterprise_sn = r.enterprise_sn
|
||||
where 1 = 1
|
||||
<if test="projectSn != null and projectSn != ''">
|
||||
and r.project_sn = #{projectSn}
|
||||
</if>
|
||||
group by r.enterprise_sn
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.base.entity.vo.TrendVo;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectRecord;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectionStatistics;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.vo.*;
|
||||
@ -75,4 +76,6 @@ public interface IHiddenDangerInspectRecordService extends IService<HiddenDanger
|
||||
Result<HiddenDangerInspectRecord> edit(HiddenDangerInspectRecord hiddenDangerInspectRecord);
|
||||
|
||||
List<DangerInspectionPassMonthStaticsVo> getDangerInspectionPassMonthStatics(Map<String, Object> map);
|
||||
|
||||
List<TrendVo> countResponsibleUnit(Map<String, Object> map);
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.base.entity.vo.TrendVo;
|
||||
import com.zhgd.xmgl.call.SanjiangDataCall;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.INoticeService;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.DangerInspectionAcceptanceTableResult;
|
||||
@ -504,6 +505,11 @@ public class HiddenDangerInspectRecordServiceImpl extends ServiceImpl<HiddenDang
|
||||
return fillData(monthStatics);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TrendVo> countResponsibleUnit(Map<String, Object> map) {
|
||||
return hiddenDangerInspectRecordMapper.countResponsibleUnit(map);
|
||||
}
|
||||
|
||||
private List<DangerInspectionPassMonthStaticsVo> fillData(List<DangerInspectionPassMonthStaticsVo> monthStatics) {
|
||||
List<DangerInspectionPassMonthStaticsVo> rtVos = new ArrayList<>();
|
||||
Map<String, DangerInspectionPassMonthStaticsVo> map = monthStatics.stream().collect(Collectors.toMap(e -> e.getDay(), e -> e, (o, o2) -> o));
|
||||
|
||||
@ -319,7 +319,7 @@ public class ProjectUfaceConfigServiceImpl extends ServiceImpl<ProjectUfaceConfi
|
||||
image, devSn);
|
||||
} else if (tempProjectUfaceConfig.getSupplierType() == 4) {
|
||||
QYUfaceUtil.addOrUpdatePerson(tempProjectUfaceConfig.getAppId(), tempProjectUfaceConfig.getAppSecret(), 1, workerInfo.getIdCard(), workerInfo.getWorkerName(),
|
||||
"", "", workerInfo.getIdCard(), "", "", 3, "", devId.split(","), basePath + "/" + workerInfo.getFieldAcquisitionUrl());
|
||||
"", workerInfo.getPhoneNumber(), workerInfo.getIdCard(), workerInfo.getAttendanceNumber(), workerInfo.getNation(), workerInfo.getSex(), workerInfo.getBirthday(), devId.split(","), basePath + "/" + workerInfo.getFieldAcquisitionUrl());
|
||||
} else if (tempProjectUfaceConfig.getSupplierType() == 5) {
|
||||
//佳信捷设备
|
||||
JxjUfaceUtil.addWorkerInfo(workerInfo, tempProjectUfaceConfig, serverUrl + "/image/");
|
||||
|
||||
@ -69,17 +69,18 @@ public class TaskProgressMaterialRelController {
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"),
|
||||
})
|
||||
@GetMapping(value = "/tree/list")
|
||||
public Result<List<TaskProgress>> queryTreeList(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||
public Result<List<TaskProgress>> queryTreeList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(taskProgressMaterialRelService.queryTreeList(paramMap));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询任务进度甘特图-最新的材料用量", notes = "查询任务进度甘特图-最新的材料用量", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "taskProgressId", value = "任务进度甘特图id", paramType = "query", required = true, dataType = "String"),
|
||||
})
|
||||
@GetMapping(value = "/detailList")
|
||||
public Result<List<TaskProgressMaterialRel>> queryDetailList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(taskProgressMaterialRelService.queryDetailList(paramMap));
|
||||
public Result<List<TaskProgressMaterialRel>> queryNewestDetailList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(taskProgressMaterialRelService.queryNewestDetailList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -91,7 +92,7 @@ public class TaskProgressMaterialRelController {
|
||||
@ApiOperation(value = "添加任务进度甘特图-材料类型-关联信息", notes = "添加任务进度甘特图-材料类型-关联信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<TaskProgressMaterialRel> add(@RequestBody TaskProgressMaterialRel taskProgressMaterialRel) {
|
||||
taskProgressMaterialRelService.save(taskProgressMaterialRel);
|
||||
taskProgressMaterialRelService.add(taskProgressMaterialRel);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ -104,7 +105,7 @@ public class TaskProgressMaterialRelController {
|
||||
@ApiOperation(value = "编辑任务进度甘特图-材料类型-关联信息", notes = "编辑任务进度甘特图-材料类型-关联信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<TaskProgressMaterialRel> edit(@RequestBody TaskProgressMaterialRel taskProgressMaterialRel) {
|
||||
taskProgressMaterialRelService.updateById(taskProgressMaterialRel);
|
||||
taskProgressMaterialRelService.edit(taskProgressMaterialRel);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ -157,13 +158,12 @@ public class TaskProgressMaterialRelController {
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@ApiOperation(value = "导出excel任务进度甘特图-计划材料工程", notes = "导出excel任务进度甘特图-计划材料工程", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "type", value = "类型:1下载模板2导出", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "type", value = "类型:1下载模板2导出", paramType = "body", required = true, dataType = "Integer"),
|
||||
})
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public void exportXls(@ApiIgnore @RequestBody HashMap<String, Object> paramMap, HttpServletResponse response) {
|
||||
|
||||
@ -84,7 +84,7 @@ public class TaskProgressMaterialTypeController {
|
||||
@ApiOperation(value = "添加任务进度甘特图-材料类型信息", notes = "添加任务进度甘特图-材料类型信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<TaskProgressMaterialType> add(@RequestBody TaskProgressMaterialType taskProgressMaterialType) {
|
||||
taskProgressMaterialTypeService.save(taskProgressMaterialType);
|
||||
taskProgressMaterialTypeService.add(taskProgressMaterialType);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ -97,14 +97,13 @@ public class TaskProgressMaterialTypeController {
|
||||
@ApiOperation(value = "编辑任务进度甘特图-材料类型信息", notes = "编辑任务进度甘特图-材料类型信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<TaskProgressMaterialType> edit(@RequestBody TaskProgressMaterialType taskProgressMaterialType) {
|
||||
taskProgressMaterialTypeService.updateById(taskProgressMaterialType);
|
||||
taskProgressMaterialTypeService.edit(taskProgressMaterialType);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除任务进度甘特图-材料类型信息", notes = "删除任务进度甘特图-材料类型信息", httpMethod = "POST")
|
||||
|
||||
@ -166,6 +166,9 @@ public class TaskProgress implements Serializable {
|
||||
@ApiModelProperty(value = "子节点列表")
|
||||
private List<TaskProgress> children;
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "任务进度甘特图-材料类型数量")
|
||||
private List<TaskProgressMaterialRel> relList;
|
||||
@ApiModelProperty(value = "任务进度甘特图-材料类型数量-实际用量")
|
||||
private List<TaskProgressMaterialRel> relActualList;
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "任务进度甘特图-材料类型数量-计划用量")
|
||||
private List<TaskProgressMaterialRelPlan> relPlanList;
|
||||
}
|
||||
|
||||
@ -46,18 +46,14 @@ public class TaskProgressMaterialRel implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty(value = "taskProgressContentId")
|
||||
private java.lang.Long taskProgressContentId;
|
||||
/**
|
||||
* 计划用量
|
||||
*/
|
||||
@Excel(name = "计划用量", width = 15)
|
||||
@ApiModelProperty(value = "计划用量")
|
||||
private java.lang.Double planUsage;
|
||||
|
||||
/**
|
||||
* 实际用量
|
||||
*/
|
||||
@Excel(name = "实际用量", width = 15)
|
||||
@ApiModelProperty(value = "实际用量")
|
||||
private java.lang.Double actualUsage;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ -84,11 +80,13 @@ public class TaskProgressMaterialRel implements Serializable {
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "名称(如工种、材料、设备名称等)")
|
||||
private java.lang.String name;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "类型:1工种2材料3设备")
|
||||
private java.lang.Integer type;
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "单位")
|
||||
private java.lang.String unit;
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "计划用量")
|
||||
private java.lang.Double planUsage;
|
||||
}
|
||||
|
||||
@ -0,0 +1,82 @@
|
||||
package com.zhgd.xmgl.modules.taskprogress.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 任务进度甘特图-材料类型-关联-计划用量
|
||||
* @author: pds
|
||||
* @date: 2023-10-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("task_progress_material_rel_plan")
|
||||
@ApiModel(value = "TaskProgressMaterialRel实体类", description = "TaskProgressMaterialRel")
|
||||
public class TaskProgressMaterialRelPlan implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 任务进度甘特图id
|
||||
*/
|
||||
@ApiModelProperty(value = "任务进度甘特图id")
|
||||
private Long taskProgressId;
|
||||
/**
|
||||
* taskProgressMaterialTypeId
|
||||
*/
|
||||
@ApiModelProperty(value = "taskProgressMaterialTypeId")
|
||||
private Long taskProgressMaterialTypeId;
|
||||
/**
|
||||
* 计划用量
|
||||
*/
|
||||
@Excel(name = "计划用量", width = 15)
|
||||
@ApiModelProperty(value = "计划用量")
|
||||
private Double planUsage;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createDate;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateDate;
|
||||
/**
|
||||
* 所属项目SN
|
||||
*/
|
||||
@Excel(name = "所属项目SN", width = 15)
|
||||
@ApiModelProperty(value = "所属项目SN")
|
||||
private String projectSn;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "名称(如工种、材料、设备名称等)")
|
||||
private java.lang.String name;
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "类型:1工种2材料3设备")
|
||||
private java.lang.Integer type;
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "单位")
|
||||
private java.lang.String unit;
|
||||
}
|
||||
@ -1,7 +1,5 @@
|
||||
package com.zhgd.xmgl.modules.taskprogress.mapper;
|
||||
|
||||
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgress;
|
||||
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialType;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
@ -20,7 +18,7 @@ public interface TaskProgressMaterialRelMapper extends BaseMapper<TaskProgressMa
|
||||
|
||||
List<TaskProgressMaterialRel> queryDetailListByContentIds(List<Long> ids);
|
||||
|
||||
List<TaskProgressMaterialRel> queryDetailList(HashMap<String, Object> paramMap);
|
||||
List<TaskProgressMaterialRel> queryNewestDetailList(HashMap<String, Object> paramMap);
|
||||
|
||||
List<TaskProgressMaterialRel> queryList(HashMap<String, Object> paramMap);
|
||||
List<TaskProgressMaterialRel> queryNewestActualList(HashMap<String, Object> paramMap);
|
||||
}
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
package com.zhgd.xmgl.modules.taskprogress.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel;
|
||||
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRelPlan;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 任务进度甘特图-材料类型-关联
|
||||
* @author: pds
|
||||
* @date: 2023-10-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface TaskProgressMaterialRelPlanMapper extends BaseMapper<TaskProgressMaterialRelPlan> {
|
||||
|
||||
List<TaskProgressMaterialRel> queryDetails(HashMap<String, Object> paramMap);
|
||||
|
||||
List<TaskProgressMaterialRelPlan> queryNewestPlanList(HashMap<String, Object> paramMap);
|
||||
}
|
||||
@ -12,7 +12,7 @@
|
||||
from task_progress tp
|
||||
left join system_user su on su.user_id = tp.duty_user_id
|
||||
where tp.project_sn = #{p.projectSn}
|
||||
<if test="p.status != null">
|
||||
<if test="p.status != null and p.status != ''">
|
||||
and tp.status = #{p.status}
|
||||
</if>
|
||||
<if test="p.taskName != null and p.taskName != ''">
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.zhgd.xmgl.modules.taskprogress.mapper.TaskProgressMaterialRelMapper">
|
||||
<select id="queryDetailListByContentIds"
|
||||
resultType="com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel">
|
||||
select tpmr.*, tpmt.type, tpmt.name,tpmt.unit
|
||||
select tpmr.*, tpmt.type, tpmt.name, tpmt.unit
|
||||
from task_progress_material_rel tpmr
|
||||
join task_progress_material_type tpmt on tpmt.id = tpmr.task_progress_material_type_id
|
||||
WHERE tpmr.task_progress_content_id in
|
||||
@ -12,7 +12,7 @@
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="queryDetailList" resultType="com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel">
|
||||
<select id="queryNewestDetailList" resultType="com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel">
|
||||
select tpmr.*, tpmt.type, tpmt.name
|
||||
from task_progress_material_rel tpmr
|
||||
join task_progress_material_type tpmt on tpmt.id = tpmr.task_progress_material_type_id
|
||||
@ -21,34 +21,35 @@
|
||||
from task_progress_material_rel tpmr
|
||||
join task_progress_material_type tpmt on tpmt.id = tpmr.task_progress_material_type_id
|
||||
where tpmr.task_progress_id = #{taskProgressId}
|
||||
<if test="type == '1'.toString()">
|
||||
and tpmr.plan_usage is not null
|
||||
</if>
|
||||
<if test="type == '2'.toString()">
|
||||
and tpmr.actual_usage is not null
|
||||
</if>
|
||||
order by tpmr.create_date desc) and tpmr.task_progress_id = #{taskProgressId}
|
||||
order by tpmr.create_date desc)
|
||||
and tpmr.task_progress_id = #{taskProgressId}
|
||||
</select>
|
||||
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel">
|
||||
select tpmr.*, tpmt.type, tpmt.name
|
||||
from task_progress_material_rel tpmr
|
||||
join task_progress_material_type tpmt on tpmt.id = tpmr.task_progress_material_type_id
|
||||
where tpmr.create_date in (
|
||||
select max(tpmr.create_date)
|
||||
from task_progress_material_rel tpmr
|
||||
join task_progress_material_type tpmt on tpmt.id = tpmr.task_progress_material_type_id
|
||||
where tpmr.task_progress_content_id in
|
||||
<select id="queryNewestActualList" resultType="com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel">
|
||||
SELECT tpmr.*,
|
||||
tpmt.type,
|
||||
tpmt.NAME
|
||||
FROM task_progress_material_type tpmt
|
||||
JOIN (
|
||||
SELECT *
|
||||
FROM task_progress_material_rel
|
||||
WHERE id IN (SELECT max(tpmr.id)
|
||||
FROM task_progress_material_rel tpmr
|
||||
JOIN task_progress_material_type tpmt ON tpmt.id = tpmr.task_progress_material_type_id
|
||||
where tpmr.task_progress_id in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
and tpmt.project_sn=#{projectSn}
|
||||
group by tpmr.task_progress_id
|
||||
) and
|
||||
tpmr.task_progress_content_id in
|
||||
and tpmt.project_sn = #{projectSn}
|
||||
GROUP BY tpmr.task_progress_id, tpmr.task_progress_material_type_id )) tpmr ON
|
||||
tpmt.id = tpmr.task_progress_material_type_id
|
||||
and tpmr.task_progress_id in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
and tpmt.project_sn=#{projectSn}
|
||||
and tpmt.project_sn = #{projectSn}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.taskprogress.mapper.TaskProgressMaterialRelPlanMapper">
|
||||
<select id="queryDetails" resultType="com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel">
|
||||
select *
|
||||
from task_progress_material_type t
|
||||
left join task_progress_material_rel_plan p
|
||||
on t.id = p.task_progress_material_type_id and p.task_progress_id = #{taskProgressId}
|
||||
where t.project_sn = #{projectSn}
|
||||
</select>
|
||||
|
||||
<select id="queryNewestPlanList" resultType="com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRelPlan">
|
||||
SELECT *
|
||||
FROM task_progress_material_type tpmt
|
||||
JOIN task_progress_material_rel_plan p ON p.task_progress_material_type_id = tpmt.id
|
||||
WHERE 1 = 1
|
||||
AND tpmt.project_sn = #{projectSn};
|
||||
</select>
|
||||
</mapper>
|
||||
@ -5,9 +5,7 @@ import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgress;
|
||||
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -20,11 +18,15 @@ import java.util.List;
|
||||
*/
|
||||
public interface ITaskProgressMaterialRelService extends IService<TaskProgressMaterialRel> {
|
||||
|
||||
List<TaskProgressMaterialRel> queryDetailList(HashMap<String, Object> paramMap);
|
||||
List<TaskProgressMaterialRel> queryNewestDetailList(HashMap<String, Object> paramMap);
|
||||
|
||||
List<TaskProgress> queryTreeList(HashMap<String, Object> paramMap);
|
||||
|
||||
void exportXls(HashMap<String, Object> paramMap, HttpServletResponse response);
|
||||
|
||||
Result<?> importExcel(MultipartFile file, HashMap<String, Object> paramMap);
|
||||
|
||||
void add(TaskProgressMaterialRel taskProgressMaterialRel);
|
||||
|
||||
void edit(TaskProgressMaterialRel taskProgressMaterialRel);
|
||||
}
|
||||
|
||||
@ -11,4 +11,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface ITaskProgressMaterialTypeService extends IService<TaskProgressMaterialType> {
|
||||
|
||||
void add(TaskProgressMaterialType taskProgressMaterialType);
|
||||
|
||||
void edit(TaskProgressMaterialType taskProgressMaterialType);
|
||||
}
|
||||
|
||||
@ -8,9 +8,11 @@ import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgress;
|
||||
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel;
|
||||
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRelPlan;
|
||||
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialType;
|
||||
import com.zhgd.xmgl.modules.taskprogress.mapper.TaskProgressMapper;
|
||||
import com.zhgd.xmgl.modules.taskprogress.mapper.TaskProgressMaterialRelMapper;
|
||||
import com.zhgd.xmgl.modules.taskprogress.mapper.TaskProgressMaterialRelPlanMapper;
|
||||
import com.zhgd.xmgl.modules.taskprogress.mapper.TaskProgressMaterialTypeMapper;
|
||||
import com.zhgd.xmgl.modules.taskprogress.service.ITaskProgressMaterialRelService;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
@ -44,6 +46,8 @@ public class TaskProgressMaterialRelServiceImpl extends ServiceImpl<TaskProgress
|
||||
@Autowired
|
||||
TaskProgressMaterialRelMapper taskProgressMaterialRelMapper;
|
||||
@Autowired
|
||||
TaskProgressMaterialRelPlanMapper taskProgressMaterialRelPlanMapper;
|
||||
@Autowired
|
||||
TaskProgressMapper taskProgressMapper;
|
||||
@Autowired
|
||||
TaskProgressServiceImpl taskProgressService;
|
||||
@ -51,11 +55,10 @@ public class TaskProgressMaterialRelServiceImpl extends ServiceImpl<TaskProgress
|
||||
TaskProgressMaterialTypeMapper taskProgressMaterialTypeMapper;
|
||||
|
||||
@Override
|
||||
public List<TaskProgressMaterialRel> queryDetailList(HashMap<String, Object> paramMap) {
|
||||
paramMap.put("type", 1);
|
||||
List<TaskProgressMaterialRel> relList1 = taskProgressMaterialRelMapper.queryDetailList(paramMap);
|
||||
public List<TaskProgressMaterialRel> queryNewestDetailList(HashMap<String, Object> paramMap) {
|
||||
List<TaskProgressMaterialRel> relList1 = taskProgressMaterialRelPlanMapper.queryDetails(paramMap);
|
||||
paramMap.put("type", 2);
|
||||
List<TaskProgressMaterialRel> relList2 = taskProgressMaterialRelMapper.queryDetailList(paramMap);
|
||||
List<TaskProgressMaterialRel> relList2 = taskProgressMaterialRelMapper.queryNewestDetailList(paramMap);
|
||||
Map<Long, TaskProgressMaterialRel> actualMap = relList2.stream().collect(Collectors.toMap(TaskProgressMaterialRel::getTaskProgressMaterialTypeId, Function.identity(), (taskProgressMaterialRel, taskProgressMaterialRel2) -> taskProgressMaterialRel));
|
||||
for (TaskProgressMaterialRel rel : relList1) {
|
||||
TaskProgressMaterialRel r = actualMap.get(rel.getTaskProgressMaterialTypeId());
|
||||
@ -71,10 +74,49 @@ public class TaskProgressMaterialRelServiceImpl extends ServiceImpl<TaskProgress
|
||||
List<Long> ids = progressTaskList.stream().map(TaskProgress::getId).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(ids)) {
|
||||
paramMap.put("list", ids);
|
||||
List<TaskProgressMaterialRel> taskProgresses = taskProgressMaterialRelMapper.queryList(paramMap);
|
||||
List<TaskProgressMaterialType> types = taskProgressMaterialTypeMapper.selectList(new LambdaQueryWrapper<TaskProgressMaterialType>()
|
||||
.eq(TaskProgressMaterialType::getProjectSn, projectSn));
|
||||
|
||||
//设置relActualList
|
||||
List<TaskProgressMaterialRel> taskProgresses = taskProgressMaterialRelMapper.queryNewestActualList(paramMap);
|
||||
Map<Long, List<TaskProgressMaterialRel>> taskProgressIdMap = taskProgresses.stream().collect(Collectors.groupingBy(TaskProgressMaterialRel::getTaskProgressId));
|
||||
List<TaskProgressMaterialRelPlan> plans = taskProgressMaterialRelPlanMapper.queryNewestPlanList(paramMap);
|
||||
Map<Long, List<TaskProgressMaterialRelPlan>> planMap = plans.stream().collect(Collectors.groupingBy(TaskProgressMaterialRelPlan::getTaskProgressId));
|
||||
for (TaskProgress taskProgress : progressTaskList) {
|
||||
taskProgress.setRelList(taskProgressIdMap.get(taskProgress.getId()));
|
||||
//对relActualList补全
|
||||
List<TaskProgressMaterialRel> relActualList = taskProgressIdMap.get(taskProgress.getId());
|
||||
relActualList = CollUtil.isEmpty(relActualList) ? new ArrayList<>() : relActualList;
|
||||
Map<Long, TaskProgressMaterialRel> m = relActualList.stream().collect(Collectors.toMap(TaskProgressMaterialRel::getTaskProgressMaterialTypeId, Function.identity()));
|
||||
List<TaskProgressMaterialRel> rl = new ArrayList<>();
|
||||
for (TaskProgressMaterialType type : types) {
|
||||
TaskProgressMaterialRel r = m.get(type.getId());
|
||||
if (r == null) {
|
||||
r = new TaskProgressMaterialRel();
|
||||
r.setActualUsage(0D);
|
||||
r.setName(type.getName());
|
||||
}
|
||||
rl.add(r);
|
||||
}
|
||||
//设置relActualList
|
||||
taskProgress.setRelActualList(rl);
|
||||
|
||||
|
||||
//设置relPlanList
|
||||
List<TaskProgressMaterialRelPlan> planList = new ArrayList<>();
|
||||
List<TaskProgressMaterialRelPlan> pl = planMap.get(taskProgress.getId());
|
||||
pl = CollUtil.isEmpty(pl) ? new ArrayList<>() : pl;
|
||||
Map<Long, TaskProgressMaterialRelPlan> pM = pl.stream().collect(Collectors.toMap(TaskProgressMaterialRelPlan::getTaskProgressMaterialTypeId, Function.identity()));
|
||||
for (TaskProgressMaterialType type : types) {
|
||||
TaskProgressMaterialRelPlan r = pM.get(type.getId());
|
||||
if (r == null) {
|
||||
r = new TaskProgressMaterialRelPlan();
|
||||
r.setPlanUsage(0D);
|
||||
r.setName(type.getName());
|
||||
}
|
||||
planList.add(r);
|
||||
}
|
||||
//设置relPlanList
|
||||
taskProgress.setRelPlanList(planList);
|
||||
}
|
||||
}
|
||||
Map<Long, List<TaskProgress>> parentIdTaskListMap = progressTaskList.stream().collect(Collectors.groupingBy(TaskProgress::getParentId));
|
||||
@ -89,9 +131,9 @@ public class TaskProgressMaterialRelServiceImpl extends ServiceImpl<TaskProgress
|
||||
String plan = "计划情况";
|
||||
String actual = "实际情况";
|
||||
// 树形转为list
|
||||
List<TaskProgress> result = new ArrayList<>();
|
||||
List<TaskProgress> resultList = new ArrayList<>();
|
||||
for (TaskProgress taskProgress : taskProgresses) {
|
||||
this.recursionTreeToList(result, taskProgress);
|
||||
this.recursionTreeToList(resultList, taskProgress);
|
||||
}
|
||||
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||
entityList.add(new ExcelExportEntity("id", "id"));
|
||||
@ -111,7 +153,7 @@ public class TaskProgressMaterialRelServiceImpl extends ServiceImpl<TaskProgress
|
||||
if (CollectionUtils.isEmpty(pids)) {
|
||||
throw new OpenAlertException("请先添加材料类型");
|
||||
}
|
||||
List<String> aids = taskProgressMaterialRels.stream().map(o -> p + o.getId() + "").collect(Collectors.toList());
|
||||
List<String> aids = taskProgressMaterialRels.stream().map(o -> a + o.getId() + "").collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(aids)) {
|
||||
throw new OpenAlertException("请先添加材料类型");
|
||||
}
|
||||
@ -128,18 +170,24 @@ public class TaskProgressMaterialRelServiceImpl extends ServiceImpl<TaskProgress
|
||||
|
||||
List<Map<Object, String>> list = new ArrayList<>();
|
||||
Map<Object, String> map;
|
||||
for (TaskProgress taskProgress : result) {
|
||||
List<TaskProgressMaterialRel> relList = taskProgress.getRelList();
|
||||
for (TaskProgress taskProgress : resultList) {
|
||||
List<TaskProgressMaterialRel> relActualList = taskProgress.getRelActualList();
|
||||
List<TaskProgressMaterialRelPlan> relPlanList = taskProgress.getRelPlanList();
|
||||
map = new HashMap<>();
|
||||
map.put("id", String.valueOf(taskProgress.getId()));
|
||||
map.put("pid", String.valueOf(taskProgress.getParentId()));
|
||||
map.put("taskName", taskProgress.getTaskName());
|
||||
if (CollUtil.isNotEmpty(relList) && Objects.equals(type, 2)) {
|
||||
for (TaskProgressMaterialRel rel : relList) {
|
||||
map.put(p + rel.getTaskProgressMaterialTypeId() + "", rel.getPlanUsage() + "");
|
||||
//导出
|
||||
if (CollUtil.isNotEmpty(relActualList) && Objects.equals(type, 2)) {
|
||||
for (TaskProgressMaterialRel rel : relActualList) {
|
||||
map.put(a + rel.getTaskProgressMaterialTypeId() + "", rel.getActualUsage() + "");
|
||||
}
|
||||
}
|
||||
if (CollUtil.isNotEmpty(relPlanList) && Objects.equals(type, 2)) {
|
||||
for (TaskProgressMaterialRelPlan rel : relPlanList) {
|
||||
map.put(p + rel.getTaskProgressMaterialTypeId() + "", rel.getPlanUsage() + "");
|
||||
}
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), entityList, list);
|
||||
@ -163,6 +211,7 @@ public class TaskProgressMaterialRelServiceImpl extends ServiceImpl<TaskProgress
|
||||
for (Map<String, String> m : mapList) {
|
||||
Set<String> keys = m.keySet();
|
||||
for (String key : keys) {
|
||||
//数据列
|
||||
if (StringUtils.startsWith(key, plan)) {
|
||||
String trueKey;
|
||||
if (StringUtils.startsWith(key, plan)) {
|
||||
@ -176,12 +225,31 @@ public class TaskProgressMaterialRelServiceImpl extends ServiceImpl<TaskProgress
|
||||
if (type == null) {
|
||||
throw new OpenAlertException("材料类型不存在");
|
||||
}
|
||||
//插入实际
|
||||
TaskProgressMaterialRel rel = new TaskProgressMaterialRel();
|
||||
rel.setTaskProgressId(MapUtils.getLong(m, "id"));
|
||||
Long progressId = MapUtils.getLong(m, "id");
|
||||
rel.setTaskProgressId(progressId);
|
||||
rel.setTaskProgressMaterialTypeId(type.getId());
|
||||
rel.setPlanUsage(MapUtils.getDouble(m, plan + trueKey));
|
||||
rel.setActualUsage(MapUtils.getDouble(m, actual + trueKey));
|
||||
rel.setProjectSn(projectSn);
|
||||
taskProgressMaterialRelMapper.insert(rel);
|
||||
|
||||
//保存计划
|
||||
TaskProgressMaterialRelPlan p = taskProgressMaterialRelPlanMapper.selectOne(new LambdaQueryWrapper<TaskProgressMaterialRelPlan>()
|
||||
.eq(TaskProgressMaterialRelPlan::getTaskProgressMaterialTypeId, type.getId())
|
||||
.eq(TaskProgressMaterialRelPlan::getTaskProgressId, progressId)
|
||||
);
|
||||
if (p == null) {
|
||||
p = new TaskProgressMaterialRelPlan();
|
||||
p.setPlanUsage(MapUtils.getDouble(m, plan + trueKey));
|
||||
p.setTaskProgressId(progressId);
|
||||
p.setTaskProgressMaterialTypeId(type.getId());
|
||||
p.setProjectSn(type.getProjectSn());
|
||||
taskProgressMaterialRelPlanMapper.insert(p);
|
||||
} else {
|
||||
p.setPlanUsage(MapUtils.getDouble(m, plan + trueKey));
|
||||
taskProgressMaterialRelPlanMapper.updateById(p);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -199,6 +267,17 @@ public class TaskProgressMaterialRelServiceImpl extends ServiceImpl<TaskProgress
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(TaskProgressMaterialRel taskProgressMaterialRel) {
|
||||
save(taskProgressMaterialRel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(TaskProgressMaterialRel taskProgressMaterialRel) {
|
||||
updateById(taskProgressMaterialRel);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 递归把传过来的tree转为list
|
||||
*
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.taskprogress.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialType;
|
||||
import com.zhgd.xmgl.modules.taskprogress.mapper.TaskProgressMaterialTypeMapper;
|
||||
import com.zhgd.xmgl.modules.taskprogress.service.ITaskProgressMaterialTypeService;
|
||||
@ -16,4 +18,27 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@Service
|
||||
public class TaskProgressMaterialTypeServiceImpl extends ServiceImpl<TaskProgressMaterialTypeMapper, TaskProgressMaterialType> implements ITaskProgressMaterialTypeService {
|
||||
|
||||
@Override
|
||||
public void add(TaskProgressMaterialType taskProgressMaterialType) {
|
||||
TaskProgressMaterialType type = baseMapper.selectOne(new LambdaQueryWrapper<TaskProgressMaterialType>()
|
||||
.eq(TaskProgressMaterialType::getName, taskProgressMaterialType.getName())
|
||||
.eq(TaskProgressMaterialType::getProjectSn, taskProgressMaterialType.getProjectSn()));
|
||||
if (type == null) {
|
||||
throw new OpenAlertException("名称已存在");
|
||||
}
|
||||
save(taskProgressMaterialType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(TaskProgressMaterialType taskProgressMaterialType) {
|
||||
TaskProgressMaterialType type = baseMapper.selectOne(new LambdaQueryWrapper<TaskProgressMaterialType>()
|
||||
.eq(TaskProgressMaterialType::getName, taskProgressMaterialType.getName())
|
||||
.eq(TaskProgressMaterialType::getProjectSn, taskProgressMaterialType.getProjectSn())
|
||||
.ne(TaskProgressMaterialType::getId, taskProgressMaterialType.getId())
|
||||
);
|
||||
if (type == null) {
|
||||
throw new OpenAlertException("名称已存在");
|
||||
}
|
||||
updateById(taskProgressMaterialType);
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ public class QYUfaceUtil {
|
||||
* @param phone 电话
|
||||
* @param idNum 证件号
|
||||
* @param icNum IC 卡号
|
||||
* @param ethnic IC 卡号
|
||||
* @param ethnic 民族
|
||||
* @param gender 1:男 2:女 3:未知
|
||||
* @param birthday 出生日期(yyyy-MM-dd)
|
||||
* @return
|
||||
|
||||
@ -106,7 +106,6 @@ public class ${entityName}Controller {
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除${tableVo.ftlDescription}信息", notes = "删除${tableVo.ftlDescription}信息" , httpMethod="POST")
|
||||
|
||||
@ -111,7 +111,6 @@ public class ${entityName}Controller {
|
||||
result.error500("未找到对应实体");
|
||||
}else {
|
||||
boolean ok = ${entityName?uncap_first}Service.updateById(${entityName?uncap_first});
|
||||
//TODO 返回false说明什么?
|
||||
if(ok) {
|
||||
result.success("修改成功!");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user