diff --git a/src/main/java/com/zhgd/jeecg/common/system/query/QueryGenerator.java b/src/main/java/com/zhgd/jeecg/common/system/query/QueryGenerator.java index 7c83ec7ba..2d9ac587b 100644 --- a/src/main/java/com/zhgd/jeecg/common/system/query/QueryGenerator.java +++ b/src/main/java/com/zhgd/jeecg/common/system/query/QueryGenerator.java @@ -75,32 +75,45 @@ public class QueryGenerator { public static QueryWrapper initQueryWrapper(T searchObj) { long start = System.currentTimeMillis(); QueryWrapper queryWrapper = new QueryWrapper(); - installMplus1(queryWrapper, searchObj, null, null, null, null); + installMplus1(queryWrapper, searchObj, null, null, null, null, false); log.info("---查询条件构造器初始化完成,耗时:" + (System.currentTimeMillis() - start) + "毫秒----"); return queryWrapper; } + public static QueryWrapper initPageQueryWrapper(Class t, Map map, String alias, List excludeFields, List likeFields) { + return initPageQueryWrapper(t, map, alias, excludeFields, likeFields, false); + } + /** * 获取查询条件构造器QueryWrapper实例 通用查询条件已被封装完成 * * @param map 查询map * @param likeFields RefUtil.fieldNames + * @param allSearch * @return QueryWrapper实例 */ - public static QueryWrapper initPageQueryWrapper(Class t, Map map, String alias, List excludeFields, List likeFields) { + public static QueryWrapper initPageQueryWrapper(Class t, Map map, String alias, List excludeFields, List likeFields, boolean allSearch) { long start = System.currentTimeMillis(); QueryWrapper queryWrapper = new QueryWrapper(); - installMplus1(queryWrapper, JSONObject.parseObject(JSONObject.toJSONString(map), t), initParamMap(map), alias, excludeFields, likeFields); + installMplus1(queryWrapper, JSONObject.parseObject(JSONObject.toJSONString(map), t), initParamMap(map), alias, excludeFields, likeFields, allSearch); log.info("---查询条件构造器初始化完成,耗时:" + (System.currentTimeMillis() - start) + "毫秒----"); return queryWrapper; } + public static QueryWrapper initPageQueryWrapper(Class t, Map map, String alias, boolean allSearch) { + return initPageQueryWrapper(t, map, alias, null, null, allSearch); + } + public static QueryWrapper initPageQueryWrapper(Class t, Map map, String alias) { - return initPageQueryWrapper(t, map, alias, null, null); + return initPageQueryWrapper(t, map, alias, null, null, false); + } + + public static QueryWrapper initPageQueryWrapper(Class t, Map map, boolean allSearch) { + return initPageQueryWrapper(t, map, null, allSearch); } public static QueryWrapper initPageQueryWrapper(Class t, Map map) { - return initPageQueryWrapper(t, map, null); + return initPageQueryWrapper(t, map, null, false); } private static Map initParamMap(Map map) { @@ -122,7 +135,7 @@ public class QueryGenerator { *
正确示例:QueryWrapper queryWrapper = new QueryWrapper(); *
3.也可以不使用这个方法直接调用 {@link #initQueryWrapper}直接获取实例 */ - public static void installMplus1(QueryWrapper queryWrapper, Object searchObj, Map parameterMap, String alias, List excludeFields, List likeFields) { + public static void installMplus1(QueryWrapper queryWrapper, Object searchObj, Map parameterMap, String alias, List excludeFields, List likeFields, boolean allSearch) { /* * 注意:权限查询由前端配置数据规则 当一个人有多个所属部门时候 可以在规则配置包含条件 orgCode 包含 #{sys_org_code} @@ -145,7 +158,7 @@ public class QueryGenerator { name = origDescriptors[i].getName(); type = origDescriptors[i].getPropertyType().toString(); try { - if (judgedIsUselessField(name) || !PropertyUtils.isReadable(searchObj, name) || !isExistTable(searchObj, name) || (excludeFields != null && excludeFields.contains(name))) { + if (judgedIsUselessField(name) || !PropertyUtils.isReadable(searchObj, name) || !isExistTable(searchObj, name, allSearch) || (excludeFields != null && excludeFields.contains(name))) { continue; } //模糊查询 @@ -207,6 +220,7 @@ public class QueryGenerator { /** * 多字段排序 TODO1 需要修改前端 + * * @param queryWrapper * @param parameterMap * @param alias @@ -535,7 +549,7 @@ public class QueryGenerator { name = origDescriptors[i].getName(); type = origDescriptors[i].getPropertyType().toString(); try { - if (!isExistTable(searchObj, name)) { + if (!isExistTable(searchObj, name, false)) { continue; } if (judgedIsUselessField(name) || !PropertyUtils.isReadable(searchObj, name) || (excludeFields != null && excludeFields.contains(name))) { @@ -597,7 +611,10 @@ public class QueryGenerator { doSuperQuery(queryWrapper, parameterMap, defaultAlias); } - private static boolean isExistTable(Object searchObj, String name) { + private static boolean isExistTable(Object searchObj, String name, boolean allSearch) { + if (allSearch) { + return true; + } Field field = ReflectUtil.getField(searchObj.getClass(), name); Object queryEndTime = AnnotationUtil.getAnnotationValue(field, TableField.class, "exist"); return !Objects.equals(queryEndTime, false); diff --git a/src/main/java/com/zhgd/xmgl/constant/Cts.java b/src/main/java/com/zhgd/xmgl/constant/Cts.java index 5fce21b8e..99852b848 100644 --- a/src/main/java/com/zhgd/xmgl/constant/Cts.java +++ b/src/main/java/com/zhgd/xmgl/constant/Cts.java @@ -111,4 +111,5 @@ public interface Cts { String S1111 = "_"; String STR1112 = "."; String S32434 = "."; + String LIMIT_1 = "limit 1"; } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/Notice.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/Notice.java index c85a58fff..22fce1e2f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/Notice.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/Notice.java @@ -28,14 +28,9 @@ public class Notice implements Serializable { @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(value = "消息通知") private java.lang.Long id; - /** - * 类型,1考勤提醒,2人员报警,3车辆,4混凝土监测,5卸料平台,6配电箱,7扬尘,8视频,9标养室,10安全检查,11质量检查,12塔吊,13升降机," - * "14电表,15水表,16访客,17,防疫人员通知,18访客通知,19巡检点,20人员的资质证书即将到期,21人员的合同信息即将到期,22人员的保险信息即将到期," - * "23同步人员到海康isc,24同步车辆到海康isc,25同步组织到海康isc 30工作流审批通知,31大屏的安全和质量,32大屏的危大,33应急处置 - */ @ApiModelProperty(value = "类型,1考勤提醒,2人员报警,3车辆,4混凝土监测,5卸料平台,6配电箱,7扬尘,8视频,9标养室,10安全检查,11质量检查,12塔吊,13升降机," + "14电表,15水表,16访客,17,防疫人员通知,18访客通知,19巡检点,20人员的资质证书即将到期,21人员的合同信息即将到期,22人员的保险信息即将到期," + - "23同步人员到海康isc,24同步车辆到海康isc,25同步组织到海康isc 30工作流审批通知,31大屏的安全和质量,32大屏的危大,33应急处置") + "23同步人员到海康isc,24同步车辆到海康isc,25同步组织到海康isc 30工作流审批通知,31大屏的安全和质量,32大屏的危大,33应急处置,34车辆不安全行为识别监测") private java.lang.String type; /** * 消息内容 diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/SystemLogoConfig.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/SystemLogoConfig.java index 3c8e3b94c..29fff6b34 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/SystemLogoConfig.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/SystemLogoConfig.java @@ -104,6 +104,8 @@ public class SystemLogoConfig implements Serializable { private java.lang.Integer certificateExpireWarnAheadDay; @ApiModelProperty(value = "是否显示资料中心0不显示1显示") private java.lang.Integer showFileCenter; + @ApiModelProperty(value = "是否开启用户密码超期重置") + private java.lang.Integer enablePasswordReset; @TableField(exist = false) private java.lang.String fileStorageType; } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/SystemUserServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/SystemUserServiceImpl.java index 661a905fd..b30b3b1a4 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/SystemUserServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/SystemUserServiceImpl.java @@ -382,6 +382,18 @@ public class SystemUserServiceImpl extends ServiceImpl m = new HashMap<>(16); + m.put("expire", true); + m.put("userId", systemUser.getUserId()); + m.put("account", systemUser.getAccount()); + m.put("msg", "需要修改密码"); + m.put("token", jwtTokenProvider.createToken(systemUser.getAccount(), 3600)); + return m; + } + } } return result; } else { @@ -439,6 +451,18 @@ public class SystemUserServiceImpl extends ServiceImpl m = new HashMap<>(16); + m.put("expire", true); + m.put("userId", systemUser.getUserId()); + m.put("account", systemUser.getAccount()); + m.put("msg", "需要修改密码"); + m.put("token", jwtTokenProvider.createToken(systemUser.getAccount(), 3600)); + return m; + } + } String token = jwtTokenProvider.createToken(account, companyConfig.getEffectiveTime(), slc != null ? slc.getLoginTimeOut() : null); UserEnterprise userEnterprise = userEnterpriseService.selectUserEnterpriseByUserId(systemUser.getUserId()); if (userEnterprise != null) { @@ -978,7 +1002,7 @@ public class SystemUserServiceImpl extends ServiceImpl list = historyService.createHistoricProcessInstanceQuery().unfinished().list(); if (list.size() > 0) { @@ -1546,17 +1570,6 @@ public class SystemUserServiceImpl extends ServiceImpl m = new HashMap<>(16); - m.put("expire", true); - m.put("userId", systemUser.getUserId()); - m.put("account", systemUser.getAccount()); - m.put("msg", "需要修改密码"); - m.put("token", jwtTokenProvider.createToken(systemUser.getAccount(), 3600)); - return m; - } - authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(account, systemUser.getShowPassword())); return doLogin(map, systemUser); diff --git a/src/main/java/com/zhgd/xmgl/modules/checking/controller/CheckingPointController.java b/src/main/java/com/zhgd/xmgl/modules/checking/controller/CheckingPointController.java index f6dd3a3d2..30b89b875 100644 --- a/src/main/java/com/zhgd/xmgl/modules/checking/controller/CheckingPointController.java +++ b/src/main/java/com/zhgd/xmgl/modules/checking/controller/CheckingPointController.java @@ -140,6 +140,7 @@ public class CheckingPointController { @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "body", required = false, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "body", required = false, dataType = "Integer"), @ApiImplicitParam(name = "xzCheckingRouteTaskId", value = "星纵-巡检路线的任务Id", paramType = "body", required = false, dataType = "String"), + @ApiImplicitParam(name = "checkingPointId", value = "巡检点表id", paramType = "body", required = false, dataType = "String"), }) @PostMapping(value = "/getTaskDetailPage") public Result> getTaskDetailPage(@ApiIgnore @RequestBody Map param) { diff --git a/src/main/java/com/zhgd/xmgl/modules/checking/entity/CheckingPointInfo.java b/src/main/java/com/zhgd/xmgl/modules/checking/entity/CheckingPointInfo.java index 62d80bae7..584262850 100644 --- a/src/main/java/com/zhgd/xmgl/modules/checking/entity/CheckingPointInfo.java +++ b/src/main/java/com/zhgd/xmgl/modules/checking/entity/CheckingPointInfo.java @@ -189,5 +189,17 @@ public class CheckingPointInfo implements Serializable { @TableField(exist = false) @ApiModelProperty(value = "合作单位") private java.lang.String enterpriseName; + /** + * 经度 + */ + @TableField(exist = false) + @ApiModelProperty("经度") + private Double longitude; + /** + * 维度 + */ + @TableField(exist = false) + @ApiModelProperty("维度") + private Double latitude; } diff --git a/src/main/java/com/zhgd/xmgl/modules/checking/mapper/xml/CheckingPointInfoMapper.xml b/src/main/java/com/zhgd/xmgl/modules/checking/mapper/xml/CheckingPointInfoMapper.xml index a85f378b4..2e4fe03a2 100644 --- a/src/main/java/com/zhgd/xmgl/modules/checking/mapper/xml/CheckingPointInfoMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/checking/mapper/xml/CheckingPointInfoMapper.xml @@ -16,7 +16,9 @@ xcrt.item_name, (SELECT group_concat(nu.enterprise_name) FROM enterprise_info nu - WHERE find_in_set(nu.id, cp.enterprise_id)) as enterprise_name + WHERE find_in_set(nu.id, cp.enterprise_id)) as enterprise_name, + cp.latitude, + cp.longitude from checking_point_info t join checking_point cp on t.checking_point_id = cp.id left join system_user su on t.checking_point_user_id = su.user_id diff --git a/src/main/java/com/zhgd/xmgl/modules/checking/mapper/xml/CheckingPointMapper.xml b/src/main/java/com/zhgd/xmgl/modules/checking/mapper/xml/CheckingPointMapper.xml index 05c231f32..b13b6ad02 100644 --- a/src/main/java/com/zhgd/xmgl/modules/checking/mapper/xml/CheckingPointMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/checking/mapper/xml/CheckingPointMapper.xml @@ -140,9 +140,11 @@ join xz_checking_route_task xcrt on xcr.id = xcrt.xz_checking_route_id left join checking_point_info t on t.checking_point_id = cp.id and t.xz_checking_route_task_id = xcrt.id left join system_user su on t.checking_point_user_id = su.user_id - left join enterprise_info ei on find_in_set(ei.id,cp.enterprise_id) left join system_user uo on t.operate_id = uo.user_id left join quality_region qr on qr.id = cp.quality_region_id WHERE xcrt.id = #{param.xzCheckingRouteTaskId} + + and xcrtp.checking_point_id = #{param.checkingPointId} + diff --git a/src/main/java/com/zhgd/xmgl/modules/exam/controller/ExamQuestionBankController.java b/src/main/java/com/zhgd/xmgl/modules/exam/controller/ExamQuestionBankController.java index 6a3ca6651..e69d80767 100644 --- a/src/main/java/com/zhgd/xmgl/modules/exam/controller/ExamQuestionBankController.java +++ b/src/main/java/com/zhgd/xmgl/modules/exam/controller/ExamQuestionBankController.java @@ -363,6 +363,7 @@ public class ExamQuestionBankController { * @param response * @return */ + @OperLog(operModul = "题目管理", operType = "导入", operDesc = "通过excel导入题目管理信息") @ApiOperation(value = "通过excel导入题目管理信息", notes = "通过excel导入题目管理信息", httpMethod = "POST") @RequestMapping(value = "/importExcel", method = RequestMethod.POST) public Result importExcel(HttpServletRequest request, HttpServletResponse response) { @@ -371,6 +372,7 @@ public class ExamQuestionBankController { List subList = examSubjectService.list(); UserInfo user = SecurityUtils.getUser(); SystemUser systemUser = systemUserService.getById(user.getUserId()); + String projectSn = request.getParameter("projectSn"); for (Map.Entry entity : fileMap.entrySet()) { MultipartFile file = entity.getValue();// 获取上传文件对象 try { @@ -408,7 +410,7 @@ public class ExamQuestionBankController { } catch (Exception e) { throw new CustomException("分数格式错误,请填写正确的分数", HttpStatus.INTERNAL_SERVER_ERROR); } - examQuestionBank.setProjectSn(systemUser.getSn()); + examQuestionBank.setProjectSn(projectSn); examQuestionBank.setCreateBy(systemUser.getUserId().toString()); examQuestionBank.setCreateTime(new Date()); examQuestionBank.setUpdateBy(systemUser.getUserId().toString()); diff --git a/src/main/java/com/zhgd/xmgl/modules/quality/entity/QualityRectifyRecord.java b/src/main/java/com/zhgd/xmgl/modules/quality/entity/QualityRectifyRecord.java index b3684695a..d223ef69f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/quality/entity/QualityRectifyRecord.java +++ b/src/main/java/com/zhgd/xmgl/modules/quality/entity/QualityRectifyRecord.java @@ -72,11 +72,17 @@ public class QualityRectifyRecord implements Serializable { @ApiModelProperty(value = "创建时间") private java.lang.String createTime; /** - * 创建时间 + * 创建人 */ @Excel(name = "创建人", width = 15) @ApiModelProperty(value = "创建人") private java.lang.Long createUser; + /** + * 违章人员 + */ + @Excel(name = "违章人员", width = 15) + @ApiModelProperty(value = "违章人员") + private Long violatorId; @TableField(exist = false) private String realName; diff --git a/src/main/java/com/zhgd/xmgl/modules/quality/service/impl/QualityInspectionRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/quality/service/impl/QualityInspectionRecordServiceImpl.java index 296ff7dbc..7cf33d23e 100644 --- a/src/main/java/com/zhgd/xmgl/modules/quality/service/impl/QualityInspectionRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/quality/service/impl/QualityInspectionRecordServiceImpl.java @@ -295,54 +295,6 @@ public class QualityInspectionRecordServiceImpl extends ServiceImpl map = new HashMap<>(16); - map.put("id", workerInfo.getId()); - map.put("deductScore", ds); - workerInfoService.updateScoreSendAuth(map); - - - //存记录 - XzDeductScoreRecord vo = new XzDeductScoreRecord(); - vo.setProjectSn(hiddenDangerInspectRecord.getProjectSn()); - vo.setWorkerId(workerInfo.getId()); - vo.setTypeName(item.getContent()); - vo.setDeductScore(-item.getDeductScore()); - vo.setType(3); - vo.setCreateDate(new Date()); - vo.setCurScore(workerInfo.getSafeScore() - item.getDeductScore() >= 0 ? workerInfo.getSafeScore() - item.getDeductScore() : 0); - vo.setDeductReason(StrUtil.format("您在{}发现质量隐患({}-{})扣{}分", DateUtil.format(vo.getCreateDate(), "yyyy年MM月dd日HH:mm:ss"), "质量检査", vo.getTypeName() == null ? "无" : vo.getTypeName(), item.getDeductScore())); - vo.setTypeTableId(hiddenDangerInspectRecord.getId()); - xzDeductScoreRecordMapper.insert(vo); } @Override @@ -580,7 +532,6 @@ public class QualityInspectionRecordServiceImpl extends ServiceImpl selectRectifyRecordList(Map map) { @@ -128,7 +153,7 @@ public class QualityRectifyRecordServiceImpl extends ServiceImpl() + .eq(QualityRectifyRecord::getQualityId, qualityRectifyRecord.getQualityId()) + .eq(QualityRectifyRecord::getStatus, 2) + .eq(QualityRectifyRecord::getType, 1) + .orderByDesc(QualityRectifyRecord::getRectifyTime).last(Cts.LIMIT_1)); + Long changeUser = rectifyRecord.getViolatorId(); + if (changeUser == null) { + return; + } + WorkerInfo workerInfo = workerInfoMapper.selectById(changeUser); + if (workerInfo == null) { + return; + } + + //扣分 + HashMap map = new HashMap<>(16); + map.put("id", workerInfo.getId()); + map.put("deductScore", ds); + workerInfoService.updateScoreSendAuth(map); + + + //存记录 + XzDeductScoreRecord vo = new XzDeductScoreRecord(); + vo.setProjectSn(qualityInspectionRecord.getProjectSn()); + vo.setWorkerId(workerInfo.getId()); + vo.setTypeName(item.getContent()); + vo.setDeductScore(-item.getDeductScore()); + vo.setType(3); + vo.setCreateDate(new Date()); + vo.setCurScore(workerInfo.getSafeScore() - item.getDeductScore() >= 0 ? workerInfo.getSafeScore() - item.getDeductScore() : 0); + vo.setDeductReason(StrUtil.format("您在{}发现质量隐患({}-{})扣{}分", DateUtil.format(vo.getCreateDate(), "yyyy年MM月dd日HH:mm:ss"), "质量检査", vo.getTypeName() == null ? "无" : vo.getTypeName(), item.getDeductScore())); + vo.setTypeTableId(qualityInspectionRecord.getId()); + xzDeductScoreRecordMapper.insert(vo); + } + + @Override public void qualityInspectionRecordRectifyExportExcel(Map map, HttpServletResponse response) throws IOException { String fileName = "qualityInspectionRecordRectifyTemplate.xls"; diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/emergency/service/impl/XzEmergencyPushServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/xz/emergency/service/impl/XzEmergencyPushServiceImpl.java index 8f3274c91..d8fd61fc3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/emergency/service/impl/XzEmergencyPushServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/emergency/service/impl/XzEmergencyPushServiceImpl.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zhgd.jeecg.common.execption.OpenAlertException; +import com.zhgd.xmgl.constant.Cts; import com.zhgd.xmgl.modules.xz.emergency.entity.XzEmergencyPush; import com.zhgd.xmgl.modules.xz.emergency.mapper.XzEmergencyPushMapper; import com.zhgd.xmgl.modules.xz.emergency.service.IXzEmergencyPushService; @@ -66,6 +67,7 @@ public class XzEmergencyPushServiceImpl extends ServiceImpl() .eq(XzEmergencyPush::getProjectSn, xzEmergencyPush.getProjectSn()) .eq(XzEmergencyPush::getEnterpriseId, xzEmergencyPush.getEnterpriseId()) + .last(Cts.IGNORE_DATA_SCOPE_CONDITION) ); if (oldXzEmergencyPush == null) { add(xzEmergencyPush); diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/emergency/service/impl/XzEmergencyRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/xz/emergency/service/impl/XzEmergencyRecordServiceImpl.java index 7a8f80535..c5ae50cf5 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/emergency/service/impl/XzEmergencyRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/emergency/service/impl/XzEmergencyRecordServiceImpl.java @@ -233,7 +233,7 @@ public class XzEmergencyRecordServiceImpl extends ServiceImpl map = new HashMap<>(16); - map.put("id", workerInfo.getId()); - map.put("deductScore", ds); - workerInfoService.updateScoreSendAuth(map); - - //存记录 - XzDeductScoreRecord vo = new XzDeductScoreRecord(); - vo.setProjectSn(hiddenDangerInspectRecord.getProjectSn()); - vo.setWorkerId(workerInfo.getId()); - vo.setTypeName(item.getContent()); - vo.setDeductScore(-item.getDeductScore()); - vo.setType(1); - vo.setCreateDate(new Date()); - vo.setCurScore(workerInfo.getSafeScore() - item.getDeductScore() >= 0 ? workerInfo.getSafeScore() - item.getDeductScore() : 0); - vo.setDeductReason(StrUtil.format("您在{}发现安全隐患({}-{})扣{}分", DateUtil.format(vo.getCreateDate(), "yyyy年MM月dd日HH:mm:ss"), "安全检査", vo.getTypeName() == null ? "无" : vo.getTypeName(), item.getDeductScore())); - vo.setTypeTableId(hiddenDangerInspectRecord.getId()); - xzDeductScoreRecordMapper.insert(vo); } @Override @@ -631,7 +584,6 @@ public class XzSecurityQualityInspectionRecordServiceImpl extends ServiceImpl selectRectifyRecordList(Map map) { @@ -110,6 +133,7 @@ public class XzSecurityQualityRectifyRecordServiceImpl extends ServiceImpl() + .eq(XzSecurityQualityRectifyRecord::getQualityId, qualityRectifyRecord.getQualityId()) + .eq(XzSecurityQualityRectifyRecord::getStatus, 2) + .eq(XzSecurityQualityRectifyRecord::getType, 1) + .orderByDesc(XzSecurityQualityRectifyRecord::getRectifyTime).last(Cts.LIMIT_1)); + Long changeUser = rectifyRecord.getViolatorId(); + if (changeUser == null) { + return; + } + WorkerInfo workerInfo = workerInfoMapper.selectById(changeUser); + if (workerInfo == null) { + return; + } + + //扣分 + HashMap map = new HashMap<>(16); + map.put("id", workerInfo.getId()); + map.put("deductScore", ds); + workerInfoService.updateScoreSendAuth(map); + + //存记录 + XzDeductScoreRecord vo = new XzDeductScoreRecord(); + vo.setProjectSn(hiddenDangerInspectRecord.getProjectSn()); + vo.setWorkerId(workerInfo.getId()); + vo.setTypeName(item.getContent()); + vo.setDeductScore(-item.getDeductScore()); + vo.setType(1); + vo.setCreateDate(new Date()); + vo.setCurScore(workerInfo.getSafeScore() - item.getDeductScore() >= 0 ? workerInfo.getSafeScore() - item.getDeductScore() : 0); + vo.setDeductReason(StrUtil.format("您在{}发现安全隐患({}-{})扣{}分", DateUtil.format(vo.getCreateDate(), "yyyy年MM月dd日HH:mm:ss"), "安全检査", vo.getTypeName() == null ? "无" : vo.getTypeName(), item.getDeductScore())); + vo.setTypeTableId(hiddenDangerInspectRecord.getId()); + xzDeductScoreRecordMapper.insert(vo); + } + @Override public void qualityInspectionRecordRectifyExportExcel(Map map, HttpServletResponse response) throws IOException { String fileName = "qualityInspectionRecordRectifyTemplate.xls"; diff --git a/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java b/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java index 843a140cf..4644b6410 100644 --- a/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java +++ b/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java @@ -80,6 +80,8 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { http.authorizeRequests() //请求路径允许访问 + .antMatchers("/xmgl/dangerEnvironmentEvaluate/flow/add").permitAll() + .antMatchers("/xmgl/firstExampleManage/flow/add").permitAll() .antMatchers("/actuator/**").permitAll() .antMatchers("/exam/courseRecord/page").permitAll() .antMatchers("/xmgl/carInfo/validEnterpriseStatus").permitAll() diff --git a/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/service/impl/${entityName}ServiceImpl.javai b/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/service/impl/${entityName}ServiceImpl.javai index a804ad7a9..64f0ec45f 100644 --- a/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/service/impl/${entityName}ServiceImpl.javai +++ b/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/service/impl/${entityName}ServiceImpl.javai @@ -43,9 +43,8 @@ public class ${entityName}ServiceImpl extends ServiceImpl<${entityName}Mapper, $ } private QueryWrapper<${entityName}> getQueryWrapper(HashMap param) { - String alias = ""; - QueryWrapper<${entityName}> queryWrapper = QueryGenerator.initPageQueryWrapper(${entityName}.class, param, alias); - queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(${entityName}::getId)); + QueryWrapper<${entityName}> queryWrapper = QueryGenerator.initPageQueryWrapper(${entityName}.class, param, true); + queryWrapper.orderByDesc(RefUtil.fieldNameUlc(${entityName}::getId)); return queryWrapper; } diff --git a/src/main/resources/lib/wflow-server-1.0-SNAPSHOT.jar b/src/main/resources/lib/wflow-server-1.0-SNAPSHOT.jar index 93c04625b..997c0b23a 100644 Binary files a/src/main/resources/lib/wflow-server-1.0-SNAPSHOT.jar and b/src/main/resources/lib/wflow-server-1.0-SNAPSHOT.jar differ