From fc0aedae7a3cf309d174e7e7755feff39e2ac89f Mon Sep 17 00:00:00 2001 From: zhangchenbiao Date: Wed, 19 Jul 2023 16:04:17 +0800 Subject: [PATCH 01/21] =?UTF-8?q?=E7=A8=BD=E6=A0=B8=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cool/store/enums/ErrorCodeEnum.java | 1 + .../com/cool/store/dao/EnterpriseUserDAO.java | 17 +++ .../store/dao/HyInspectionSettingDAO.java | 90 +++++++++++ .../dao/HyInspectionSettingMappingDAO.java | 99 ++++++++++++ .../com/cool/store/dao/HyOpenAreaInfoDAO.java | 8 + .../java/com/cool/store/dao/RegionDAO.java | 12 ++ .../mapper/HyInspectionSettingMapper.java | 61 ++++++++ .../HyInspectionSettingMappingMapper.java | 57 +++++++ .../com/cool/store/mapper/RegionMapper.java | 7 + .../mapper/HyInspectionSettingMapper.xml | 138 +++++++++++++++++ .../HyInspectionSettingMappingMapper.xml | 109 +++++++++++++ .../main/resources/mapper/RegionMapper.xml | 9 ++ .../mapper/UserRegionMappingMapper.xml | 6 +- .../resources/mybatis-generator.properties | 2 +- .../setting/CheckInspectionSettingDTO.java | 23 +++ .../store/entity/HyInspectionSettingDO.java | 44 ++++++ .../entity/HyInspectionSettingMappingDO.java | 38 +++++ .../setting/InspectionSettingCheckVO.java | 52 +++++++ .../setting/InspectionSettingDetailVO.java | 17 ++- .../setting/InspectionSettingPageVO.java | 33 +++- .../vo/region/RegionUserAndSubRegionVO.java | 89 +++++++++++ .../service/InspectionSettingService.java | 74 +++++++++ .../com/cool/store/service/RegionService.java | 10 ++ .../impl/InspectionSettingServiceImpl.java | 143 ++++++++++++++++++ .../store/service/impl/RegionServiceImpl.java | 17 +++ .../store/config/swagger/Swagger2Config.java | 7 +- .../InspectionSettingController.java | 42 +++-- .../store/controller/RegionController.java | 9 +- 28 files changed, 1185 insertions(+), 29 deletions(-) create mode 100644 coolstore-partner-dao/src/main/java/com/cool/store/dao/HyInspectionSettingDAO.java create mode 100644 coolstore-partner-dao/src/main/java/com/cool/store/dao/HyInspectionSettingMappingDAO.java create mode 100644 coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMapper.java create mode 100644 coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMappingMapper.java create mode 100644 coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMapper.xml create mode 100644 coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMappingMapper.xml create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/dto/inspection/setting/CheckInspectionSettingDTO.java create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionSettingDO.java create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionSettingMappingDO.java create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingCheckVO.java create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/vo/region/RegionUserAndSubRegionVO.java create mode 100644 coolstore-partner-service/src/main/java/com/cool/store/service/InspectionSettingService.java create mode 100644 coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionSettingServiceImpl.java diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java index 117711e9c..81a9779bb 100644 --- a/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java +++ b/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java @@ -82,6 +82,7 @@ public enum ErrorCodeEnum { SIGN_FAIL(600000, "验签失败", null), GET_ACCESSTOKEN_ERROR(600001, "获取小程序TOKEN错误!", null), NEW_MOBILE_HAS_EXIST(600002,"加盟商用户信息已存在",null), + INSPECTION_USER_OCCUPY(600002,"当前稽核人已经配置其他战区",null), ; diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/dao/EnterpriseUserDAO.java b/coolstore-partner-dao/src/main/java/com/cool/store/dao/EnterpriseUserDAO.java index b896793ae..e78dd8326 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/dao/EnterpriseUserDAO.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/dao/EnterpriseUserDAO.java @@ -11,6 +11,8 @@ import org.springframework.stereotype.Repository; import javax.annotation.Resource; import java.util.List; import java.util.Map; +import java.util.Optional; +import java.util.function.Function; import java.util.stream.Collectors; /** @@ -109,7 +111,22 @@ public class EnterpriseUserDAO { return userList.stream().filter(o->!StringUtils.isAnyBlank(o.getMobile(), o.getName())).collect(Collectors.toMap(k -> k.getUserId(), v -> v.getName() + " " + v.getMobile())); } + public Map getUserNameMap(List userIds){ + List userList = getUserInfoByUserIds(userIds); + return userList.stream().filter(o->!StringUtils.isAnyBlank(o.getMobile(), o.getName())).collect(Collectors.toMap(k -> k.getUserId(), v -> v.getName())); + } + + public Map getUserMap(List userIds){ + List userList = getUserInfoByUserIds(userIds); + return userList.stream().filter(o->!StringUtils.isAnyBlank(o.getMobile(), o.getName())).collect(Collectors.toMap(k -> k.getUserId(), Function.identity())); + } + public String selectByMobile(String mobile) { return enterpriseUserMapper.selectByMobile(mobile); } + + public String getUserName(String userId){ + EnterpriseUserDO userInfo = getUserInfoById(userId); + return Optional.ofNullable(userInfo).map(EnterpriseUserDO::getName).orElse(StringUtils.EMPTY); + } } \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyInspectionSettingDAO.java b/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyInspectionSettingDAO.java new file mode 100644 index 000000000..8c1e3ec33 --- /dev/null +++ b/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyInspectionSettingDAO.java @@ -0,0 +1,90 @@ +package com.cool.store.dao; + +import com.cool.store.entity.HyInspectionSettingDO; +import com.cool.store.mapper.HyInspectionSettingMapper; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.google.common.collect.Lists; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Repository; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Objects; + +/** + * @author zhangchenbiao + * @FileName: HyInspectionSettingDAO + * @Description: + * @date 2023-07-18 16:29 + */ +@Repository +public class HyInspectionSettingDAO { + + @Resource + private HyInspectionSettingMapper hyInspectionSettingMapper; + + /** + * 获取分页 + * @param pageNum + * @param pageSize + * @return + */ + public Page getInspectionSettingPage(Integer pageNum, Integer pageSize){ + PageHelper.startPage(pageNum, pageSize); + Page resultPage = hyInspectionSettingMapper.getInspectionSettingPage(); + return resultPage; + } + + /** + * 获取稽查详情 + * @param inspectionSettingId + * @return + */ + public HyInspectionSettingDO getInspectionSettingDetail(Long inspectionSettingId){ + if(Objects.isNull(inspectionSettingId)){ + return null; + } + return hyInspectionSettingMapper.getInspectionSettingDetail(inspectionSettingId); + } + + public Long addInspectionSetting(HyInspectionSettingDO param){ + hyInspectionSettingMapper.insertSelective(param); + return param.getId(); + } + + public Integer updateInspectionSetting(HyInspectionSettingDO param){ + return hyInspectionSettingMapper.updateByPrimaryKeySelective(param); + } + + public List getInspectionUserIds(){ + return hyInspectionSettingMapper.getInspectionUserIds(); + } + + /** + * 获取配置列表 + * @param inspectionSettingIds + * @return + */ + public List getHyInspectionSettingByIds(List inspectionSettingIds){ + if(CollectionUtils.isEmpty(inspectionSettingIds)){ + return Lists.newArrayList(); + } + return hyInspectionSettingMapper.getHyInspectionSettingByIds(inspectionSettingIds); + } + + /** + * 获取用户配置的区域 编辑的时候排除某个配置 + * @param inspectionUserId + * @param excludeInspectionSettingId + * @return + */ + public List getHyInspectionSettingByUserId(String inspectionUserId, Long excludeInspectionSettingId){ + if(StringUtils.isBlank(inspectionUserId)){ + return Lists.newArrayList(); + } + return hyInspectionSettingMapper.getHyInspectionSettingByUserId(inspectionUserId, excludeInspectionSettingId); + } + +} diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyInspectionSettingMappingDAO.java b/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyInspectionSettingMappingDAO.java new file mode 100644 index 000000000..8de02b843 --- /dev/null +++ b/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyInspectionSettingMappingDAO.java @@ -0,0 +1,99 @@ +package com.cool.store.dao; + +import com.cool.store.constants.CommonConstants; +import com.cool.store.entity.HyInspectionSettingMappingDO; +import com.cool.store.mapper.HyInspectionSettingMappingMapper; +import com.google.common.collect.Lists; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.stereotype.Repository; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Objects; + +/** + * @author zhangchenbiao + * @FileName: HyInspectionSettingMappingDAO + * @Description: + * @date 2023-07-18 16:29 + */ +@Repository +public class HyInspectionSettingMappingDAO { + + @Resource + private HyInspectionSettingMappingMapper hyInspectionSettingMappingMapper; + + + /** + * 获取区域ids + * @param inspectionSettingId + * @return + */ + public List getOpenAreaMappingIds(Long inspectionSettingId){ + if(Objects.isNull(inspectionSettingId)){ + return Lists.newArrayList(); + } + return hyInspectionSettingMappingMapper.getOpenAreaMappingIds(inspectionSettingId); + } + + /** + * 新增映射关系 + * @param inspectionSettingId + * @param openAreaMappingIds + * @return + */ + public Integer addInspectionSettingMapping(Long inspectionSettingId, List openAreaMappingIds){ + if(CollectionUtils.isEmpty(openAreaMappingIds) || Objects.isNull(inspectionSettingId)){ + return CommonConstants.ZERO; + } + List insertList = new ArrayList<>(); + for (Long openAreaMappingId : openAreaMappingIds) { + HyInspectionSettingMappingDO insert = new HyInspectionSettingMappingDO(); + insert.setInspectionSettingId(inspectionSettingId); + insert.setOpenAreaMappingId(openAreaMappingId); + insert.setCreateTime(new Date()); + insert.setDeleted(Boolean.FALSE); + insertList.add(insert); + } + return hyInspectionSettingMappingMapper.batchInsertSelective(insertList); + } + + /** + * 更新映射关系 + * @param inspectionSettingId + * @param openAreaMappingIds + * @return + */ + public Integer updateInspectionSettingMapping(Long inspectionSettingId, List openAreaMappingIds){ + hyInspectionSettingMappingMapper.deleteNotInOpenAreaMappingIds(inspectionSettingId, openAreaMappingIds); + return addInspectionSettingMapping(inspectionSettingId, openAreaMappingIds); + } + + /** + * 删除映射关系 + * @param inspectionSettingId + * @return + */ + public Integer deleteInspectionSettingMapping(Long inspectionSettingId){ + if(Objects.isNull(inspectionSettingId)){ + return CommonConstants.ZERO; + } + return hyInspectionSettingMappingMapper.deleteInspectionSettingMapping(inspectionSettingId); + } + + /** + * 获取冲突的映射关系 + * @param inspectionSettingId + * @param openAreaMappingIds + * @return + */ + public List getConflictInspectionSetting(Long inspectionSettingId, List openAreaMappingIds){ + if(CollectionUtils.isEmpty(openAreaMappingIds)){ + return Lists.newArrayList(); + } + return hyInspectionSettingMappingMapper.getConflictInspectionSetting(inspectionSettingId, openAreaMappingIds); + } + +} diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyOpenAreaInfoDAO.java b/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyOpenAreaInfoDAO.java index f88325be3..008db64d9 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyOpenAreaInfoDAO.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyOpenAreaInfoDAO.java @@ -89,6 +89,14 @@ public class HyOpenAreaInfoDAO { return hyOpenAreaInfoMapper.selectByIds(ids); } + public Map getNameMapByIds(List ids){ + if (CollectionUtils.isEmpty(ids)){ + return Maps.newHashMap(); + } + List hyOpenAreaInfoDOS = hyOpenAreaInfoMapper.selectByIds(ids); + return ListUtils.emptyIfNull(hyOpenAreaInfoDOS).stream().collect(Collectors.toMap(k->k.getId(), v->v.getAreaName(), (k1, k2)->k1)); + } + public Map selectNameMapByIds(List ids){ if (CollectionUtils.isEmpty(ids)){ return Maps.newHashMap(); diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/dao/RegionDAO.java b/coolstore-partner-dao/src/main/java/com/cool/store/dao/RegionDAO.java index 60f3eaa21..6e7b73673 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/dao/RegionDAO.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/dao/RegionDAO.java @@ -108,4 +108,16 @@ public class RegionDAO { List regionPathList = regionList.stream().map(RegionDO::getRegionPath).collect(Collectors.toList()); return regionMapper.getSubRegionIds(regionPathList); } + + /** + * 获取子部门 + * @param regionId + * @return + */ + public List getSubRegion(String regionId){ + if(StringUtils.isBlank(regionId)){ + return Lists.newArrayList(); + } + return regionMapper.getSubRegion(regionId); + } } diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMapper.java new file mode 100644 index 000000000..4a4d49ab5 --- /dev/null +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMapper.java @@ -0,0 +1,61 @@ +package com.cool.store.mapper; + +import com.cool.store.entity.HyInspectionSettingDO; +import com.github.pagehelper.Page; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author zhangchenbiao + * @date 2023-07-18 04:27 + */ +public interface HyInspectionSettingMapper { + /** + * + * 默认插入方法,只会给有值的字段赋值 + * 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null + * dateTime:2023-07-18 04:27 + */ + int insertSelective(HyInspectionSettingDO record); + + /** + * + * 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的 + * dateTime:2023-07-18 04:27 + */ + int updateByPrimaryKeySelective(HyInspectionSettingDO record); + + /** + * 获取稽核区域设置分页 + * @return + */ + Page getInspectionSettingPage(); + + /** + * 获取稽核详情 + * @param inspectionSettingId + * @return + */ + HyInspectionSettingDO getInspectionSettingDetail(@Param("inspectionSettingId") Long inspectionSettingId); + + /** + * 获取已经配置的稽核人 + * @return + */ + List getInspectionUserIds(); + + /** + * 根据id批量获取 + * @param inspectionSettingIds + * @return + */ + List getHyInspectionSettingByIds(@Param("inspectionSettingIds") List inspectionSettingIds); + + /** + * + * @param inspectionUserId + * @return + */ + List getHyInspectionSettingByUserId(String inspectionUserId, Long excludeInspectionSettingId); +} \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMappingMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMappingMapper.java new file mode 100644 index 000000000..1cc928dc5 --- /dev/null +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMappingMapper.java @@ -0,0 +1,57 @@ +package com.cool.store.mapper; + +import com.cool.store.entity.HyInspectionSettingMappingDO; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author zhangchenbiao + * @date 2023-07-18 04:28 + */ +public interface HyInspectionSettingMappingMapper { + /** + * + * 默认插入方法,只会给有值的字段赋值 + * 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null + * dateTime:2023-07-18 04:28 + */ + int batchInsertSelective(@Param("insertList") List insertList); + + /** + * + * 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的 + * dateTime:2023-07-18 04:28 + */ + int updateByPrimaryKeySelective(HyInspectionSettingMappingDO record); + + /** + * 获取区域ids + * @param inspectionSettingId + * @return + */ + List getOpenAreaMappingIds(@Param("inspectionSettingId") Long inspectionSettingId); + + /** + * 删除不在的城市 + * @param inspectionSettingId + * @param openAreaMappingIds + * @return + */ + Integer deleteNotInOpenAreaMappingIds(@Param("inspectionSettingId") Long inspectionSettingId, @Param("openAreaMappingIds") List openAreaMappingIds); + + /** + * 删除 + * @param inspectionSettingId + * @return + */ + Integer deleteInspectionSettingMapping(@Param("inspectionSettingId") Long inspectionSettingId); + + /** + * + * @param inspectionSettingId + * @param openAreaMappingIds + * @return + */ + List getConflictInspectionSetting(@Param("inspectionSettingId") Long inspectionSettingId, @Param("openAreaMappingIds") List openAreaMappingIds); +} \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/RegionMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/RegionMapper.java index 21e3dedb4..8b9d4d59c 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/RegionMapper.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/RegionMapper.java @@ -78,4 +78,11 @@ public interface RegionMapper { * @return */ List getSubRegionIds(@Param("regionPathList") List regionPathList); + + /** + * 获取子部门 + * @param regionId + * @return + */ + List getSubRegion(@Param("regionId") String regionId); } \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMapper.xml new file mode 100644 index 000000000..1b8478ced --- /dev/null +++ b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMapper.xml @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + id, zone_name, inspection_user_id, create_user_id, update_user_id, create_time, update_time, deleted + + + insert into hy_inspection_setting + + + zone_name, + + + inspection_user_id, + + + create_user_id, + + + update_user_id, + + + create_time, + + + update_time, + + + deleted, + + + + + #{zoneName}, + + + #{inspectionUserId}, + + + #{createUserId}, + + + #{updateUserId}, + + + #{createTime}, + + + #{updateTime}, + + + #{deleted}, + + + + + update hy_inspection_setting + + + zone_name = #{zoneName}, + + + inspection_user_id = #{inspectionUserId}, + + + create_user_id = #{createUserId}, + + + update_user_id = #{updateUserId}, + + + create_time = #{createTime}, + + + update_time = #{updateTime}, + + + deleted = #{deleted}, + + + where id = #{id} + + + + + + + + + + + + \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMappingMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMappingMapper.xml new file mode 100644 index 000000000..74086407f --- /dev/null +++ b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMappingMapper.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + id, inspection_setting_id, open_area_mapping_id, create_time, update_time, deleted + + + + insert into hy_inspection_setting_mapping + + + inspection_setting_id, + + + open_area_mapping_id, + + + create_time, + + + update_time, + + + deleted, + + + + + #{record.inspectionSettingId}, + + + #{record.openAreaMappingId}, + + + #{record.createTime}, + + + #{record.updateTime}, + + + #{record.deleted}, + + + ON DUPLICATE KEY UPDATE update_time = now(), deleted = values(deleted) + + + + update hy_inspection_setting_mapping + + + inspection_setting_id = #{inspectionSettingId}, + + + open_area_mapping_id = #{openAreaMappingId}, + + + create_time = #{createTime}, + + + update_time = #{updateTime}, + + + deleted = #{deleted}, + + + where id = #{id} + + + + + + update + hy_inspection_setting_mapping + set + deleted = '1' , update_time = new() + where + inspection_setting_id = #{inspectionSettingId} and open_area_mapping_id not in + #{openAreaMappingId} + + + + update hy_inspection_setting_mapping set deleted = '1' , update_time = new() where inspection_setting_id = #{inspectionSettingId} + + + + \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/resources/mapper/RegionMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/RegionMapper.xml index 194a9ccf8..8e98d7d2b 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/RegionMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/RegionMapper.xml @@ -208,4 +208,13 @@ + + \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/resources/mapper/UserRegionMappingMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/UserRegionMappingMapper.xml index b1b3a0835..abc0da398 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/UserRegionMappingMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/UserRegionMappingMapper.xml @@ -131,15 +131,15 @@ \ No newline at end of file diff --git a/coolstore-partner-dao/src/test/resources/mybatis-generator.properties b/coolstore-partner-dao/src/test/resources/mybatis-generator.properties index 70f638782..1811e5459 100644 --- a/coolstore-partner-dao/src/test/resources/mybatis-generator.properties +++ b/coolstore-partner-dao/src/test/resources/mybatis-generator.properties @@ -3,4 +3,4 @@ jdbc.url = jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcoll jdbc.user= coolstore jdbc.password = CSCErYcXniNYm7bT -table.name = sys_menu \ No newline at end of file +table.name = hy_inspection_setting_mapping \ No newline at end of file diff --git a/coolstore-partner-model/src/main/java/com/cool/store/dto/inspection/setting/CheckInspectionSettingDTO.java b/coolstore-partner-model/src/main/java/com/cool/store/dto/inspection/setting/CheckInspectionSettingDTO.java new file mode 100644 index 000000000..cec1e1d22 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/dto/inspection/setting/CheckInspectionSettingDTO.java @@ -0,0 +1,23 @@ +package com.cool.store.dto.inspection.setting; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author zhangchenbiao + * @FileName: DeleteInspectionSettingDTO + * @Description: 删除稽核区域设置 + * @date 2023-07-17 14:41 + */ +@Data +public class CheckInspectionSettingDTO { + + @ApiModelProperty("id") + private Long inspectionSettingId; + + @ApiModelProperty("归属地ids") + private List openAreaMappingIds; + +} diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionSettingDO.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionSettingDO.java new file mode 100644 index 000000000..91919a103 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionSettingDO.java @@ -0,0 +1,44 @@ +package com.cool.store.entity; + +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * + * @author zhangchenbiao + * @date 2023-07-18 04:27 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class HyInspectionSettingDO implements Serializable { + @ApiModelProperty("主键id") + private Long id; + + @ApiModelProperty("区域名称") + private String zoneName; + + @ApiModelProperty("关联稽核人user_id") + private String inspectionUserId; + + @ApiModelProperty("新建人ID") + private String createUserId; + + @ApiModelProperty("更新人ID") + private String updateUserId; + + @ApiModelProperty("创建时间") + private Date createTime; + + @ApiModelProperty("修改时间") + private Date updateTime; + + @ApiModelProperty("删除标识") + private Boolean deleted; +} \ No newline at end of file diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionSettingMappingDO.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionSettingMappingDO.java new file mode 100644 index 000000000..5c04d619f --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionSettingMappingDO.java @@ -0,0 +1,38 @@ +package com.cool.store.entity; + +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * + * @author zhangchenbiao + * @date 2023-07-18 04:28 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class HyInspectionSettingMappingDO implements Serializable { + @ApiModelProperty("主键id") + private Long id; + + @ApiModelProperty("稽核区域配置表id,hy_inspection_setting.id") + private Long inspectionSettingId; + + @ApiModelProperty("hy_open_area_info.id") + private Long openAreaMappingId; + + @ApiModelProperty("创建时间") + private Date createTime; + + @ApiModelProperty("修改时间") + private Date updateTime; + + @ApiModelProperty("删除标识") + private Boolean deleted; +} \ No newline at end of file diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingCheckVO.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingCheckVO.java new file mode 100644 index 000000000..8175f4fa2 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingCheckVO.java @@ -0,0 +1,52 @@ +package com.cool.store.vo.inspection.setting; + +import com.cool.store.entity.HyInspectionSettingDO; +import com.cool.store.entity.HyInspectionSettingMappingDO; +import com.google.common.collect.Lists; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.apache.commons.collections4.CollectionUtils; + +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * @author zhangchenbiao + * @FileName: InspectionSettingPageVO + * @Description: + * @date 2023-07-17 14:32 + */ +@Data +public class InspectionSettingCheckVO { + + @ApiModelProperty("区域名称") + private String zoneName; + + @ApiModelProperty("省市区") + private String areaName; + + @ApiModelProperty("稽核人名称") + private String inspectionUsername; + + public static List convertVO(List conflictInspectionSetting, List inspectionSettingList, Map userNameMap, Map areaNameMap){ + if(CollectionUtils.isEmpty(conflictInspectionSetting) || CollectionUtils.isEmpty(inspectionSettingList)){ + return Lists.newArrayList(); + } + Map inspectionSettingMap = inspectionSettingList.stream().collect(Collectors.toMap(k -> k.getId(), Function.identity())); + List resultList = new ArrayList<>(); + for (HyInspectionSettingMappingDO hyInspectionSettingMapping : conflictInspectionSetting) { + HyInspectionSettingDO inspectionSetting = inspectionSettingMap.get(hyInspectionSettingMapping.getInspectionSettingId()); + if(Objects.isNull(inspectionSetting)){ + continue; + } + InspectionSettingCheckVO inspectionSettingCheck = new InspectionSettingCheckVO(); + inspectionSettingCheck.setInspectionUsername(userNameMap.get(inspectionSetting.getInspectionUserId())); + inspectionSettingCheck.setZoneName(inspectionSetting.getZoneName()); + inspectionSettingCheck.setAreaName(areaNameMap.get(hyInspectionSettingMapping.getOpenAreaMappingId())); + resultList.add(inspectionSettingCheck); + } + return resultList; + } + +} diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingDetailVO.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingDetailVO.java index 8230ae6f5..349b510a1 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingDetailVO.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingDetailVO.java @@ -1,10 +1,12 @@ package com.cool.store.vo.inspection.setting; +import com.cool.store.entity.HyInspectionSettingDO; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; import java.util.List; +import java.util.Objects; /** * @author zhangchenbiao @@ -25,9 +27,22 @@ public class InspectionSettingDetailVO { private String inspectionUserId; @ApiModelProperty("稽核人名称") - private String inspectionUsername; + private String inspectionUserName; @ApiModelProperty("归属地ids") private List openAreaMappingIds; + public static InspectionSettingDetailVO convertVO(HyInspectionSettingDO param, String inspectionUserName, List openAreaMappingIds){ + if(Objects.isNull(param)){ + return null; + } + InspectionSettingDetailVO result = new InspectionSettingDetailVO(); + result.setInspectionSettingId(param.getId()); + result.setZoneName(param.getZoneName()); + result.setInspectionUserId(param.getInspectionUserId()); + result.setInspectionUserName(inspectionUserName); + result.setOpenAreaMappingIds(openAreaMappingIds); + return result; + } + } diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingPageVO.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingPageVO.java index 49120b02b..29fee5519 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingPageVO.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingPageVO.java @@ -1,9 +1,16 @@ package com.cool.store.vo.inspection.setting; +import com.cool.store.entity.HyInspectionSettingDO; +import com.github.pagehelper.Page; +import com.google.common.collect.Lists; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import org.apache.commons.collections4.CollectionUtils; +import java.util.ArrayList; import java.util.Date; +import java.util.List; +import java.util.Map; /** * @author zhangchenbiao @@ -24,7 +31,7 @@ public class InspectionSettingPageVO { private String inspectionUserId; @ApiModelProperty("稽核人名称") - private String inspectionUsername; + private String inspectionUserName; @ApiModelProperty("更新时间") private Date updateTime; @@ -32,4 +39,28 @@ public class InspectionSettingPageVO { @ApiModelProperty("更新人名称") private String updateUsername; + /** + * dto转vo + * @param pageList + * @param userNameMap + * @return + */ + public static List convert(Page pageList, Map userNameMap){ + if(CollectionUtils.isEmpty(pageList)){ + return Lists.newArrayList(); + } + List resultList = new ArrayList<>(); + for (HyInspectionSettingDO inspectionSetting : pageList) { + InspectionSettingPageVO result = new InspectionSettingPageVO(); + result.setInspectionSettingId(inspectionSetting.getId()); + result.setZoneName(inspectionSetting.getZoneName()); + result.setInspectionUserId(inspectionSetting.getInspectionUserId()); + result.setInspectionUserName(userNameMap.get(inspectionSetting.getInspectionUserId())); + result.setUpdateTime(inspectionSetting.getUpdateTime()); + result.setUpdateUsername(userNameMap.get(inspectionSetting.getUpdateUserId())); + resultList.add(result); + } + return resultList; + } + } diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/region/RegionUserAndSubRegionVO.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/region/RegionUserAndSubRegionVO.java new file mode 100644 index 000000000..a025b0235 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/region/RegionUserAndSubRegionVO.java @@ -0,0 +1,89 @@ +package com.cool.store.vo.region; + +import com.cool.store.entity.EnterpriseUserDO; +import com.cool.store.entity.RegionDO; +import com.google.common.collect.Lists; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * @author zhangchenbiao + * @FileName: RegionUserAndSubRegionVO + * @Description: + * @date 2023-07-17 19:34 + */ +@Data +public class RegionUserAndSubRegionVO { + + @ApiModelProperty("区域列表") + private List regionList; + + @ApiModelProperty("用户列表") + private List userList; + + public RegionUserAndSubRegionVO(List regionList, List userList) { + this.regionList = regionList; + this.userList = userList; + } + + public RegionUserAndSubRegionVO() { + this.regionList = Lists.newArrayList(); + this.userList = Lists.newArrayList(); + } + + @Data + public static class RegionInfo{ + + @ApiModelProperty("区域id") + private String regionId; + + @ApiModelProperty("区域名称") + private String name; + + } + + @Data + public static class UserInfo{ + + @ApiModelProperty("用户id") + private String userId; + + @ApiModelProperty("用户名") + private String username; + + @ApiModelProperty("手机号") + private String mobile; + + @ApiModelProperty("头像url") + private String avatar; + + } + + public static RegionUserAndSubRegionVO convertVO(List subRegionList, List userIds, Map userMap){ + List regionList = Lists.newArrayList(); + List userList = Lists.newArrayList(); + for (RegionDO regionDO : subRegionList) { + RegionInfo region = new RegionInfo(); + region.setRegionId(regionDO.getRegionId()); + region.setName(regionDO.getName()); + regionList.add(region); + } + for (String userId : userIds) { + EnterpriseUserDO enterpriseUser = userMap.get(userId); + if(Objects.isNull(enterpriseUser)){ + continue; + } + UserInfo userInfo = new UserInfo(); + userInfo.setUserId(userId); + userInfo.setUsername(enterpriseUser.getName()); + userInfo.setMobile(enterpriseUser.getMobile()); + userInfo.setAvatar(enterpriseUser.getAvatar()); + userList.add(userInfo); + } + return new RegionUserAndSubRegionVO(regionList, userList); + } +} diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/InspectionSettingService.java b/coolstore-partner-service/src/main/java/com/cool/store/service/InspectionSettingService.java new file mode 100644 index 000000000..796d38adf --- /dev/null +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/InspectionSettingService.java @@ -0,0 +1,74 @@ +package com.cool.store.service; + +import com.cool.store.dto.inspection.setting.AddInspectionSettingDTO; +import com.cool.store.dto.inspection.setting.CheckInspectionSettingDTO; +import com.cool.store.dto.inspection.setting.DeleteInspectionSettingDTO; +import com.cool.store.dto.inspection.setting.UpdateInspectionSettingDTO; +import com.cool.store.vo.inspection.setting.InspectionSettingCheckVO; +import com.cool.store.vo.inspection.setting.InspectionSettingDetailVO; +import com.cool.store.vo.inspection.setting.InspectionSettingPageVO; +import com.github.pagehelper.PageInfo; + +import java.util.List; + +/** + * @author zhangchenbiao + * @FileName: InspectionSettingService + * @Description: + * @date 2023-07-18 15:57 + */ +public interface InspectionSettingService { + + /** + *稽核区域设置列表 + * @param pageNum + * @param pageSize + * @return + */ + PageInfo getInspectionSettingPage(Integer pageNum, Integer pageSize); + + /** + * 获取详情 + * @param inspectionSettingId + * @return + */ + InspectionSettingDetailVO getInspectionSettingDetail(Long inspectionSettingId); + + /** + * 新增稽核区域设置 + * @param userId + * @param param + * @return + */ + Long addInspectionSetting(String userId, AddInspectionSettingDTO param); + + /** + * 更新稽核区域设置 + * @param userId + * @param param + * @return + */ + Integer updateInspectionSetting(String userId, UpdateInspectionSettingDTO param); + + /** + * 删除稽核区域设置 + * @param userId + * @param inspectionSettingId + * @return + */ + Integer deleteInspectionSetting(String userId, Long inspectionSettingId); + + /** + * 校验稽核区域设置 + * @param param + * @return + */ + List checkInspectionSetting(CheckInspectionSettingDTO param); + + /** + * 获取已经绑定的人员 + * @return + */ + List getBingUser(); + +} diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/RegionService.java b/coolstore-partner-service/src/main/java/com/cool/store/service/RegionService.java index cd01d23d9..b8a189404 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/RegionService.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/RegionService.java @@ -1,6 +1,7 @@ package com.cool.store.service; import com.cool.store.vo.region.RegionBaseInfoVO; +import com.cool.store.vo.region.RegionUserAndSubRegionVO; import java.util.List; @@ -18,4 +19,13 @@ public interface RegionService { */ RegionBaseInfoVO getRegionBaseInfoList(); + /** + * 获取部门下的子部门和人 + * @param regionId + * @return + */ + RegionUserAndSubRegionVO getRegionUserAndSubRegion(String regionId); + + + } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionSettingServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionSettingServiceImpl.java new file mode 100644 index 000000000..d88b3fc03 --- /dev/null +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionSettingServiceImpl.java @@ -0,0 +1,143 @@ +package com.cool.store.service.impl; + +import com.cool.store.dao.EnterpriseUserDAO; +import com.cool.store.dao.HyInspectionSettingDAO; +import com.cool.store.dao.HyInspectionSettingMappingDAO; +import com.cool.store.dao.HyOpenAreaInfoDAO; +import com.cool.store.dto.inspection.setting.AddInspectionSettingDTO; +import com.cool.store.dto.inspection.setting.CheckInspectionSettingDTO; +import com.cool.store.dto.inspection.setting.UpdateInspectionSettingDTO; +import com.cool.store.entity.HyInspectionSettingDO; +import com.cool.store.entity.HyInspectionSettingMappingDO; +import com.cool.store.enums.ErrorCodeEnum; +import com.cool.store.exception.ServiceException; +import com.cool.store.service.InspectionSettingService; +import com.cool.store.vo.inspection.setting.InspectionSettingCheckVO; +import com.cool.store.vo.inspection.setting.InspectionSettingDetailVO; +import com.cool.store.vo.inspection.setting.InspectionSettingPageVO; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageInfo; +import com.google.common.collect.Lists; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.ListUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author zhangchenbiao + * @FileName: InspectionSettingServiceImpl + * @Description: + * @date 2023-07-18 16:06 + */ +@Service +public class InspectionSettingServiceImpl implements InspectionSettingService { + + @Resource + private HyInspectionSettingDAO hyInspectionSettingDAO; + @Resource + private HyInspectionSettingMappingDAO hyInspectionSettingMappingDAO; + @Resource + private EnterpriseUserDAO enterpriseUserDAO; + @Resource + private HyOpenAreaInfoDAO hyOpenAreaInfoDAO; + + @Override + public PageInfo getInspectionSettingPage(Integer pageNum, Integer pageSize) { + Page inspectionSettingPage = hyInspectionSettingDAO.getInspectionSettingPage(pageNum, pageSize); + Map userNameMap = new HashMap<>(); + if(CollectionUtils.isNotEmpty(inspectionSettingPage)){ + List userIds = inspectionSettingPage.stream().map(HyInspectionSettingDO::getInspectionUserId).distinct().collect(Collectors.toList()); + List updateUserIds = inspectionSettingPage.stream().map(HyInspectionSettingDO::getUpdateUserId).distinct().collect(Collectors.toList()); + userIds.addAll(updateUserIds); + userNameMap = enterpriseUserDAO.getUserNameMap(userIds); + } + List resultList = InspectionSettingPageVO.convert(inspectionSettingPage, userNameMap); + PageInfo resultPage = new PageInfo(inspectionSettingPage); + resultPage.setList(resultList); + return resultPage; + } + + @Override + public InspectionSettingDetailVO getInspectionSettingDetail(Long inspectionSettingId) { + HyInspectionSettingDO inspectionSetting = hyInspectionSettingDAO.getInspectionSettingDetail(inspectionSettingId); + if(Objects.isNull(inspectionSetting)){ + return null; + } + List openAreaMappingIds = hyInspectionSettingMappingDAO.getOpenAreaMappingIds(inspectionSettingId); + String inspectionUsername = enterpriseUserDAO.getUserName(inspectionSetting.getInspectionUserId()); + return InspectionSettingDetailVO.convertVO(inspectionSetting, inspectionUsername, openAreaMappingIds); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Long addInspectionSetting(String userId, AddInspectionSettingDTO param) { + List inspectionUserSetting = hyInspectionSettingDAO.getHyInspectionSettingByUserId(param.getInspectionUserId(), null); + if(CollectionUtils.isNotEmpty(inspectionUserSetting)){ + throw new ServiceException(ErrorCodeEnum.INSPECTION_USER_OCCUPY); + } + HyInspectionSettingDO inspectionSetting = new HyInspectionSettingDO(); + inspectionSetting.setInspectionUserId(param.getInspectionUserId()); + inspectionSetting.setZoneName(param.getZoneName()); + inspectionSetting.setCreateUserId(userId); + inspectionSetting.setCreateTime(new Date()); + Long inspectionSettingId = hyInspectionSettingDAO.addInspectionSetting(inspectionSetting); + List openAreaMappingIds = param.getOpenAreaMappingIds(); + hyInspectionSettingMappingDAO.addInspectionSettingMapping(inspectionSettingId, openAreaMappingIds); + return inspectionSettingId; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Integer updateInspectionSetting(String userId, UpdateInspectionSettingDTO param) { + List inspectionUserSetting = hyInspectionSettingDAO.getHyInspectionSettingByUserId(param.getInspectionUserId(), param.getInspectionSettingId()); + if(CollectionUtils.isNotEmpty(inspectionUserSetting)){ + throw new ServiceException(ErrorCodeEnum.INSPECTION_USER_OCCUPY); + } + HyInspectionSettingDO inspectionSetting = new HyInspectionSettingDO(); + inspectionSetting.setId(param.getInspectionSettingId()); + inspectionSetting.setInspectionUserId(param.getInspectionUserId()); + inspectionSetting.setZoneName(param.getZoneName()); + inspectionSetting.setUpdateUserId(userId); + inspectionSetting.setUpdateTime(new Date()); + hyInspectionSettingDAO.updateInspectionSetting(inspectionSetting); + List openAreaMappingIds = param.getOpenAreaMappingIds(); + return hyInspectionSettingMappingDAO.updateInspectionSettingMapping(param.getInspectionSettingId(), openAreaMappingIds); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Integer deleteInspectionSetting(String userId, Long inspectionSettingId) { + HyInspectionSettingDO inspectionSetting = new HyInspectionSettingDO(); + inspectionSetting.setId(inspectionSettingId); + inspectionSetting.setUpdateUserId(userId); + inspectionSetting.setUpdateTime(new Date()); + inspectionSetting.setDeleted(Boolean.TRUE); + hyInspectionSettingDAO.updateInspectionSetting(inspectionSetting); + hyInspectionSettingMappingDAO.deleteInspectionSettingMapping(inspectionSettingId); + return hyInspectionSettingDAO.updateInspectionSetting(inspectionSetting); + } + + @Override + public List checkInspectionSetting(CheckInspectionSettingDTO param) { + if(CollectionUtils.isEmpty(param.getOpenAreaMappingIds())){ + return Lists.newArrayList(); + } + List conflictInspectionSetting = hyInspectionSettingMappingDAO.getConflictInspectionSetting(param.getInspectionSettingId(), param.getOpenAreaMappingIds()); + List inspectionSettingIds = ListUtils.emptyIfNull(conflictInspectionSetting).stream().map(HyInspectionSettingMappingDO::getInspectionSettingId).distinct().collect(Collectors.toList()); + List inspectionSettingList = hyInspectionSettingDAO.getHyInspectionSettingByIds(inspectionSettingIds); + List inspectionUserIds = ListUtils.emptyIfNull(inspectionSettingList).stream().map(HyInspectionSettingDO::getInspectionUserId).distinct().collect(Collectors.toList()); + List openAreaMappingIds = ListUtils.emptyIfNull(conflictInspectionSetting).stream().map(HyInspectionSettingMappingDO::getOpenAreaMappingId).distinct().collect(Collectors.toList()); + Map areaNameMap = hyOpenAreaInfoDAO.getNameMapByIds(openAreaMappingIds); + Map userNameMap = enterpriseUserDAO.getUserNameMap(inspectionUserIds); + return InspectionSettingCheckVO.convertVO(conflictInspectionSetting, inspectionSettingList, userNameMap, areaNameMap); + } + + @Override + public List getBingUser() { + return hyInspectionSettingDAO.getInspectionUserIds(); + } +} diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/RegionServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/RegionServiceImpl.java index 6b592a8cd..d260aff2a 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/RegionServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/RegionServiceImpl.java @@ -1,16 +1,21 @@ package com.cool.store.service.impl; +import com.cool.store.dao.EnterpriseUserDAO; import com.cool.store.dao.RegionDAO; +import com.cool.store.dao.UserRegionMappingDAO; +import com.cool.store.entity.EnterpriseUserDO; import com.cool.store.entity.RegionDO; import com.cool.store.mq.producer.SimpleMessageService; import com.cool.store.service.RegionService; import com.cool.store.utils.RedisConstantUtil; import com.cool.store.utils.RedisUtil; import com.cool.store.vo.region.RegionBaseInfoVO; +import com.cool.store.vo.region.RegionUserAndSubRegionVO; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; +import java.util.Map; /** * @author zhangchenbiao @@ -25,6 +30,10 @@ public class RegionServiceImpl implements RegionService { private RedisUtil redisUtil; @Resource private RegionDAO regionDAO; + @Resource + private UserRegionMappingDAO userRegionMappingDAO; + @Resource + private EnterpriseUserDAO enterpriseUserDAO; @Override @@ -32,4 +41,12 @@ public class RegionServiceImpl implements RegionService { List regionBaseInfoList = regionDAO.getRegionBaseInfoList(); return RegionBaseInfoVO.convertTree(regionBaseInfoList); } + + @Override + public RegionUserAndSubRegionVO getRegionUserAndSubRegion(String regionId) { + List subRegionList = regionDAO.getSubRegion(regionId); + List userIds = userRegionMappingDAO.getUserListByRegionId(regionId); + Map userMap = enterpriseUserDAO.getUserMap(userIds); + return RegionUserAndSubRegionVO.convertVO(subRegionList, userIds, userMap); + } } diff --git a/coolstore-partner-webb/src/main/java/com/cool/store/config/swagger/Swagger2Config.java b/coolstore-partner-webb/src/main/java/com/cool/store/config/swagger/Swagger2Config.java index 99c76c4c7..016da5c33 100644 --- a/coolstore-partner-webb/src/main/java/com/cool/store/config/swagger/Swagger2Config.java +++ b/coolstore-partner-webb/src/main/java/com/cool/store/config/swagger/Swagger2Config.java @@ -9,10 +9,8 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; import springfox.documentation.RequestHandler; import springfox.documentation.builders.ApiInfoBuilder; -import springfox.documentation.builders.ParameterBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; -import springfox.documentation.schema.ModelRef; import springfox.documentation.service.ApiInfo; import springfox.documentation.service.Parameter; import springfox.documentation.spi.DocumentationType; @@ -54,16 +52,13 @@ public class Swagger2Config { .groupName(groupName) .select() .apis(this.scanBasePackage(packages)) + .paths(PathSelectors.regex(".*/inspection/setting/.*|.*getRegionUserAndSubRegion")) .build() .globalOperationParameters(pars); } private List getParameters() { List pars = new ArrayList<>(); - pars.add(new ParameterBuilder().name("accessToken").description("令牌").required(true) - .modelRef(new ModelRef("string")) - .defaultValue("{{accessToken}}") - .parameterType("query").build()); return pars; } diff --git a/coolstore-partner-webb/src/main/java/com/cool/store/controller/InspectionSettingController.java b/coolstore-partner-webb/src/main/java/com/cool/store/controller/InspectionSettingController.java index aa35e81a8..b023c76a4 100644 --- a/coolstore-partner-webb/src/main/java/com/cool/store/controller/InspectionSettingController.java +++ b/coolstore-partner-webb/src/main/java/com/cool/store/controller/InspectionSettingController.java @@ -1,15 +1,22 @@ package com.cool.store.controller; +import com.cool.store.context.CurrentUserHolder; import com.cool.store.dto.inspection.setting.AddInspectionSettingDTO; +import com.cool.store.dto.inspection.setting.CheckInspectionSettingDTO; import com.cool.store.dto.inspection.setting.DeleteInspectionSettingDTO; import com.cool.store.dto.inspection.setting.UpdateInspectionSettingDTO; import com.cool.store.response.ResponseResult; +import com.cool.store.service.InspectionSettingService; +import com.cool.store.vo.inspection.setting.InspectionSettingCheckVO; +import com.cool.store.vo.inspection.setting.InspectionSettingDetailVO; import com.cool.store.vo.inspection.setting.InspectionSettingPageVO; +import com.github.pagehelper.PageInfo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; import java.util.List; /** @@ -23,46 +30,49 @@ import java.util.List; @Api(tags = "稽核区域设置") public class InspectionSettingController { + @Resource + private InspectionSettingService inspectionSettingService; + @ApiOperation("稽核区域设置列表") @GetMapping("/inspection/setting/page") - public ResponseResult getInspectionSettingPage(@RequestParam("pageNum")Integer pageNum, @RequestParam("pageSize")Integer pageSize){ - return ResponseResult.success(); + public ResponseResult> getInspectionSettingPage(@RequestParam("pageNum")Integer pageNum, @RequestParam("pageSize")Integer pageSize){ + return ResponseResult.success(inspectionSettingService.getInspectionSettingPage(pageNum, pageSize)); } @ApiOperation("稽核区域设置详情") @GetMapping("/inspection/setting/detail") - public ResponseResult getInspectionSettingDetail(@RequestParam("inspectionSettingId")Long inspectionSettingId){ - return ResponseResult.success(); + public ResponseResult getInspectionSettingDetail(@RequestParam("inspectionSettingId")Long inspectionSettingId){ + return ResponseResult.success(inspectionSettingService.getInspectionSettingDetail(inspectionSettingId)); } @ApiOperation("新增稽核区域设置") @PostMapping("/inspection/setting/add") public ResponseResult addInspectionSetting(@RequestBody AddInspectionSettingDTO param){ - return ResponseResult.success(); + return ResponseResult.success(inspectionSettingService.addInspectionSetting(CurrentUserHolder.getUserId(), param)); } @ApiOperation("编辑稽核区域设置") @PostMapping("/inspection/setting/update") public ResponseResult updateInspectionSetting(@RequestBody UpdateInspectionSettingDTO param){ - return ResponseResult.success(); + return ResponseResult.success(inspectionSettingService.updateInspectionSetting(CurrentUserHolder.getUserId(), param)); } @ApiOperation("删除稽核区域设置") - @DeleteMapping("/inspection/setting/delete") + @PostMapping("/inspection/setting/delete") public ResponseResult deleteInspectionSetting(@RequestBody DeleteInspectionSettingDTO param){ - return ResponseResult.success(); + return ResponseResult.success(inspectionSettingService.deleteInspectionSetting(CurrentUserHolder.getUserId(), param.getInspectionSettingId())); + } + + @ApiOperation("校验稽核区域设置") + @PostMapping("/inspection/setting/check") + public ResponseResult> checkInspectionSetting(@RequestBody CheckInspectionSettingDTO param){ + return ResponseResult.success(inspectionSettingService.checkInspectionSetting(param)); } @ApiOperation("查询已经关联的稽核人") - @DeleteMapping("/inspection/setting/bind/users") + @GetMapping("/inspection/setting/bind/users") public ResponseResult> getBingUser(){ - return ResponseResult.success(); - } - - @ApiOperation("查询已经配置的归属地") - @DeleteMapping("/inspection/setting/bind/open/area") - public ResponseResult> getBingOpenArea(){ - return ResponseResult.success(); + return ResponseResult.success(inspectionSettingService.getBingUser()); } } diff --git a/coolstore-partner-webb/src/main/java/com/cool/store/controller/RegionController.java b/coolstore-partner-webb/src/main/java/com/cool/store/controller/RegionController.java index 1847f776f..44632a16b 100644 --- a/coolstore-partner-webb/src/main/java/com/cool/store/controller/RegionController.java +++ b/coolstore-partner-webb/src/main/java/com/cool/store/controller/RegionController.java @@ -4,6 +4,7 @@ import com.cool.store.response.ResponseResult; import com.cool.store.service.RegionService; import com.cool.store.service.ZoneService; import com.cool.store.vo.region.RegionBaseInfoVO; +import com.cool.store.vo.region.RegionUserAndSubRegionVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -34,7 +35,7 @@ public class RegionController { @Resource private RegionService regionService; @Resource - ZoneService zoneService; + private ZoneService zoneService; @GetMapping("/getRegionList") public ResponseResult> getRegionBaseInfoList(){ @@ -52,4 +53,10 @@ public class RegionController { return ResponseResult.success(zoneService.queryAllBingZoneRegionList(type)); } + @ApiOperation("获取部门下的人和部门") + @GetMapping("/getRegionUserAndSubRegion") + public ResponseResult getRegionUserAndSubRegion(@RequestParam(value = "regionId")String regionId){ + return ResponseResult.success(regionService.getRegionUserAndSubRegion(regionId)); + } + } From b1e5bb2aef49cdf420bcae5b7ed2508d78ebf1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E7=AB=B9=E7=BA=A2?= Date: Wed, 19 Jul 2023 16:31:44 +0800 Subject: [PATCH 02/21] =?UTF-8?q?1.0=E4=BC=98=E5=8C=96=E9=A1=B9=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/HyIntendDevelopementMappingMapper.xml | 2 +- .../cool/store/entity/HyIntendDevelopementMappingDO.java | 2 +- .../store/service/impl/HyPartnerLineInfoServiceImpl.java | 7 +++---- .../com/cool/store/service/impl/InterviewServiceImpl.java | 2 +- .../java/com/cool/store/service/impl/ZoneServiceImpl.java | 4 ++-- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyIntendDevelopementMappingMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyIntendDevelopementMappingMapper.xml index 4af30f031..052e907bf 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/HyIntendDevelopementMappingMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/HyIntendDevelopementMappingMapper.xml @@ -3,7 +3,7 @@ - + diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyIntendDevelopementMappingDO.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyIntendDevelopementMappingDO.java index c91a0ebbe..e0ffe6f63 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyIntendDevelopementMappingDO.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyIntendDevelopementMappingDO.java @@ -22,7 +22,7 @@ public class HyIntendDevelopementMappingDO implements Serializable { private Long id; @ApiModelProperty("hy_intend_developement_zone_info.id") - private String mappingId; + private Long mappingId; @ApiModelProperty("hy_open_area_info.id或者区域ID") private String openAreaMappingId; diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/HyPartnerLineInfoServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/HyPartnerLineInfoServiceImpl.java index a733b4238..08af13797 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/HyPartnerLineInfoServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/HyPartnerLineInfoServiceImpl.java @@ -563,7 +563,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService { } List result = new ArrayList<>(); if (hyIntendDevelopementMappingDO!=null){ - HyIntendDevZoneInfoDO hyIntendDevZoneInfoDO = hyIntendDevZoneInfoDAO.selectById(Long.valueOf(hyIntendDevelopementMappingDO.getMappingId())); + HyIntendDevZoneInfoDO hyIntendDevZoneInfoDO = hyIntendDevZoneInfoDAO.selectById(hyIntendDevelopementMappingDO.getMappingId()); if (hyIntendDevZoneInfoDO!=null && StringUtil.isNotEmpty(hyIntendDevZoneInfoDO.getAssociatedRegionId())) { List list = JSONObject.parseArray(hyIntendDevZoneInfoDO.getAssociatedRegionId(), String.class); result.addAll(list); @@ -650,7 +650,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService { HyIntendDevelopementMappingDO hyIntendDevelopementMappingDO = hyIntendDevMappingDAO.selectByOpenAreaMappingId(Long.valueOf(wantShopArea),type); List result = new ArrayList<>(); if (hyIntendDevelopementMappingDO!=null){ - HyIntendDevZoneInfoDO hyIntendDevZoneInfoDO = hyIntendDevZoneInfoDAO.selectById(Long.valueOf(hyIntendDevelopementMappingDO.getMappingId())); + HyIntendDevZoneInfoDO hyIntendDevZoneInfoDO = hyIntendDevZoneInfoDAO.selectById(hyIntendDevelopementMappingDO.getMappingId()); if (hyIntendDevZoneInfoDO!=null && StringUtil.isNotEmpty(hyIntendDevZoneInfoDO.getAssociatedRegionId())) { List list = JSONObject.parseArray(hyIntendDevZoneInfoDO.getAssociatedRegionId(), String.class); result.addAll(list); @@ -658,8 +658,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService { } String userId = ""; List userListByRegionIds = enterpriseUserDAO.getUserListByRegionIds(result); - String zoneId = hyIntendDevelopementMappingDO.getMappingId(); - HyIntendDevZoneInfoDO hyIntendDevZoneInfoDO = hyIntendDevZoneInfoDAO.selectById(Long.valueOf(zoneId)); + HyIntendDevZoneInfoDO hyIntendDevZoneInfoDO = hyIntendDevZoneInfoDAO.selectById(hyIntendDevelopementMappingDO.getMappingId()); if (CollectionUtils.isNotEmpty(userListByRegionIds)){ List userIdList = userListByRegionIds.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()); int i = userIdList.indexOf(hyIntendDevZoneInfoDO.getLastAllotUserId()); diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewServiceImpl.java index bacb7b2d3..75b5f0fbc 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewServiceImpl.java @@ -147,7 +147,7 @@ public class InterviewServiceImpl implements InterviewService { return vo; } //查询开发主管 - EnterpriseUserDO development = enterpriseUserService.getDevelopmentByZoneId(Long.parseLong(hyIntendDevelopementMappingDO.getMappingId())); + EnterpriseUserDO development = enterpriseUserService.getDevelopmentByZoneId(hyIntendDevelopementMappingDO.getMappingId()); vo.setDevelopmentDirector(development); } return vo; diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ZoneServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ZoneServiceImpl.java index 56feba928..80f2d5763 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ZoneServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ZoneServiceImpl.java @@ -72,7 +72,7 @@ public class ZoneServiceImpl implements ZoneService { HyIntendDevelopementMappingDO hyIntendDevelopementMappingDO = new HyIntendDevelopementMappingDO(); hyIntendDevelopementMappingDO.setType(intentAreaSettingRequest.getType()); hyIntendDevelopementMappingDO.setOpenAreaMappingId(String.valueOf(x)); - hyIntendDevelopementMappingDO.setMappingId(String.valueOf(hyIntendDevZoneInfoDO.getId())); + hyIntendDevelopementMappingDO.setMappingId(hyIntendDevZoneInfoDO.getId()); list.add(hyIntendDevelopementMappingDO); }); hyIntendDevMappingDAO.batchInsert(list); @@ -100,7 +100,7 @@ public class ZoneServiceImpl implements ZoneService { HyIntendDevelopementMappingDO hyIntendDevelopementMappingDO = new HyIntendDevelopementMappingDO(); hyIntendDevelopementMappingDO.setType(intentAreaSettingRequest.getType()); hyIntendDevelopementMappingDO.setOpenAreaMappingId(String.valueOf(x)); - hyIntendDevelopementMappingDO.setMappingId(String.valueOf(hyIntendDevZoneInfoDO.getId())); + hyIntendDevelopementMappingDO.setMappingId((hyIntendDevZoneInfoDO.getId())); list.add(hyIntendDevelopementMappingDO); }); hyIntendDevMappingDAO.batchInsert(list); From f7fb4544816de2492dd1ff9005d5328df47c5a66 Mon Sep 17 00:00:00 2001 From: "feng.li" Date: Wed, 19 Jul 2023 16:57:26 +0800 Subject: [PATCH 03/21] =?UTF-8?q?=E9=9D=A2=E8=AF=95=E7=A8=BD=E6=A0=B8?= =?UTF-8?q?=E6=93=8D=E4=BD=9Cfirst-commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cool/store/mapper/HyInspectionMapper.java | 19 ++ .../HyInterviewInspectionLogMapper.java | 19 ++ .../resources/mapper/HyInspectionMapper.xml | 201 ++++++++++++++++++ .../mapper/HyInterviewInspectionLogMapper.xml | 155 ++++++++++++++ .../com/cool/store/entity/HyInspection.java | 166 +++++++++++++++ .../entity/HyInterviewInspectionLog.java | 122 +++++++++++ .../cool/store/service/InspectionService.java | 9 + .../service/impl/InspectionServiceImpl.java | 23 ++ .../controller/InspectionController.java | 34 +++ 9 files changed, 748 insertions(+) create mode 100644 coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionMapper.java create mode 100644 coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInterviewInspectionLogMapper.java create mode 100644 coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml create mode 100644 coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspection.java create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLog.java create mode 100644 coolstore-partner-service/src/main/java/com/cool/store/service/InspectionService.java create mode 100644 coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionServiceImpl.java create mode 100644 coolstore-partner-webb/src/main/java/com/cool/store/controller/InspectionController.java diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionMapper.java new file mode 100644 index 000000000..1fa86ae6d --- /dev/null +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionMapper.java @@ -0,0 +1,19 @@ +package com.cool.store.mapper; + +import com.cool.store.entity.HyInspection; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface HyInspectionMapper { + int deleteByPrimaryKey(Long id); + + int insert(HyInspection record); + + int insertSelective(HyInspection record); + + HyInspection selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(HyInspection record); + + int updateByPrimaryKey(HyInspection record); +} \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInterviewInspectionLogMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInterviewInspectionLogMapper.java new file mode 100644 index 000000000..c5fea072d --- /dev/null +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInterviewInspectionLogMapper.java @@ -0,0 +1,19 @@ +package com.cool.store.mapper; + +import com.cool.store.entity.HyInterviewInspectionLog; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface HyInterviewInspectionLogMapper { + int deleteByPrimaryKey(Long id); + + int insert(HyInterviewInspectionLog record); + + int insertSelective(HyInterviewInspectionLog record); + + HyInterviewInspectionLog selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(HyInterviewInspectionLog record); + + int updateByPrimaryKey(HyInterviewInspectionLog record); +} \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml new file mode 100644 index 000000000..2155a6589 --- /dev/null +++ b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + id, interview_plan_id, operator_user_id, type, status, files, description, inspection_time, + creator, updator, remark, deleted, create_time, update_time + + + + delete from hy_inspection + where id = #{id,jdbcType=BIGINT} + + + insert into hy_inspection (id, interview_plan_id, operator_user_id, + type, status, files, + description, inspection_time, creator, + updator, remark, deleted, + create_time, update_time) + values (#{id,jdbcType=BIGINT}, #{interviewPlanId,jdbcType=BIGINT}, #{operatorUserId,jdbcType=VARCHAR}, + #{type,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{files,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{inspectionTime,jdbcType=TIMESTAMP}, #{creator,jdbcType=VARCHAR}, + #{updator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{deleted,jdbcType=BIT}, + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) + + + insert into hy_inspection + + + id, + + + interview_plan_id, + + + operator_user_id, + + + type, + + + status, + + + files, + + + description, + + + inspection_time, + + + creator, + + + updator, + + + remark, + + + deleted, + + + create_time, + + + update_time, + + + + + #{id,jdbcType=BIGINT}, + + + #{interviewPlanId,jdbcType=BIGINT}, + + + #{operatorUserId,jdbcType=VARCHAR}, + + + #{type,jdbcType=TINYINT}, + + + #{status,jdbcType=TINYINT}, + + + #{files,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{inspectionTime,jdbcType=TIMESTAMP}, + + + #{creator,jdbcType=VARCHAR}, + + + #{updator,jdbcType=VARCHAR}, + + + #{remark,jdbcType=VARCHAR}, + + + #{deleted,jdbcType=BIT}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update hy_inspection + + + interview_plan_id = #{interviewPlanId,jdbcType=BIGINT}, + + + operator_user_id = #{operatorUserId,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=TINYINT}, + + + status = #{status,jdbcType=TINYINT}, + + + files = #{files,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + inspection_time = #{inspectionTime,jdbcType=TIMESTAMP}, + + + creator = #{creator,jdbcType=VARCHAR}, + + + updator = #{updator,jdbcType=VARCHAR}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + deleted = #{deleted,jdbcType=BIT}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=BIGINT} + + + update hy_inspection + set interview_plan_id = #{interviewPlanId,jdbcType=BIGINT}, + operator_user_id = #{operatorUserId,jdbcType=VARCHAR}, + type = #{type,jdbcType=TINYINT}, + status = #{status,jdbcType=TINYINT}, + files = #{files,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + inspection_time = #{inspectionTime,jdbcType=TIMESTAMP}, + creator = #{creator,jdbcType=VARCHAR}, + updator = #{updator,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + deleted = #{deleted,jdbcType=BIT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml new file mode 100644 index 000000000..3c4f2f09a --- /dev/null +++ b/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + id, operator_user_id, inspection_id, operation_type, description, files, operation_time, + remark, create_time, update_time + + + + delete from hy_interview_inspection_log + where id = #{id,jdbcType=BIGINT} + + + insert into hy_interview_inspection_log (id, operator_user_id, inspection_id, + operation_type, description, files, + operation_time, remark, create_time, + update_time) + values (#{id,jdbcType=BIGINT}, #{operatorUserId,jdbcType=VARCHAR}, #{inspectionId,jdbcType=BIGINT}, + #{operationType,jdbcType=TINYINT}, #{description,jdbcType=VARCHAR}, #{files,jdbcType=VARCHAR}, + #{operationTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{updateTime,jdbcType=TIMESTAMP}) + + + insert into hy_interview_inspection_log + + + id, + + + operator_user_id, + + + inspection_id, + + + operation_type, + + + description, + + + files, + + + operation_time, + + + remark, + + + create_time, + + + update_time, + + + + + #{id,jdbcType=BIGINT}, + + + #{operatorUserId,jdbcType=VARCHAR}, + + + #{inspectionId,jdbcType=BIGINT}, + + + #{operationType,jdbcType=TINYINT}, + + + #{description,jdbcType=VARCHAR}, + + + #{files,jdbcType=VARCHAR}, + + + #{operationTime,jdbcType=TIMESTAMP}, + + + #{remark,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + update hy_interview_inspection_log + + + operator_user_id = #{operatorUserId,jdbcType=VARCHAR}, + + + inspection_id = #{inspectionId,jdbcType=BIGINT}, + + + operation_type = #{operationType,jdbcType=TINYINT}, + + + description = #{description,jdbcType=VARCHAR}, + + + files = #{files,jdbcType=VARCHAR}, + + + operation_time = #{operationTime,jdbcType=TIMESTAMP}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=BIGINT} + + + update hy_interview_inspection_log + set operator_user_id = #{operatorUserId,jdbcType=VARCHAR}, + inspection_id = #{inspectionId,jdbcType=BIGINT}, + operation_type = #{operationType,jdbcType=TINYINT}, + description = #{description,jdbcType=VARCHAR}, + files = #{files,jdbcType=VARCHAR}, + operation_time = #{operationTime,jdbcType=TIMESTAMP}, + remark = #{remark,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspection.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspection.java new file mode 100644 index 000000000..0751ffc09 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspection.java @@ -0,0 +1,166 @@ +package com.cool.store.entity; + +import java.time.LocalDateTime; + +public class HyInspection { + private Long id; + + private Long interviewPlanId; + + private String operatorUserId; + + private Byte type; + + private Byte status; + + private String files; + + private String description; + + private LocalDateTime inspectionTime; + + private String creator; + + private String updator; + + private String remark; + + private Boolean deleted; + + private String createTime; + + private LocalDateTime updateTime; + + public HyInspection(Long id, Long interviewPlanId, String operatorUserId, Byte type, Byte status, String files, String description, LocalDateTime inspectionTime, String creator, String updator, String remark, Boolean deleted, String createTime, LocalDateTime updateTime) { + this.id = id; + this.interviewPlanId = interviewPlanId; + this.operatorUserId = operatorUserId; + this.type = type; + this.status = status; + this.files = files; + this.description = description; + this.inspectionTime = inspectionTime; + this.creator = creator; + this.updator = updator; + this.remark = remark; + this.deleted = deleted; + this.createTime = createTime; + this.updateTime = updateTime; + } + + public HyInspection() { + super(); + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getInterviewPlanId() { + return interviewPlanId; + } + + public void setInterviewPlanId(Long interviewPlanId) { + this.interviewPlanId = interviewPlanId; + } + + public String getOperatorUserId() { + return operatorUserId; + } + + public void setOperatorUserId(String operatorUserId) { + this.operatorUserId = operatorUserId == null ? null : operatorUserId.trim(); + } + + public Byte getType() { + return type; + } + + public void setType(Byte type) { + this.type = type; + } + + public Byte getStatus() { + return status; + } + + public void setStatus(Byte status) { + this.status = status; + } + + public String getFiles() { + return files; + } + + public void setFiles(String files) { + this.files = files == null ? null : files.trim(); + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public LocalDateTime getInspectionTime() { + return inspectionTime; + } + + public void setInspectionTime(LocalDateTime inspectionTime) { + this.inspectionTime = inspectionTime; + } + + public String getCreator() { + return creator; + } + + public void setCreator(String creator) { + this.creator = creator == null ? null : creator.trim(); + } + + public String getUpdator() { + return updator; + } + + public void setUpdator(String updator) { + this.updator = updator == null ? null : updator.trim(); + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public Boolean getDeleted() { + return deleted; + } + + public void setDeleted(Boolean deleted) { + this.deleted = deleted; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime == null ? null : createTime.trim(); + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } +} \ No newline at end of file diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLog.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLog.java new file mode 100644 index 000000000..bfe3f1921 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLog.java @@ -0,0 +1,122 @@ +package com.cool.store.entity; + +import java.time.LocalDateTime; + +public class HyInterviewInspectionLog { + private Long id; + + private String operatorUserId; + + private Long inspectionId; + + private Byte operationType; + + private String description; + + private String files; + + private LocalDateTime operationTime; + + private String remark; + + private String createTime; + + private LocalDateTime updateTime; + + public HyInterviewInspectionLog(Long id, String operatorUserId, Long inspectionId, Byte operationType, String description, String files, LocalDateTime operationTime, String remark, String createTime, LocalDateTime updateTime) { + this.id = id; + this.operatorUserId = operatorUserId; + this.inspectionId = inspectionId; + this.operationType = operationType; + this.description = description; + this.files = files; + this.operationTime = operationTime; + this.remark = remark; + this.createTime = createTime; + this.updateTime = updateTime; + } + + public HyInterviewInspectionLog() { + super(); + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getOperatorUserId() { + return operatorUserId; + } + + public void setOperatorUserId(String operatorUserId) { + this.operatorUserId = operatorUserId == null ? null : operatorUserId.trim(); + } + + public Long getInspectionId() { + return inspectionId; + } + + public void setInspectionId(Long inspectionId) { + this.inspectionId = inspectionId; + } + + public Byte getOperationType() { + return operationType; + } + + public void setOperationType(Byte operationType) { + this.operationType = operationType; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public String getFiles() { + return files; + } + + public void setFiles(String files) { + this.files = files == null ? null : files.trim(); + } + + public LocalDateTime getOperationTime() { + return operationTime; + } + + public void setOperationTime(LocalDateTime operationTime) { + this.operationTime = operationTime; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime == null ? null : createTime.trim(); + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } +} \ No newline at end of file diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/InspectionService.java b/coolstore-partner-service/src/main/java/com/cool/store/service/InspectionService.java new file mode 100644 index 000000000..9003efbb2 --- /dev/null +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/InspectionService.java @@ -0,0 +1,9 @@ +package com.cool.store.service; + +/** + * @author Fun Li + * @version 1.0 + * @date 2023/7/19 16:50 + */ +public interface InspectionService { +} diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionServiceImpl.java new file mode 100644 index 000000000..51454b94f --- /dev/null +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionServiceImpl.java @@ -0,0 +1,23 @@ +package com.cool.store.service.impl; + +import com.cool.store.entity.HyInterviewInspectionLog; +import com.cool.store.mapper.HyInspectionMapper; +import com.cool.store.service.InspectionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * @author Fun Li + * @version 1.0 + * @date 2023/7/19 16:50 + */ +@Service +public class InspectionServiceImpl implements InspectionService { + + @Autowired + private HyInspectionMapper inspectionMapper; + + @Autowired + private HyInterviewInspectionLog interviewInspectionLog; + +} diff --git a/coolstore-partner-webb/src/main/java/com/cool/store/controller/InspectionController.java b/coolstore-partner-webb/src/main/java/com/cool/store/controller/InspectionController.java new file mode 100644 index 000000000..83af4eaba --- /dev/null +++ b/coolstore-partner-webb/src/main/java/com/cool/store/controller/InspectionController.java @@ -0,0 +1,34 @@ +package com.cool.store.controller; + +import com.cool.store.response.ResponseResult; +import com.cool.store.service.InspectionService; +import io.swagger.annotations.Api; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author Fun Li + * @version 1.0 + * @date 2023/7/19 16:48 + */ +@RestController +@RequestMapping("/inspection/interview") +@Api(tags = "面试稽核") +public class InspectionController { + + @Autowired + private InspectionService inspectionService; + + @PostMapping("/submission") + public ResponseResult interviewInspectionSubmit() { + return ResponseResult.success(); + } + + @PostMapping("/revocation") + public ResponseResult interviewInspectionRevoke() { + return ResponseResult.success(); + } + +} From bc5d10ac26ebb09914756808a63403b6a7ca47c3 Mon Sep 17 00:00:00 2001 From: "feng.li" Date: Wed, 19 Jul 2023 17:04:40 +0800 Subject: [PATCH 04/21] =?UTF-8?q?=E9=9D=A2=E8=AF=95=E7=A8=BD=E6=A0=B8?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E7=B1=BB=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...spectionService.java => InterviewInspectionService.java} | 2 +- ...ServiceImpl.java => InterviewInspectionServiceImpl.java} | 4 ++-- ...onController.java => InterviewInspectionController.java} | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) rename coolstore-partner-service/src/main/java/com/cool/store/service/{InspectionService.java => InterviewInspectionService.java} (68%) rename coolstore-partner-service/src/main/java/com/cool/store/service/impl/{InspectionServiceImpl.java => InterviewInspectionServiceImpl.java} (76%) rename coolstore-partner-webb/src/main/java/com/cool/store/controller/{InspectionController.java => InterviewInspectionController.java} (82%) diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/InspectionService.java b/coolstore-partner-service/src/main/java/com/cool/store/service/InterviewInspectionService.java similarity index 68% rename from coolstore-partner-service/src/main/java/com/cool/store/service/InspectionService.java rename to coolstore-partner-service/src/main/java/com/cool/store/service/InterviewInspectionService.java index 9003efbb2..9f3ebe7a6 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/InspectionService.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/InterviewInspectionService.java @@ -5,5 +5,5 @@ package com.cool.store.service; * @version 1.0 * @date 2023/7/19 16:50 */ -public interface InspectionService { +public interface InterviewInspectionService { } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java similarity index 76% rename from coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionServiceImpl.java rename to coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java index 51454b94f..c95807c77 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java @@ -2,7 +2,7 @@ package com.cool.store.service.impl; import com.cool.store.entity.HyInterviewInspectionLog; import com.cool.store.mapper.HyInspectionMapper; -import com.cool.store.service.InspectionService; +import com.cool.store.service.InterviewInspectionService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -12,7 +12,7 @@ import org.springframework.stereotype.Service; * @date 2023/7/19 16:50 */ @Service -public class InspectionServiceImpl implements InspectionService { +public class InterviewInspectionServiceImpl implements InterviewInspectionService { @Autowired private HyInspectionMapper inspectionMapper; diff --git a/coolstore-partner-webb/src/main/java/com/cool/store/controller/InspectionController.java b/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java similarity index 82% rename from coolstore-partner-webb/src/main/java/com/cool/store/controller/InspectionController.java rename to coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java index 83af4eaba..484ee3785 100644 --- a/coolstore-partner-webb/src/main/java/com/cool/store/controller/InspectionController.java +++ b/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java @@ -1,7 +1,7 @@ package com.cool.store.controller; import com.cool.store.response.ResponseResult; -import com.cool.store.service.InspectionService; +import com.cool.store.service.InterviewInspectionService; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -16,10 +16,10 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/inspection/interview") @Api(tags = "面试稽核") -public class InspectionController { +public class InterviewInspectionController { @Autowired - private InspectionService inspectionService; + private InterviewInspectionService interviewInspectionService; @PostMapping("/submission") public ResponseResult interviewInspectionSubmit() { From 890dc4c47912cab5b7b69ffef6a7b7f4ff4ddda6 Mon Sep 17 00:00:00 2001 From: "feng.li" Date: Wed, 19 Jul 2023 18:37:03 +0800 Subject: [PATCH 05/21] =?UTF-8?q?=E9=9D=A2=E8=AF=95=E7=A8=BD=E6=A0=B8?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E5=90=88=E6=A0=BC=E4=B8=8D=E5=90=88=E6=A0=BC?= =?UTF-8?q?=E5=8F=8A=E6=92=A4=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cool/store/enums/ErrorCodeEnum.java | 1 + .../enums/InspectionOperationTypeEnum.java | 33 ++++++++ .../store/enums/InspectionStatusEnum.java | 32 +++++++ .../cool/store/enums/InspectionTyeEnum.java | 29 +++++++ .../resources/mapper/HyInspectionMapper.xml | 18 ++-- .../interview/InspectionRevocationDTO.java | 25 ++++++ .../interview/InspectionSubmissionDTO.java | 29 +++++++ .../com/cool/store/entity/HyInspection.java | 26 +++--- .../entity/HyInterviewInspectionLog.java | 22 +++-- .../service/InterviewInspectionService.java | 15 ++++ .../impl/InterviewInspectionServiceImpl.java | 83 ++++++++++++++++++- .../InterviewInspectionController.java | 10 ++- 12 files changed, 286 insertions(+), 37 deletions(-) create mode 100644 coolstore-partner-common/src/main/java/com/cool/store/enums/InspectionOperationTypeEnum.java create mode 100644 coolstore-partner-common/src/main/java/com/cool/store/enums/InspectionStatusEnum.java create mode 100644 coolstore-partner-common/src/main/java/com/cool/store/enums/InspectionTyeEnum.java create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/dto/inspection/interview/InspectionRevocationDTO.java create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/dto/inspection/interview/InspectionSubmissionDTO.java diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java index 81a9779bb..34a46bbcf 100644 --- a/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java +++ b/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java @@ -83,6 +83,7 @@ public enum ErrorCodeEnum { GET_ACCESSTOKEN_ERROR(600001, "获取小程序TOKEN错误!", null), NEW_MOBILE_HAS_EXIST(600002,"加盟商用户信息已存在",null), INSPECTION_USER_OCCUPY(600002,"当前稽核人已经配置其他战区",null), + INSPECTION_INFO_NOT_EXIST(600005, "稽核信息不存在!", null) ; diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/InspectionOperationTypeEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/InspectionOperationTypeEnum.java new file mode 100644 index 000000000..2656b91e1 --- /dev/null +++ b/coolstore-partner-common/src/main/java/com/cool/store/enums/InspectionOperationTypeEnum.java @@ -0,0 +1,33 @@ +package com.cool.store.enums; + +/** + * @author Fun Li + * @version 1.0 + * @date 2023/7/19 17:55 + */ +//稽核操作类型 +public enum InspectionOperationTypeEnum { + + PASS(0, "合格"), + NOT_PASS(1, "不合格"), + REVOCATION(2, "撤销"); + + private Integer code; + + private String type; + + InspectionOperationTypeEnum(Integer code, String type) { + this.code = code; + this.type = type; + } + + public Integer getCode() { + return code; + } + + public String getType() { + return type; + } + + +} diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/InspectionStatusEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/InspectionStatusEnum.java new file mode 100644 index 000000000..b86464259 --- /dev/null +++ b/coolstore-partner-common/src/main/java/com/cool/store/enums/InspectionStatusEnum.java @@ -0,0 +1,32 @@ +package com.cool.store.enums; + +/** + * @author Fun Li + * @version 1.0 + * @date 2023/7/19 17:22 + */ +//稽核信息状态 +public enum InspectionStatusEnum { + + NOT_INSPECT(0, "未稽核"), + PASS(1, "合格"), + NOT_PASS(2, "不合格"); + + private Integer code; + + private String type; + + InspectionStatusEnum(Integer code, String type) { + this.code = code; + this.type = type; + } + + public Integer getCode() { + return code; + } + + public String getType() { + return type; + } + +} diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/InspectionTyeEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/InspectionTyeEnum.java new file mode 100644 index 000000000..712db6357 --- /dev/null +++ b/coolstore-partner-common/src/main/java/com/cool/store/enums/InspectionTyeEnum.java @@ -0,0 +1,29 @@ +package com.cool.store.enums; + +/** + * @author Fun Li + * @version 1.0 + * @date 2023/7/19 17:16 + */ +//稽核类型 +public enum InspectionTyeEnum { + + INTERVIEW_INSPECTION(0, "面试稽核"); + + private Integer code; + + private String type; + + InspectionTyeEnum(Integer code, String type) { + this.code = code; + this.type = type; + } + + public Integer getCode() { + return code; + } + + public String getType() { + return type; + } +} diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml index 2155a6589..c577270c4 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml @@ -27,11 +27,11 @@ select from hy_inspection - where id = #{id,jdbcType=BIGINT} + where id = #{id} delete from hy_inspection - where id = #{id,jdbcType=BIGINT} + where id = #{id} insert into hy_inspection (id, interview_plan_id, operator_user_id, @@ -39,7 +39,7 @@ description, inspection_time, creator, updator, remark, deleted, create_time, update_time) - values (#{id,jdbcType=BIGINT}, #{interviewPlanId,jdbcType=BIGINT}, #{operatorUserId,jdbcType=VARCHAR}, + values (#{id}, #{interviewPlanId}, #{operatorUserId,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{files,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{inspectionTime,jdbcType=TIMESTAMP}, #{creator,jdbcType=VARCHAR}, #{updator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{deleted,jdbcType=BIT}, @@ -93,10 +93,10 @@ - #{id,jdbcType=BIGINT}, + #{id}, - #{interviewPlanId,jdbcType=BIGINT}, + #{interviewPlanId}, #{operatorUserId,jdbcType=VARCHAR}, @@ -140,7 +140,7 @@ update hy_inspection - interview_plan_id = #{interviewPlanId,jdbcType=BIGINT}, + interview_plan_id = #{interviewPlanId}, operator_user_id = #{operatorUserId,jdbcType=VARCHAR}, @@ -179,11 +179,11 @@ update_time = #{updateTime,jdbcType=TIMESTAMP}, - where id = #{id,jdbcType=BIGINT} + where id = #{id} update hy_inspection - set interview_plan_id = #{interviewPlanId,jdbcType=BIGINT}, + set interview_plan_id = #{interviewPlanId}, operator_user_id = #{operatorUserId,jdbcType=VARCHAR}, type = #{type,jdbcType=TINYINT}, status = #{status,jdbcType=TINYINT}, @@ -196,6 +196,6 @@ deleted = #{deleted,jdbcType=BIT}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP} - where id = #{id,jdbcType=BIGINT} + where id = #{id} \ No newline at end of file diff --git a/coolstore-partner-model/src/main/java/com/cool/store/dto/inspection/interview/InspectionRevocationDTO.java b/coolstore-partner-model/src/main/java/com/cool/store/dto/inspection/interview/InspectionRevocationDTO.java new file mode 100644 index 000000000..8e960b269 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/dto/inspection/interview/InspectionRevocationDTO.java @@ -0,0 +1,25 @@ +package com.cool.store.dto.inspection.interview; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author Fun Li + * @version 1.0 + * @date 2023/7/19 17:47 + */ +@Data +public class InspectionRevocationDTO { + + @ApiModelProperty("稽核信息Id") + private Long inspectionId; + + @ApiModelProperty("操作说明") + private String description; + + @ApiModelProperty("多凭证文件链接集合") + private List files; + +} diff --git a/coolstore-partner-model/src/main/java/com/cool/store/dto/inspection/interview/InspectionSubmissionDTO.java b/coolstore-partner-model/src/main/java/com/cool/store/dto/inspection/interview/InspectionSubmissionDTO.java new file mode 100644 index 000000000..398bd3741 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/dto/inspection/interview/InspectionSubmissionDTO.java @@ -0,0 +1,29 @@ +package com.cool.store.dto.inspection.interview; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author Fun Li + * @version 1.0 + * @date 2023/7/19 17:05 + */ +@Data +public class InspectionSubmissionDTO { + + @ApiModelProperty(value = "稽核信息表id", required = true) + private Long inspectionId; + + @ApiModelProperty(value = "是否合格,0为不合格,1为合格", required = true) + private Integer whetherPass; + + @ApiModelProperty("稽核说明,仅当不合格时为必传项") + private String description; + + @ApiModelProperty("稽核多凭证文件链接") + private List files; + +} diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspection.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspection.java index 0751ffc09..d463b5570 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspection.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspection.java @@ -9,15 +9,15 @@ public class HyInspection { private String operatorUserId; - private Byte type; + private Integer type; - private Byte status; + private Integer status; private String files; private String description; - private LocalDateTime inspectionTime; + private String inspectionTime; private String creator; @@ -29,9 +29,9 @@ public class HyInspection { private String createTime; - private LocalDateTime updateTime; + private String updateTime; - public HyInspection(Long id, Long interviewPlanId, String operatorUserId, Byte type, Byte status, String files, String description, LocalDateTime inspectionTime, String creator, String updator, String remark, Boolean deleted, String createTime, LocalDateTime updateTime) { + public HyInspection(Long id, Long interviewPlanId, String operatorUserId, Integer type, Integer status, String files, String description, String inspectionTime, String creator, String updator, String remark, Boolean deleted, String createTime, String updateTime) { this.id = id; this.interviewPlanId = interviewPlanId; this.operatorUserId = operatorUserId; @@ -76,19 +76,19 @@ public class HyInspection { this.operatorUserId = operatorUserId == null ? null : operatorUserId.trim(); } - public Byte getType() { + public Integer getType() { return type; } - public void setType(Byte type) { + public void setType(Integer type) { this.type = type; } - public Byte getStatus() { + public Integer getStatus() { return status; } - public void setStatus(Byte status) { + public void setStatus(Integer status) { this.status = status; } @@ -108,11 +108,11 @@ public class HyInspection { this.description = description == null ? null : description.trim(); } - public LocalDateTime getInspectionTime() { + public String getInspectionTime() { return inspectionTime; } - public void setInspectionTime(LocalDateTime inspectionTime) { + public void setInspectionTime(String inspectionTime) { this.inspectionTime = inspectionTime; } @@ -156,11 +156,11 @@ public class HyInspection { this.createTime = createTime == null ? null : createTime.trim(); } - public LocalDateTime getUpdateTime() { + public String getUpdateTime() { return updateTime; } - public void setUpdateTime(LocalDateTime updateTime) { + public void setUpdateTime(String updateTime) { this.updateTime = updateTime; } } \ No newline at end of file diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLog.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLog.java index bfe3f1921..9742533cc 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLog.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLog.java @@ -1,7 +1,5 @@ package com.cool.store.entity; -import java.time.LocalDateTime; - public class HyInterviewInspectionLog { private Long id; @@ -9,21 +7,21 @@ public class HyInterviewInspectionLog { private Long inspectionId; - private Byte operationType; + private Integer operationType; private String description; private String files; - private LocalDateTime operationTime; + private String operationTime; private String remark; private String createTime; - private LocalDateTime updateTime; + private String updateTime; - public HyInterviewInspectionLog(Long id, String operatorUserId, Long inspectionId, Byte operationType, String description, String files, LocalDateTime operationTime, String remark, String createTime, LocalDateTime updateTime) { + public HyInterviewInspectionLog(Long id, String operatorUserId, Long inspectionId, Integer operationType, String description, String files, String operationTime, String remark, String createTime, String updateTime) { this.id = id; this.operatorUserId = operatorUserId; this.inspectionId = inspectionId; @@ -64,11 +62,11 @@ public class HyInterviewInspectionLog { this.inspectionId = inspectionId; } - public Byte getOperationType() { + public Integer getOperationType() { return operationType; } - public void setOperationType(Byte operationType) { + public void setOperationType(Integer operationType) { this.operationType = operationType; } @@ -88,11 +86,11 @@ public class HyInterviewInspectionLog { this.files = files == null ? null : files.trim(); } - public LocalDateTime getOperationTime() { + public String getOperationTime() { return operationTime; } - public void setOperationTime(LocalDateTime operationTime) { + public void setOperationTime(String operationTime) { this.operationTime = operationTime; } @@ -112,11 +110,11 @@ public class HyInterviewInspectionLog { this.createTime = createTime == null ? null : createTime.trim(); } - public LocalDateTime getUpdateTime() { + public String getUpdateTime() { return updateTime; } - public void setUpdateTime(LocalDateTime updateTime) { + public void setUpdateTime(String updateTime) { this.updateTime = updateTime; } } \ No newline at end of file diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/InterviewInspectionService.java b/coolstore-partner-service/src/main/java/com/cool/store/service/InterviewInspectionService.java index 9f3ebe7a6..b32075bee 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/InterviewInspectionService.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/InterviewInspectionService.java @@ -1,9 +1,24 @@ package com.cool.store.service; +import com.cool.store.dto.inspection.interview.InspectionRevocationDTO; +import com.cool.store.dto.inspection.interview.InspectionSubmissionDTO; +import com.cool.store.exception.ApiException; + /** * @author Fun Li * @version 1.0 * @date 2023/7/19 16:50 */ public interface InterviewInspectionService { + + /** + * 提交稽核结果 + */ + void submit(InspectionSubmissionDTO dto); + + /** + * 撤销稽核结果 + */ + void revoke(InspectionRevocationDTO dto) throws ApiException; + } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java index c95807c77..bacc530f1 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java @@ -1,11 +1,27 @@ package com.cool.store.service.impl; +import cn.hutool.core.date.DateUtil; +import com.cool.store.context.CurrentUserHolder; +import com.cool.store.dto.inspection.interview.InspectionRevocationDTO; +import com.cool.store.dto.inspection.interview.InspectionSubmissionDTO; +import com.cool.store.entity.HyInspection; import com.cool.store.entity.HyInterviewInspectionLog; +import com.cool.store.enums.ErrorCodeEnum; +import com.cool.store.enums.InspectionOperationTypeEnum; +import com.cool.store.enums.InspectionStatusEnum; +import com.cool.store.enums.InspectionTyeEnum; +import com.cool.store.exception.ApiException; import com.cool.store.mapper.HyInspectionMapper; +import com.cool.store.mapper.HyInterviewInspectionLogMapper; import com.cool.store.service.InterviewInspectionService; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + /** * @author Fun Li * @version 1.0 @@ -18,6 +34,71 @@ public class InterviewInspectionServiceImpl implements InterviewInspectionServic private HyInspectionMapper inspectionMapper; @Autowired - private HyInterviewInspectionLog interviewInspectionLog; + private HyInterviewInspectionLogMapper interviewInspectionLogMapper; + + @Override + public void submit(InspectionSubmissionDTO dto) { + HyInspection hyInspection = new HyInspection(); + //稽核结果和说明及文件等 + hyInspection.setId(dto.getInspectionId()); + if (dto.getWhetherPass().equals(0)) { + hyInspection.setStatus(InspectionStatusEnum.NOT_PASS.getCode()); + } else if (dto.getWhetherPass().equals(1)) { + hyInspection.setStatus(InspectionStatusEnum.PASS.getCode()); + } + hyInspection.setDescription(dto.getDescription()); + String filesStr = spliceFiles(dto.getFiles()); + hyInspection.setFiles(filesStr); + //稽核人,稽核时间 + hyInspection.setOperatorUserId(CurrentUserHolder.getUserId()); + hyInspection.setUpdator(CurrentUserHolder.getUserId()); + hyInspection.setInspectionTime(DateUtil.now()); + inspectionMapper.updateByPrimaryKeySelective(hyInspection); + } + + @Override + public void revoke(InspectionRevocationDTO dto) throws ApiException { + //2.1 查询之前的一次操作 + HyInspection hyInspection = inspectionMapper.selectByPrimaryKey(dto.getInspectionId()); + if (Objects.isNull(hyInspection)) { + throw new ApiException(ErrorCodeEnum.INSPECTION_INFO_NOT_EXIST); + } + //1. 撤销操作记录写入数据库面试稽核操作记录表 + HyInterviewInspectionLog inspectionLog = new HyInterviewInspectionLog(); + inspectionLog.setOperatorUserId(CurrentUserHolder.getUserId()); + inspectionLog.setInspectionId(dto.getInspectionId()); + inspectionLog.setOperationType(InspectionOperationTypeEnum.REVOCATION.getCode()); + inspectionLog.setDescription(dto.getDescription()); + String filesStr = spliceFiles(dto.getFiles()); + inspectionLog.setOperationTime(DateUtil.now()); + inspectionLog.setFiles(filesStr); + interviewInspectionLogMapper.updateByPrimaryKeySelective(inspectionLog); + //2. 撤销操作之前的一次操作写入面试稽核操作记录表 + inspectionLog.setOperatorUserId(hyInspection.getOperatorUserId()); + inspectionLog.setInspectionId(hyInspection.getId()); + if (hyInspection.getStatus().equals(1)) { + inspectionLog.setOperationType(InspectionOperationTypeEnum.PASS.getCode()); + } else if (hyInspection.getStatus().equals(2)) { + inspectionLog.setOperationType(InspectionOperationTypeEnum.NOT_PASS.getCode()); + } + inspectionLog.setDescription(hyInspection.getDescription()); + inspectionLog.setFiles(hyInspection.getFiles()); + inspectionLog.setOperationTime(DateUtil.now()); + //3. 撤销操作之前的一次操作稽核信息状态修改为未稽核,并且将数据状态(其他字段)也恢复到未稽核时的状态 + hyInspection.setOperatorUserId(null); + hyInspection.setStatus(InspectionStatusEnum.NOT_INSPECT.getCode()); + hyInspection.setFiles(null); + hyInspection.setDescription(null); + hyInspection.setInspectionTime(null); + hyInspection.setUpdator(null); + inspectionMapper.updateByPrimaryKey(hyInspection); + } + + private String spliceFiles(List files) { + if (files == null || files.size() == 0) { + return null; + } + return files.stream().map(String::valueOf).collect(Collectors.joining(",")); + } } diff --git a/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java b/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java index 484ee3785..60dd772af 100644 --- a/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java +++ b/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java @@ -1,10 +1,14 @@ package com.cool.store.controller; +import com.cool.store.dto.inspection.interview.InspectionRevocationDTO; +import com.cool.store.dto.inspection.interview.InspectionSubmissionDTO; +import com.cool.store.exception.ApiException; import com.cool.store.response.ResponseResult; import com.cool.store.service.InterviewInspectionService; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -22,12 +26,14 @@ public class InterviewInspectionController { private InterviewInspectionService interviewInspectionService; @PostMapping("/submission") - public ResponseResult interviewInspectionSubmit() { + public ResponseResult interviewInspectionSubmit(@RequestBody InspectionSubmissionDTO dto) { + interviewInspectionService.submit(dto); return ResponseResult.success(); } @PostMapping("/revocation") - public ResponseResult interviewInspectionRevoke() { + public ResponseResult interviewInspectionRevoke(@RequestBody InspectionRevocationDTO dto) throws ApiException { + interviewInspectionService.revoke(dto); return ResponseResult.success(); } From 5cd71951051ab02e8aaa64217a8d7a68f956dd91 Mon Sep 17 00:00:00 2001 From: "feng.li" Date: Wed, 19 Jul 2023 18:51:55 +0800 Subject: [PATCH 06/21] =?UTF-8?q?=E9=9D=A2=E8=AF=95=E7=A8=BD=E6=A0=B8?= =?UTF-8?q?=E6=93=8D=E4=BD=9Cupdate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cool/store/controller/InterviewInspectionController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java b/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java index 60dd772af..eff1c3cd8 100644 --- a/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java +++ b/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java @@ -6,6 +6,7 @@ import com.cool.store.exception.ApiException; import com.cool.store.response.ResponseResult; import com.cool.store.service.InterviewInspectionService; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -26,12 +27,14 @@ public class InterviewInspectionController { private InterviewInspectionService interviewInspectionService; @PostMapping("/submission") + @ApiOperation("提交稽核结果") public ResponseResult interviewInspectionSubmit(@RequestBody InspectionSubmissionDTO dto) { interviewInspectionService.submit(dto); return ResponseResult.success(); } @PostMapping("/revocation") + @ApiOperation("撤销稽核结果") public ResponseResult interviewInspectionRevoke(@RequestBody InspectionRevocationDTO dto) throws ApiException { interviewInspectionService.revoke(dto); return ResponseResult.success(); From 5a74bb43c76681a76df0edefc97d846316a1a13b Mon Sep 17 00:00:00 2001 From: zhangchenbiao Date: Thu, 20 Jul 2023 09:43:51 +0800 Subject: [PATCH 07/21] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cool/store/constants/CommonConstants.java | 2 +- .../store/dao/HyInspectionSettingMappingDAO.java | 1 + .../mapper/HyInspectionSettingMappingMapper.java | 8 ++++++++ .../resources/mapper/EnterpriseUserMapper.xml | 6 ------ .../mapper/HyInspectionSettingMappingMapper.xml | 16 ++++++++++++++-- .../src/main/resources/mapper/RegionMapper.xml | 8 ++++---- .../store/dto/enterprise/EnterpriseUserDTO.java | 4 +--- .../store/dto/enterprise/SysDepartmentDTO.java | 12 ++++++------ .../com/cool/store/entity/EnterpriseUserDO.java | 2 +- .../java/com/cool/store/entity/RegionDO.java | 6 ++++-- .../store/service/impl/LoginServiceImpl.java | 5 ++--- .../cool/store/config/TokenValidateFilter.java | 3 ++- 12 files changed, 44 insertions(+), 29 deletions(-) diff --git a/coolstore-partner-common/src/main/java/com/cool/store/constants/CommonConstants.java b/coolstore-partner-common/src/main/java/com/cool/store/constants/CommonConstants.java index c5329cd09..37bf52582 100644 --- a/coolstore-partner-common/src/main/java/com/cool/store/constants/CommonConstants.java +++ b/coolstore-partner-common/src/main/java/com/cool/store/constants/CommonConstants.java @@ -12,7 +12,7 @@ public class CommonConstants { public static final String MESSAGE_ID = "messageId"; - public static final String ACCESS_TOKEN_KEY = "access_token"; + public static final String ACCESS_TOKEN_KEY = "access_token:{0}"; public static final String REFRESH_TOKEN_KEY = "refresh_token"; diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyInspectionSettingMappingDAO.java b/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyInspectionSettingMappingDAO.java index 8de02b843..176d882cb 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyInspectionSettingMappingDAO.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyInspectionSettingMappingDAO.java @@ -48,6 +48,7 @@ public class HyInspectionSettingMappingDAO { if(CollectionUtils.isEmpty(openAreaMappingIds) || Objects.isNull(inspectionSettingId)){ return CommonConstants.ZERO; } + hyInspectionSettingMappingMapper.deleteInOpenAreaMappingIds(inspectionSettingId, openAreaMappingIds); List insertList = new ArrayList<>(); for (Long openAreaMappingId : openAreaMappingIds) { HyInspectionSettingMappingDO insert = new HyInspectionSettingMappingDO(); diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMappingMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMappingMapper.java index 1cc928dc5..1cfea1e6b 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMappingMapper.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMappingMapper.java @@ -54,4 +54,12 @@ public interface HyInspectionSettingMappingMapper { * @return */ List getConflictInspectionSetting(@Param("inspectionSettingId") Long inspectionSettingId, @Param("openAreaMappingIds") List openAreaMappingIds); + + /** + * 删除 + * @param excludeInspectionSettingId + * @param openAreaMappingIds + * @return + */ + Integer deleteInOpenAreaMappingIds(@Param("excludeInspectionSettingId") Long excludeInspectionSettingId, @Param("openAreaMappingIds") List openAreaMappingIds); } \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/resources/mapper/EnterpriseUserMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/EnterpriseUserMapper.xml index 997d62830..cdb899eb4 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/EnterpriseUserMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/EnterpriseUserMapper.xml @@ -37,9 +37,6 @@ insert into enterprise_user - - id, - user_id, @@ -99,9 +96,6 @@ - - #{record.id}, - #{record.userId}, diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMappingMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMappingMapper.xml index 74086407f..73762323e 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMappingMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMappingMapper.xml @@ -82,14 +82,14 @@ update hy_inspection_setting_mapping set - deleted = '1' , update_time = new() + deleted = '1' , update_time = now() where inspection_setting_id = #{inspectionSettingId} and open_area_mapping_id not in #{openAreaMappingId} - update hy_inspection_setting_mapping set deleted = '1' , update_time = new() where inspection_setting_id = #{inspectionSettingId} + update hy_inspection_setting_mapping set deleted = '1' , update_time = now() where inspection_setting_id = #{inspectionSettingId} + + + update + hy_inspection_setting_mapping + set + deleted = '1' , update_time = now() + where + open_area_mapping_id in #{openAreaMappingId} + + and inspection_setting_id != #{inspectionSettingId} + + \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/resources/mapper/RegionMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/RegionMapper.xml index 8e98d7d2b..c6cedb480 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/RegionMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/RegionMapper.xml @@ -11,9 +11,9 @@ - + - + @@ -106,7 +106,7 @@ #{record.deleted}, - ON DUPLICATE KEY UPDATE region_id = values(region_id), name = values(name), parent_id = values(parent_id), region_path = values(region_path), leader_user_id = values(leader_user_id), order_num = values(order_num), third_dept_id = values(third_dept_id), update_time = UNIX_TIMESTAMP(), deleted = values(deleted) + ON DUPLICATE KEY UPDATE region_id = values(region_id), name = values(name), parent_id = values(parent_id), region_path = values(region_path), leader_user_id = values(leader_user_id), order_num = values(order_num), third_dept_id = values(third_dept_id), update_time = now(), deleted = values(deleted) @@ -156,7 +156,7 @@ - update region set deleted = 1 , update_time = UNIX_TIMESTAMP() where region_id not in #{regionId} + update region set deleted = 1 , update_time = now() where region_id not in #{regionId} - + + + + + delete from hy_inspection where id = #{id} diff --git a/coolstore-partner-model/src/main/java/com/cool/store/request/GetInterviewInspectionListReq.java b/coolstore-partner-model/src/main/java/com/cool/store/request/GetInterviewInspectionListReq.java new file mode 100644 index 000000000..8d0cf0fd7 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/request/GetInterviewInspectionListReq.java @@ -0,0 +1,41 @@ +package com.cool.store.request; + +import com.cool.store.common.PageBasicInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author: hxd + * @Date: 2023-06-06 15:50 + * @Description: + */ +@Data +@ApiModel +public class GetInterviewInspectionListReq extends PageBasicInfo { + + @ApiModelProperty("搜索类型") + private String searchType; + + + @ApiModelProperty("搜索内容") + private String searchContent; + + + @ApiModelProperty("稽核状态(0为未稽核,1为合格,2为不合格)") + private Integer status; + + + @ApiModelProperty("意向开店区域") + private String wantShopArea; + + + @ApiModelProperty("面试开始时间") + private String startTime; + + + @ApiModelProperty("面试结束时间") + private String endTime; + + +} diff --git a/coolstore-partner-model/src/main/java/com/cool/store/request/GetInterviewInspectionResultListReq.java b/coolstore-partner-model/src/main/java/com/cool/store/request/GetInterviewInspectionResultListReq.java new file mode 100644 index 000000000..f037a2be8 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/request/GetInterviewInspectionResultListReq.java @@ -0,0 +1,41 @@ +package com.cool.store.request; + + +import com.cool.store.common.PageBasicInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author: hxd + * @Date: 2023-06-06 15:50 + * @Description: + */ +@Data +@ApiModel +public class GetInterviewInspectionResultListReq extends PageBasicInfo { + + @ApiModelProperty("搜索类型") + private String searchType; + + + @ApiModelProperty("搜索内容") + private String searchContent; + + + @ApiModelProperty("稽核状态(0为未稽核,1为合格,2为不合格)") + private Integer status; + + + @ApiModelProperty("意向开店区域") + private String wantShopArea; + + + @ApiModelProperty("面试开始时间") + private String startTime; + + + @ApiModelProperty("面试结束时间") + private String endTime; + +} diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/GetInterviewInspectionHistoryListVO.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/GetInterviewInspectionHistoryListVO.java new file mode 100644 index 000000000..3c4f50220 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/GetInterviewInspectionHistoryListVO.java @@ -0,0 +1,24 @@ +package com.cool.store.vo.interview; + + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.List; + +/** + * @Author: hxd + * @Date: 2023-06-16 13:19 + * @Description: + */ +@Data +@Accessors(chain = true) +@ApiModel(description = "面试稽核历史") +public class GetInterviewInspectionHistoryListVO { + + @ApiModelProperty("面试稽核历史列表") + private List interviewInspectionHistoryInfos; + +} diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewInspectionHistoryInfo.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewInspectionHistoryInfo.java new file mode 100644 index 000000000..3a56aa0de --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewInspectionHistoryInfo.java @@ -0,0 +1,34 @@ +package com.cool.store.vo.interview; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @Author: hxd + * @Date: 2023-06-16 13:19 + * @Description: + */ +@ApiModel(description = "面试稽核历史详情") +@Data +public class InterviewInspectionHistoryInfo { + + @ApiModelProperty(value = "操作人") + private String operatorUser; + + @ApiModelProperty(value = "稽核时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date inspectionTime; + + + @ApiModelProperty(value = "原因") + private String description; + + @ApiModelProperty(value = "凭证或者证据") + private List files; +} diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewInspectionInfo.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewInspectionInfo.java new file mode 100644 index 000000000..75b044f86 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewInspectionInfo.java @@ -0,0 +1,37 @@ +package com.cool.store.vo.interview; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.Date; +import java.util.List; + +/** + * @Author: hxd + * @Date: 2023-06-08 16:26 + * @Description: + */ +@Data +@Accessors(chain = true) +@ApiModel(description = "面试稽核详情信息") +public class InterviewInspectionInfo { + + @ApiModelProperty(value = "稽核人") + private String auditor; + + @ApiModelProperty(value = "稽核时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date inspectionTime; + + @ApiModelProperty(value = "稽核结果(0为未稽核,1为合格,2为不合格,3为撤销)") + private Integer status; + + @ApiModelProperty(value = "稽核说明") + private String description; + + @ApiModelProperty(value = "凭证或者证据") + private List files; +} diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewInspectionResultVO.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewInspectionResultVO.java new file mode 100644 index 000000000..7b3793c67 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewInspectionResultVO.java @@ -0,0 +1,50 @@ +package com.cool.store.vo.interview; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.Date; + +/** + * @Author: HXD + * @Date: 2023-06-08 16:26 + * @Description: + */ +@Data +@Accessors(chain = true) +@ApiModel(description = "面试稽核结果信息") +public class InterviewInspectionResultVO { + + @ApiModelProperty(value = "被面试人姓名") + private String intervieweeName; + + + @ApiModelProperty(value = "被面试人手机号") + private String intervieweeMobile; + + @ApiModelProperty(value = "意向开店区域") + private String wantShopAreaName; + + @ApiModelProperty(value = "面试通过时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date interviewPassTime; + + @ApiModelProperty(value = "稽核状态(0为未稽核,1为合格,2为不合格)") + private Integer status; + + @ApiModelProperty(value = "稽核人姓名") + private String auditorName; + + @ApiModelProperty(value = "稽核人电话") + private String auditorMobile; + + + @ApiModelProperty(value = "稽核时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date inspectionTime; + +} \ No newline at end of file diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewInspectionVO.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewInspectionVO.java new file mode 100644 index 000000000..f03a29fb2 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewInspectionVO.java @@ -0,0 +1,60 @@ +package com.cool.store.vo.interview; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.Date; + +/** + * @Author: HXD + * @Date: 2023-06-08 16:26 + * @Description: + */ +@Data +@Accessors(chain = true) +@ApiModel(description = "面试稽核信息") +public class InterviewInspectionVO { + + @ApiModelProperty(value = "面试官姓名") + private String interviewerName; + + @ApiModelProperty(value = "面试官手机号") + private String interviewerMobile; + + @ApiModelProperty(value = "被面试人姓名") + private String intervieweeName; + + + @ApiModelProperty(value = "被面试人手机号") + private String intervieweeMobile; + + @ApiModelProperty(value = "意向开店区域") + private String wantShopAreaName; + + @ApiModelProperty(value = "面试通过时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date interviewPassTime; + + @ApiModelProperty(value = "稽核状态(0为未稽核,1为合格,2为不合格)") + private Integer status; + + @ApiModelProperty(value = "稽核人姓名") + private String auditorName; + + @ApiModelProperty(value = "稽核人电话") + private String auditorMobile; + + + @ApiModelProperty(value = "稽核时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date inspectionTime; + + @ApiModelProperty(value = "稽核表id") + private Long id; + + @ApiModelProperty(value = "面试计划id") + private Integer interviewPlanId; +} diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/InterviewInspectionService.java b/coolstore-partner-service/src/main/java/com/cool/store/service/InterviewInspectionService.java index b32075bee..55b814394 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/InterviewInspectionService.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/InterviewInspectionService.java @@ -1,15 +1,31 @@ package com.cool.store.service; +import com.cool.store.request.GetInterviewInspectionListReq; +import com.cool.store.request.GetInterviewInspectionResultListReq; +import com.cool.store.response.ResponseResult; +import com.cool.store.vo.interview.InterviewInspectionHistoryInfo; +import com.cool.store.vo.interview.InterviewInspectionInfo; +import com.cool.store.vo.interview.InterviewInspectionResultVO; +import com.cool.store.vo.interview.InterviewInspectionVO; +import com.github.pagehelper.PageInfo; + import com.cool.store.dto.inspection.interview.InspectionRevocationDTO; import com.cool.store.dto.inspection.interview.InspectionSubmissionDTO; import com.cool.store.exception.ApiException; +import com.cool.store.dto.inspection.interview.InspectionRevocationDTO; +import com.cool.store.dto.inspection.interview.InspectionSubmissionDTO; +import com.cool.store.exception.ApiException; + +import java.util.List; + /** * @author Fun Li * @version 1.0 * @date 2023/7/19 16:50 */ public interface InterviewInspectionService { + List interviewInspectionGetList(GetInterviewInspectionListReq request); /** * 提交稽核结果 @@ -21,4 +37,10 @@ public interface InterviewInspectionService { */ void revoke(InspectionRevocationDTO dto) throws ApiException; + InterviewInspectionInfo interviewInspectionGetDetail(Long id); + + List interviewInspectionGetHistoryDetail(Long id); + + List interviewInspectionResultGetList(GetInterviewInspectionResultListReq request); + } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java index bacc530f1..5a2a4cd74 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java @@ -9,12 +9,18 @@ import com.cool.store.entity.HyInterviewInspectionLog; import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.InspectionOperationTypeEnum; import com.cool.store.enums.InspectionStatusEnum; -import com.cool.store.enums.InspectionTyeEnum; import com.cool.store.exception.ApiException; import com.cool.store.mapper.HyInspectionMapper; +import com.cool.store.request.GetInterviewInspectionListReq; +import com.cool.store.request.GetInterviewInspectionResultListReq; +import com.cool.store.response.ResponseResult; import com.cool.store.mapper.HyInterviewInspectionLogMapper; import com.cool.store.service.InterviewInspectionService; -import org.springframework.beans.BeanUtils; +import com.cool.store.vo.interview.InterviewInspectionHistoryInfo; +import com.cool.store.vo.interview.InterviewInspectionInfo; +import com.cool.store.vo.interview.InterviewInspectionResultVO; +import com.cool.store.vo.interview.InterviewInspectionVO; +import com.github.pagehelper.PageInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -94,6 +100,21 @@ public class InterviewInspectionServiceImpl implements InterviewInspectionServic inspectionMapper.updateByPrimaryKey(hyInspection); } + @Override + public InterviewInspectionInfo interviewInspectionGetDetail(Long id) { + return inspectionMapper.interviewInspectionGetDetail(id); + } + + @Override + public List interviewInspectionGetHistoryDetail(Long id) { + return inspectionMapper.interviewInspectionGetHistoryDetail(id); + } + + @Override + public List interviewInspectionResultGetList(GetInterviewInspectionResultListReq request) { + return inspectionMapper.interviewInspectionResultGetList(request); + } + private String spliceFiles(List files) { if (files == null || files.size() == 0) { return null; @@ -101,4 +122,9 @@ public class InterviewInspectionServiceImpl implements InterviewInspectionServic return files.stream().map(String::valueOf).collect(Collectors.joining(",")); } + @Override + public List interviewInspectionGetList(GetInterviewInspectionListReq request) { + String userId = CurrentUserHolder.getUserId(); + return inspectionMapper.interviewInspectionGetList(request); + } } diff --git a/coolstore-partner-webb/src/main/java/com/cool/store/controller/AuditResultController.java b/coolstore-partner-webb/src/main/java/com/cool/store/controller/AuditResultController.java new file mode 100644 index 000000000..e37152dc3 --- /dev/null +++ b/coolstore-partner-webb/src/main/java/com/cool/store/controller/AuditResultController.java @@ -0,0 +1,43 @@ +package com.cool.store.controller; + +import com.cool.store.request.GetInterviewInspectionResultListReq; +import com.cool.store.response.ResponseResult; +import com.cool.store.service.InterviewInspectionService; +import com.cool.store.vo.interview.InterviewInspectionResultVO; +import com.github.pagehelper.PageInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @author hxd + * @version 1.0 + * @date 2023/7/19 16:48 + */ +@RestController +@RequestMapping("/inspection/auditResult") +@Api(tags = "面试稽核结果") +public class AuditResultController { + + @Autowired + private InterviewInspectionService interviewInspectionService; + + /** + * 获取面试稽核结果列表 + * + * @param request + * @return + */ + @PostMapping("/getList") + @ApiOperation("获取面试稽核结果列表") + public ResponseResult interviewInspectionResultGetList(GetInterviewInspectionResultListReq request) { + List interviewInspectionResultGetList = interviewInspectionService.interviewInspectionResultGetList(request); + return ResponseResult.success(new PageInfo<>(interviewInspectionResultGetList)); + } + +} diff --git a/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java b/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java index eff1c3cd8..e9e607fab 100644 --- a/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java +++ b/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java @@ -3,15 +3,20 @@ package com.cool.store.controller; import com.cool.store.dto.inspection.interview.InspectionRevocationDTO; import com.cool.store.dto.inspection.interview.InspectionSubmissionDTO; import com.cool.store.exception.ApiException; +import com.cool.store.request.GetInterviewInspectionListReq; import com.cool.store.response.ResponseResult; import com.cool.store.service.InterviewInspectionService; +import com.cool.store.vo.interview.GetInterviewInspectionHistoryListVO; +import com.cool.store.vo.interview.InterviewInspectionHistoryInfo; +import com.cool.store.vo.interview.InterviewInspectionInfo; +import com.cool.store.vo.interview.InterviewInspectionVO; +import com.github.pagehelper.PageInfo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; + +import java.util.List; /** * @author Fun Li @@ -40,4 +45,46 @@ public class InterviewInspectionController { return ResponseResult.success(); } + + /** + * 获取面试稽核列表 + * + * @param request + * @return + */ + @PostMapping("/getList") + @ApiOperation("获取面试稽核列表") + public ResponseResult interviewInspectionGetList(GetInterviewInspectionListReq request) { + List interviewInspectionVOList = interviewInspectionService.interviewInspectionGetList(request); + return ResponseResult.success(new PageInfo<>(interviewInspectionVOList)); + } + + + /** + * 获取面试稽核详情信息 + * + * @param id + * @return + */ + @GetMapping("/getDetail") + @ApiOperation("获取面试稽核详情信息") + public ResponseResult interviewInspectionGetDetail(@RequestParam("id") Long id) { + InterviewInspectionInfo interviewInspectionInfo = interviewInspectionService.interviewInspectionGetDetail(id); + return ResponseResult.success(interviewInspectionInfo); + } + + /** + * 面试稽核历史结果查看 + * + * @param id + * @return + */ + @GetMapping("/getHistoryDetail") + @ApiOperation("稽核历史结果查看") + public ResponseResult interviewInspectionGetHistoryDetail(@RequestParam("id") Long id) { + List interviewInspectionHistoryInfos = interviewInspectionService.interviewInspectionGetHistoryDetail(id); + return ResponseResult.success(new GetInterviewInspectionHistoryListVO().setInterviewInspectionHistoryInfos(interviewInspectionHistoryInfos)); + } + + } From 1aedfb344258702ffcc3c76dd00fcd12a4cf99b3 Mon Sep 17 00:00:00 2001 From: "xiaodong.hu" <1075471126@qq.com> Date: Thu, 20 Jul 2023 14:39:57 +0800 Subject: [PATCH 13/21] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A8=BD=E6=A0=B8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2swagger=E4=B8=8D=E8=BF=94=E5=9B=9Edata?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/request/GetInterviewInspectionListReq.java | 3 +++ .../com/cool/store/controller/AuditResultController.java | 4 +++- .../store/controller/InterviewInspectionController.java | 9 ++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/coolstore-partner-model/src/main/java/com/cool/store/request/GetInterviewInspectionListReq.java b/coolstore-partner-model/src/main/java/com/cool/store/request/GetInterviewInspectionListReq.java index 8d0cf0fd7..93eec46c2 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/request/GetInterviewInspectionListReq.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/request/GetInterviewInspectionListReq.java @@ -38,4 +38,7 @@ public class GetInterviewInspectionListReq extends PageBasicInfo { private String endTime; + private String userId; + + } diff --git a/coolstore-partner-webb/src/main/java/com/cool/store/controller/AuditResultController.java b/coolstore-partner-webb/src/main/java/com/cool/store/controller/AuditResultController.java index e37152dc3..74bd56cef 100644 --- a/coolstore-partner-webb/src/main/java/com/cool/store/controller/AuditResultController.java +++ b/coolstore-partner-webb/src/main/java/com/cool/store/controller/AuditResultController.java @@ -4,6 +4,7 @@ import com.cool.store.request.GetInterviewInspectionResultListReq; import com.cool.store.response.ResponseResult; import com.cool.store.service.InterviewInspectionService; import com.cool.store.vo.interview.InterviewInspectionResultVO; +import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -35,7 +36,8 @@ public class AuditResultController { */ @PostMapping("/getList") @ApiOperation("获取面试稽核结果列表") - public ResponseResult interviewInspectionResultGetList(GetInterviewInspectionResultListReq request) { + public ResponseResult> interviewInspectionResultGetList(GetInterviewInspectionResultListReq request) { + PageHelper.startPage(request.getPageNum(), request.getPageSize()); List interviewInspectionResultGetList = interviewInspectionService.interviewInspectionResultGetList(request); return ResponseResult.success(new PageInfo<>(interviewInspectionResultGetList)); } diff --git a/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java b/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java index c1b3b3de2..11962780b 100644 --- a/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java +++ b/coolstore-partner-webb/src/main/java/com/cool/store/controller/InterviewInspectionController.java @@ -10,9 +10,11 @@ import com.cool.store.vo.interview.GetInterviewInspectionHistoryListVO; import com.cool.store.vo.interview.InterviewInspectionHistoryInfo; import com.cool.store.vo.interview.InterviewInspectionInfo; import com.cool.store.vo.interview.InterviewInspectionVO; +import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -54,7 +56,8 @@ public class InterviewInspectionController { */ @PostMapping("/getList") @ApiOperation("获取面试稽核列表") - public ResponseResult interviewInspectionGetList(GetInterviewInspectionListReq request) { + public ResponseResult> interviewInspectionGetList(GetInterviewInspectionListReq request) { + PageHelper.startPage(request.getPageNum(), request.getPageSize()); List interviewInspectionVOList = interviewInspectionService.interviewInspectionGetList(request); return ResponseResult.success(new PageInfo<>(interviewInspectionVOList)); } @@ -68,7 +71,7 @@ public class InterviewInspectionController { */ @GetMapping("/getDetail") @ApiOperation("获取面试稽核详情信息") - public ResponseResult interviewInspectionGetDetail(@RequestParam("id") Long id) { + public ResponseResult interviewInspectionGetDetail(@RequestParam("id") Long id) { InterviewInspectionInfo interviewInspectionInfo = interviewInspectionService.interviewInspectionGetDetail(id); return ResponseResult.success(interviewInspectionInfo); } @@ -81,7 +84,7 @@ public class InterviewInspectionController { */ @GetMapping("/getHistoryDetail") @ApiOperation("稽核历史结果查看") - public ResponseResult interviewInspectionGetHistoryDetail(@RequestParam("id") Long id) { + public ResponseResult interviewInspectionGetHistoryDetail(@RequestParam("id") Long id) { List interviewInspectionHistoryInfos = interviewInspectionService.interviewInspectionGetHistoryDetail(id); return ResponseResult.success(new GetInterviewInspectionHistoryListVO().setInterviewInspectionHistoryInfos(interviewInspectionHistoryInfos)); } From 75d4a9634e71a585194e8e72ddb84b39247409aa Mon Sep 17 00:00:00 2001 From: zhangchenbiao Date: Thu, 20 Jul 2023 14:42:49 +0800 Subject: [PATCH 14/21] update --- .../main/resources/mapper/HyInspectionSettingMappingMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMappingMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMappingMapper.xml index 73762323e..6d5fade75 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMappingMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMappingMapper.xml @@ -115,7 +115,7 @@ where open_area_mapping_id in #{openAreaMappingId} - and inspection_setting_id != #{inspectionSettingId} + and inspection_setting_id != #{excludeInspectionSettingId} \ No newline at end of file From 1bf58896627995fe40edb57fd2bc1b06927ed79c Mon Sep 17 00:00:00 2001 From: zhangchenbiao Date: Thu, 20 Jul 2023 15:14:26 +0800 Subject: [PATCH 15/21] update --- .../java/com/cool/store/mapper/HyInspectionSettingMapper.java | 2 +- .../src/main/resources/mapper/HyInspectionSettingMapper.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMapper.java index 4a4d49ab5..bf8952b4d 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMapper.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionSettingMapper.java @@ -57,5 +57,5 @@ public interface HyInspectionSettingMapper { * @param inspectionUserId * @return */ - List getHyInspectionSettingByUserId(String inspectionUserId, Long excludeInspectionSettingId); + List getHyInspectionSettingByUserId(@Param("inspectionUserId") String inspectionUserId, @Param("excludeInspectionSettingId") Long excludeInspectionSettingId); } \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMapper.xml index 1b8478ced..5c288d4d1 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionSettingMapper.xml @@ -130,7 +130,7 @@ from hy_inspection_setting where - deleted = '0' and inspection_user_id = #{excludeInspectionSettingId} + deleted = '0' and inspection_user_id = #{inspectionUserId} and id != #{excludeInspectionSettingId} From d33384836f8c37649e3ead8f8663d91cca81690c Mon Sep 17 00:00:00 2001 From: "feng.li" Date: Thu, 20 Jul 2023 15:37:45 +0800 Subject: [PATCH 16/21] =?UTF-8?q?=E9=9D=A2=E8=AF=95=E7=A8=BD=E6=A0=B8?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E7=9B=B8=E5=85=B3DO=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cool/store/mapper/HyInspectionMapper.java | 12 +- .../HyInterviewInspectionLogMapper.java | 12 +- .../resources/mapper/HyInspectionMapper.xml | 10 +- .../mapper/HyInterviewInspectionLogMapper.xml | 10 +- .../com/cool/store/entity/HyInspection.java | 164 ------------------ .../com/cool/store/entity/HyInspectionDO.java | 51 ++++++ .../entity/HyInterviewInspectionLog.java | 120 ------------- .../entity/HyInterviewInspectionLogDO.java | 41 +++++ .../store/service/impl/FlowServiceImpl.java | 6 +- .../impl/InterviewInspectionServiceImpl.java | 64 ++++--- 10 files changed, 148 insertions(+), 342 deletions(-) delete mode 100644 coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspection.java create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionDO.java delete mode 100644 coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLog.java create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLogDO.java diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionMapper.java index 3596ff1da..c2b477390 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionMapper.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInspectionMapper.java @@ -1,6 +1,6 @@ package com.cool.store.mapper; -import com.cool.store.entity.HyInspection; +import com.cool.store.entity.HyInspectionDO; import com.cool.store.request.GetInterviewInspectionListReq; import com.cool.store.request.GetInterviewInspectionResultListReq; import com.cool.store.vo.interview.InterviewInspectionHistoryInfo; @@ -16,15 +16,15 @@ import java.util.List; public interface HyInspectionMapper { int deleteByPrimaryKey(Long id); - int insert(HyInspection record); + int insert(HyInspectionDO record); - int insertSelective(HyInspection record); + int insertSelective(HyInspectionDO record); - HyInspection selectByPrimaryKey(Long id); + HyInspectionDO selectByPrimaryKey(Long id); - int updateByPrimaryKeySelective(HyInspection record); + int updateByPrimaryKeySelective(HyInspectionDO record); - int updateByPrimaryKey(HyInspection record); + int updateByPrimaryKey(HyInspectionDO record); List interviewInspectionGetList(GetInterviewInspectionListReq request); diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInterviewInspectionLogMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInterviewInspectionLogMapper.java index c5fea072d..74636d8bd 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInterviewInspectionLogMapper.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyInterviewInspectionLogMapper.java @@ -1,19 +1,19 @@ package com.cool.store.mapper; -import com.cool.store.entity.HyInterviewInspectionLog; +import com.cool.store.entity.HyInterviewInspectionLogDO; import org.apache.ibatis.annotations.Mapper; @Mapper public interface HyInterviewInspectionLogMapper { int deleteByPrimaryKey(Long id); - int insert(HyInterviewInspectionLog record); + int insert(HyInterviewInspectionLogDO record); - int insertSelective(HyInterviewInspectionLog record); + int insertSelective(HyInterviewInspectionLogDO record); - HyInterviewInspectionLog selectByPrimaryKey(Long id); + HyInterviewInspectionLogDO selectByPrimaryKey(Long id); - int updateByPrimaryKeySelective(HyInterviewInspectionLog record); + int updateByPrimaryKeySelective(HyInterviewInspectionLogDO record); - int updateByPrimaryKey(HyInterviewInspectionLog record); + int updateByPrimaryKey(HyInterviewInspectionLogDO record); } \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml index 833887206..7629e1fad 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml @@ -1,7 +1,7 @@ - + @@ -45,7 +45,7 @@ delete from hy_inspection where id = #{id} - + insert into hy_inspection (id, interview_plan_id, operator_user_id, type, status, files, description, inspection_time, creator, @@ -57,7 +57,7 @@ #{updator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{deleted,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) - + insert into hy_inspection @@ -148,7 +148,7 @@ - + update hy_inspection @@ -193,7 +193,7 @@ where id = #{id} - + update hy_inspection set interview_plan_id = #{interviewPlanId}, operator_user_id = #{operatorUserId,jdbcType=VARCHAR}, diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml index a0b17555d..25a174b64 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml @@ -1,7 +1,7 @@ - + @@ -29,7 +29,7 @@ delete from hy_interview_inspection_log where id = #{id,jdbcType=BIGINT} - + insert into hy_interview_inspection_log (id, operator_user_id, inspection_id, operation_type, description, files, operation_time, remark, create_time, @@ -39,7 +39,7 @@ #{operationTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) - + insert into hy_interview_inspection_log @@ -106,7 +106,7 @@ - + update hy_interview_inspection_log @@ -139,7 +139,7 @@ where id = #{id,jdbcType=BIGINT} - + update hy_interview_inspection_log set operator_user_id = #{operatorUserId,jdbcType=VARCHAR}, inspection_id = #{inspectionId,jdbcType=BIGINT}, diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspection.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspection.java deleted file mode 100644 index 8adea1070..000000000 --- a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspection.java +++ /dev/null @@ -1,164 +0,0 @@ -package com.cool.store.entity; - -public class HyInspection { - private Long id; - - private Long interviewPlanId; - - private String operatorUserId; - - private Integer type; - - private Integer status; - - private String files; - - private String description; - - private String inspectionTime; - - private String creator; - - private String updator; - - private String remark; - - private Boolean deleted; - - private String createTime; - - private String updateTime; - - public HyInspection(Long id, Long interviewPlanId, String operatorUserId, Integer type, Integer status, String files, String description, String inspectionTime, String creator, String updator, String remark, Boolean deleted, String createTime, String updateTime) { - this.id = id; - this.interviewPlanId = interviewPlanId; - this.operatorUserId = operatorUserId; - this.type = type; - this.status = status; - this.files = files; - this.description = description; - this.inspectionTime = inspectionTime; - this.creator = creator; - this.updator = updator; - this.remark = remark; - this.deleted = deleted; - this.createTime = createTime; - this.updateTime = updateTime; - } - - public HyInspection() { - super(); - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getInterviewPlanId() { - return interviewPlanId; - } - - public void setInterviewPlanId(Long interviewPlanId) { - this.interviewPlanId = interviewPlanId; - } - - public String getOperatorUserId() { - return operatorUserId; - } - - public void setOperatorUserId(String operatorUserId) { - this.operatorUserId = operatorUserId == null ? null : operatorUserId.trim(); - } - - public Integer getType() { - return type; - } - - public void setType(Integer type) { - this.type = type; - } - - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - public String getFiles() { - return files; - } - - public void setFiles(String files) { - this.files = files == null ? null : files.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public String getInspectionTime() { - return inspectionTime; - } - - public void setInspectionTime(String inspectionTime) { - this.inspectionTime = inspectionTime; - } - - public String getCreator() { - return creator; - } - - public void setCreator(String creator) { - this.creator = creator == null ? null : creator.trim(); - } - - public String getUpdator() { - return updator; - } - - public void setUpdator(String updator) { - this.updator = updator == null ? null : updator.trim(); - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark == null ? null : remark.trim(); - } - - public Boolean getDeleted() { - return deleted; - } - - public void setDeleted(Boolean deleted) { - this.deleted = deleted; - } - - public String getCreateTime() { - return createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime == null ? null : createTime.trim(); - } - - public String getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(String updateTime) { - this.updateTime = updateTime; - } -} \ No newline at end of file diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionDO.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionDO.java new file mode 100644 index 000000000..c069d4a64 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionDO.java @@ -0,0 +1,51 @@ +package com.cool.store.entity; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class HyInspectionDO { + + @ApiModelProperty("id") + private Long id; + + @ApiModelProperty("面试计划Id") + private Long interviewPlanId; + + @ApiModelProperty("稽核人user_id") + private String operatorUserId; + + @ApiModelProperty("稽核类型,0面试稽核,后续可能有其他稽核") + private Integer type; + + @ApiModelProperty("稽核状态(0为未稽核,1为合格,2为不合格)") + private Integer status; + + @ApiModelProperty("多个凭证文件(以英文逗号分隔)") + private String files; + + @ApiModelProperty("稽核说明") + private String description; + + @ApiModelProperty("稽核时间") + private String inspectionTime; + + @ApiModelProperty("enterprise_user.user_id,创建人") + private String creator; + + @ApiModelProperty("enterprise_user.user_id,修改人") + private String updator; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("是否删除(0表示未删除,1表示删除)") + private Boolean deleted; + + @ApiModelProperty("创建时间") + private String createTime; + + @ApiModelProperty("修改时间") + private String updateTime; + +} \ No newline at end of file diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLog.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLog.java deleted file mode 100644 index 9742533cc..000000000 --- a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLog.java +++ /dev/null @@ -1,120 +0,0 @@ -package com.cool.store.entity; - -public class HyInterviewInspectionLog { - private Long id; - - private String operatorUserId; - - private Long inspectionId; - - private Integer operationType; - - private String description; - - private String files; - - private String operationTime; - - private String remark; - - private String createTime; - - private String updateTime; - - public HyInterviewInspectionLog(Long id, String operatorUserId, Long inspectionId, Integer operationType, String description, String files, String operationTime, String remark, String createTime, String updateTime) { - this.id = id; - this.operatorUserId = operatorUserId; - this.inspectionId = inspectionId; - this.operationType = operationType; - this.description = description; - this.files = files; - this.operationTime = operationTime; - this.remark = remark; - this.createTime = createTime; - this.updateTime = updateTime; - } - - public HyInterviewInspectionLog() { - super(); - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getOperatorUserId() { - return operatorUserId; - } - - public void setOperatorUserId(String operatorUserId) { - this.operatorUserId = operatorUserId == null ? null : operatorUserId.trim(); - } - - public Long getInspectionId() { - return inspectionId; - } - - public void setInspectionId(Long inspectionId) { - this.inspectionId = inspectionId; - } - - public Integer getOperationType() { - return operationType; - } - - public void setOperationType(Integer operationType) { - this.operationType = operationType; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public String getFiles() { - return files; - } - - public void setFiles(String files) { - this.files = files == null ? null : files.trim(); - } - - public String getOperationTime() { - return operationTime; - } - - public void setOperationTime(String operationTime) { - this.operationTime = operationTime; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark == null ? null : remark.trim(); - } - - public String getCreateTime() { - return createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime == null ? null : createTime.trim(); - } - - public String getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(String updateTime) { - this.updateTime = updateTime; - } -} \ No newline at end of file diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLogDO.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLogDO.java new file mode 100644 index 000000000..37b455191 --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLogDO.java @@ -0,0 +1,41 @@ +package com.cool.store.entity; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +@Data +public class HyInterviewInspectionLogDO { + + @ApiModelProperty("id") + private Long id; + + @ApiModelProperty("enterprise_user.user_id,操作人用户id") + private String operatorUserId; + + @ApiModelProperty("稽核信息表id(hy_inspection.id)") + private Long inspectionId; + + @ApiModelProperty("操作类型(0为合格,1为不合格,2为撤销)") + private Integer operationType; + + @ApiModelProperty("操作说明") + private String description; + + @ApiModelProperty("多个凭证文件,以英文逗号分隔") + private String files; + + @ApiModelProperty("操作时间") + private String operationTime; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("修改时间") + private Date updateTime; + + @ApiModelProperty("删除标识") + private Boolean deleted; + +} \ No newline at end of file diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/FlowServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/FlowServiceImpl.java index dd6c97022..ebf01250a 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/FlowServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/FlowServiceImpl.java @@ -262,9 +262,9 @@ public class FlowServiceImpl implements FlowService { //TODO 问题:如果因为 pdf 生成失败或者其他原因导致异常,但是由于 MDM 只是做回调,不对回调是否成功负责,会导致流程信息缺失 genPassLetterAndUpdateDB(partnerName, verifyCity, passDate, interviewId); //4. 向面试稽核表中新增一条信息 - HyInspection hyInspection = new HyInspection(); - hyInspection.setInterviewPlanId(Long.parseLong(interviewPlanId)); - inspectionMapper.insertSelective(hyInspection); + HyInspectionDO hyInspectionDO = new HyInspectionDO(); + hyInspectionDO.setInterviewPlanId(Long.parseLong(interviewPlanId)); + inspectionMapper.insertSelective(hyInspectionDO); //记录日志 LogBasicDTO log = LogBasicDTO.builder().operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC)) .build(); diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java index 6a3806f3f..8e48e89a8 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewInspectionServiceImpl.java @@ -4,8 +4,8 @@ import cn.hutool.core.date.DateUtil; import com.cool.store.context.CurrentUserHolder; import com.cool.store.dto.inspection.interview.InspectionRevocationDTO; import com.cool.store.dto.inspection.interview.InspectionSubmissionDTO; -import com.cool.store.entity.HyInspection; -import com.cool.store.entity.HyInterviewInspectionLog; +import com.cool.store.entity.HyInspectionDO; +import com.cool.store.entity.HyInterviewInspectionLogDO; import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.InspectionOperationTypeEnum; import com.cool.store.enums.InspectionStatusEnum; @@ -13,14 +13,12 @@ import com.cool.store.exception.ApiException; import com.cool.store.mapper.HyInspectionMapper; import com.cool.store.request.GetInterviewInspectionListReq; import com.cool.store.request.GetInterviewInspectionResultListReq; -import com.cool.store.response.ResponseResult; import com.cool.store.mapper.HyInterviewInspectionLogMapper; import com.cool.store.service.InterviewInspectionService; import com.cool.store.vo.interview.InterviewInspectionHistoryInfo; import com.cool.store.vo.interview.InterviewInspectionInfo; import com.cool.store.vo.interview.InterviewInspectionResultVO; import com.cool.store.vo.interview.InterviewInspectionVO; -import com.github.pagehelper.PageInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -45,39 +43,39 @@ public class InterviewInspectionServiceImpl implements InterviewInspectionServic @Override public void submit(InspectionSubmissionDTO dto) throws ApiException { - HyInspection rawInspection = inspectionMapper.selectByPrimaryKey(dto.getInspectionId()); + HyInspectionDO rawInspection = inspectionMapper.selectByPrimaryKey(dto.getInspectionId()); if (Objects.isNull(rawInspection)) { throw new ApiException(ErrorCodeEnum.INSPECTION_INFO_NOT_EXIST); } - HyInspection hyInspection = new HyInspection(); + HyInspectionDO hyInspectionDO = new HyInspectionDO(); //稽核结果和说明及文件等 - hyInspection.setId(dto.getInspectionId()); + hyInspectionDO.setId(dto.getInspectionId()); if (dto.getWhetherPass().equals(0)) { - hyInspection.setStatus(InspectionStatusEnum.NOT_PASS.getCode()); + hyInspectionDO.setStatus(InspectionStatusEnum.NOT_PASS.getCode()); } else if (dto.getWhetherPass().equals(1)) { - hyInspection.setStatus(InspectionStatusEnum.PASS.getCode()); + hyInspectionDO.setStatus(InspectionStatusEnum.PASS.getCode()); } - hyInspection.setDescription(dto.getDescription()); + hyInspectionDO.setDescription(dto.getDescription()); String filesStr = spliceFiles(dto.getFiles()); - hyInspection.setFiles(filesStr); + hyInspectionDO.setFiles(filesStr); //稽核人,稽核时间,创建人 - hyInspection.setOperatorUserId(CurrentUserHolder.getUserId()); - hyInspection.setUpdator(CurrentUserHolder.getUserId()); - hyInspection.setInspectionTime(DateUtil.now()); - hyInspection.setCreator(rawInspection.getCreator() == null ? CurrentUserHolder.getUserId() : rawInspection.getCreator()); - inspectionMapper.updateByPrimaryKeySelective(hyInspection); + hyInspectionDO.setOperatorUserId(CurrentUserHolder.getUserId()); + hyInspectionDO.setUpdator(CurrentUserHolder.getUserId()); + hyInspectionDO.setInspectionTime(DateUtil.now()); + hyInspectionDO.setCreator(rawInspection.getCreator() == null ? CurrentUserHolder.getUserId() : rawInspection.getCreator()); + inspectionMapper.updateByPrimaryKeySelective(hyInspectionDO); } @Override @Transactional public void revoke(InspectionRevocationDTO dto) throws ApiException { //2.1 查询之前的一次操作 - HyInspection hyInspection = inspectionMapper.selectByPrimaryKey(dto.getInspectionId()); - if (Objects.isNull(hyInspection)) { + HyInspectionDO hyInspectionDO = inspectionMapper.selectByPrimaryKey(dto.getInspectionId()); + if (Objects.isNull(hyInspectionDO)) { throw new ApiException(ErrorCodeEnum.INSPECTION_INFO_NOT_EXIST); } //1. 撤销操作记录写入数据库面试稽核操作记录表 - HyInterviewInspectionLog inspectionLog = new HyInterviewInspectionLog(); + HyInterviewInspectionLogDO inspectionLog = new HyInterviewInspectionLogDO(); inspectionLog.setOperatorUserId(CurrentUserHolder.getUserId()); inspectionLog.setInspectionId(dto.getInspectionId()); inspectionLog.setOperationType(InspectionOperationTypeEnum.REVOCATION.getCode()); @@ -87,25 +85,25 @@ public class InterviewInspectionServiceImpl implements InterviewInspectionServic inspectionLog.setFiles(filesStr); interviewInspectionLogMapper.insertSelective(inspectionLog); //2. 撤销操作之前的一次操作写入面试稽核操作记录表 - inspectionLog.setOperatorUserId(hyInspection.getOperatorUserId()); - inspectionLog.setInspectionId(hyInspection.getId()); - if (hyInspection.getStatus().equals(1)) { + inspectionLog.setOperatorUserId(hyInspectionDO.getOperatorUserId()); + inspectionLog.setInspectionId(hyInspectionDO.getId()); + if (hyInspectionDO.getStatus().equals(1)) { inspectionLog.setOperationType(InspectionOperationTypeEnum.PASS.getCode()); - } else if (hyInspection.getStatus().equals(2)) { + } else if (hyInspectionDO.getStatus().equals(2)) { inspectionLog.setOperationType(InspectionOperationTypeEnum.NOT_PASS.getCode()); } - inspectionLog.setDescription(hyInspection.getDescription()); - inspectionLog.setFiles(hyInspection.getFiles()); - inspectionLog.setOperationTime(hyInspection.getInspectionTime()); + inspectionLog.setDescription(hyInspectionDO.getDescription()); + inspectionLog.setFiles(hyInspectionDO.getFiles()); + inspectionLog.setOperationTime(hyInspectionDO.getInspectionTime()); interviewInspectionLogMapper.insertSelective(inspectionLog); //3. 撤销操作之前的一次操作稽核信息状态修改为未稽核,并且将数据状态(其他字段)也恢复到未稽核时的状态 - hyInspection.setOperatorUserId(null); - hyInspection.setStatus(InspectionStatusEnum.NOT_INSPECT.getCode()); - hyInspection.setFiles(null); - hyInspection.setDescription(null); - hyInspection.setInspectionTime(null); - hyInspection.setUpdator(null); - inspectionMapper.updateByPrimaryKey(hyInspection); + hyInspectionDO.setOperatorUserId(null); + hyInspectionDO.setStatus(InspectionStatusEnum.NOT_INSPECT.getCode()); + hyInspectionDO.setFiles(null); + hyInspectionDO.setDescription(null); + hyInspectionDO.setInspectionTime(null); + hyInspectionDO.setUpdator(null); + inspectionMapper.updateByPrimaryKey(hyInspectionDO); } @Override From 8d25552041e79bea8e204c1f97e6426e39bcf231 Mon Sep 17 00:00:00 2001 From: "feng.li" Date: Thu, 20 Jul 2023 15:47:09 +0800 Subject: [PATCH 17/21] =?UTF-8?q?=E9=9D=A2=E8=AF=95=E7=A8=BD=E6=A0=B8?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E7=9B=B8=E5=85=B3DO=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9E=84=E9=80=A0=E5=99=A8=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cool/store/entity/HyInspectionDO.java | 6 ++++++ .../entity/HyInterviewInspectionLogDO.java | 17 ++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionDO.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionDO.java index c069d4a64..d4e446222 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionDO.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInspectionDO.java @@ -1,9 +1,15 @@ package com.cool.store.entity; import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.Data; +import lombok.NoArgsConstructor; @Data +@Builder +@NoArgsConstructor +@AllArgsConstructor public class HyInspectionDO { @ApiModelProperty("id") diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLogDO.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLogDO.java index 37b455191..ee554434e 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLogDO.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/entity/HyInterviewInspectionLogDO.java @@ -1,11 +1,15 @@ package com.cool.store.entity; import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.Data; - -import java.util.Date; +import lombok.NoArgsConstructor; @Data +@Builder +@NoArgsConstructor +@AllArgsConstructor public class HyInterviewInspectionLogDO { @ApiModelProperty("id") @@ -32,10 +36,9 @@ public class HyInterviewInspectionLogDO { @ApiModelProperty("备注") private String remark; + @ApiModelProperty("创建时间") + private String createTime; + @ApiModelProperty("修改时间") - private Date updateTime; - - @ApiModelProperty("删除标识") - private Boolean deleted; - + private String updateTime; } \ No newline at end of file From 2c7766863195459c93d306d99beb5ecaa4327f2b Mon Sep 17 00:00:00 2001 From: zhangchenbiao Date: Thu, 20 Jul 2023 16:16:47 +0800 Subject: [PATCH 18/21] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E9=9D=9E=E5=8F=B6?= =?UTF-8?q?=E5=AD=90=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/cool/store/enums/ErrorCodeEnum.java | 3 ++- .../java/com/cool/store/dao/HyOpenAreaInfoDAO.java | 13 +++++++++++++ .../com/cool/store/mapper/HyOpenAreaInfoMapper.java | 6 ++++++ .../main/resources/mapper/HyOpenAreaInfoMapper.xml | 9 +++++++++ .../service/impl/InspectionSettingServiceImpl.java | 10 ++++++++-- 5 files changed, 38 insertions(+), 3 deletions(-) diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java index 34a46bbcf..69ec9e182 100644 --- a/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java +++ b/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java @@ -83,7 +83,8 @@ public enum ErrorCodeEnum { GET_ACCESSTOKEN_ERROR(600001, "获取小程序TOKEN错误!", null), NEW_MOBILE_HAS_EXIST(600002,"加盟商用户信息已存在",null), INSPECTION_USER_OCCUPY(600002,"当前稽核人已经配置其他战区",null), - INSPECTION_INFO_NOT_EXIST(600005, "稽核信息不存在!", null) + INSPECTION_INFO_NOT_EXIST(600005, "稽核信息不存在!", null), + OPEN_AREA_NULL(600006,"归属地区不能为空",null), ; diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyOpenAreaInfoDAO.java b/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyOpenAreaInfoDAO.java index 008db64d9..27f801750 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyOpenAreaInfoDAO.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/dao/HyOpenAreaInfoDAO.java @@ -116,4 +116,17 @@ public class HyOpenAreaInfoDAO { public List getAllOpenArea(){ return hyOpenAreaInfoMapper.getAllOpenArea(); } + + /** + * 过滤叶子节点 + * @param openAreaIds + * @return 叶子节点id + */ + public List filterLeafNode(List openAreaIds){ + if(CollectionUtils.isEmpty(openAreaIds)){ + return Lists.newArrayList(); + } + return hyOpenAreaInfoMapper.filterLeafNode(openAreaIds); + } + } diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyOpenAreaInfoMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyOpenAreaInfoMapper.java index d85690aba..a3a5eef01 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyOpenAreaInfoMapper.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyOpenAreaInfoMapper.java @@ -111,5 +111,11 @@ public interface HyOpenAreaInfoMapper { */ List getAllOpenArea(); + /** + * 过滤叶子节点 + * @param openAreaIds + * @return + */ + List filterLeafNode(@Param("openAreaIds") List openAreaIds); } \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyOpenAreaInfoMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyOpenAreaInfoMapper.xml index a67cf9950..d6611c821 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/HyOpenAreaInfoMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/HyOpenAreaInfoMapper.xml @@ -285,4 +285,13 @@ select from hy_open_area_info + + \ No newline at end of file diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionSettingServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionSettingServiceImpl.java index d88b3fc03..0d731f65b 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionSettingServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InspectionSettingServiceImpl.java @@ -79,13 +79,16 @@ public class InspectionSettingServiceImpl implements InspectionSettingService { if(CollectionUtils.isNotEmpty(inspectionUserSetting)){ throw new ServiceException(ErrorCodeEnum.INSPECTION_USER_OCCUPY); } + List openAreaMappingIds = hyOpenAreaInfoDAO.filterLeafNode(param.getOpenAreaMappingIds()); + if(CollectionUtils.isEmpty(openAreaMappingIds)){ + throw new ServiceException(ErrorCodeEnum.OPEN_AREA_NULL); + } HyInspectionSettingDO inspectionSetting = new HyInspectionSettingDO(); inspectionSetting.setInspectionUserId(param.getInspectionUserId()); inspectionSetting.setZoneName(param.getZoneName()); inspectionSetting.setCreateUserId(userId); inspectionSetting.setCreateTime(new Date()); Long inspectionSettingId = hyInspectionSettingDAO.addInspectionSetting(inspectionSetting); - List openAreaMappingIds = param.getOpenAreaMappingIds(); hyInspectionSettingMappingDAO.addInspectionSettingMapping(inspectionSettingId, openAreaMappingIds); return inspectionSettingId; } @@ -97,6 +100,10 @@ public class InspectionSettingServiceImpl implements InspectionSettingService { if(CollectionUtils.isNotEmpty(inspectionUserSetting)){ throw new ServiceException(ErrorCodeEnum.INSPECTION_USER_OCCUPY); } + List openAreaMappingIds = hyOpenAreaInfoDAO.filterLeafNode(param.getOpenAreaMappingIds()); + if(CollectionUtils.isEmpty(openAreaMappingIds)){ + throw new ServiceException(ErrorCodeEnum.OPEN_AREA_NULL); + } HyInspectionSettingDO inspectionSetting = new HyInspectionSettingDO(); inspectionSetting.setId(param.getInspectionSettingId()); inspectionSetting.setInspectionUserId(param.getInspectionUserId()); @@ -104,7 +111,6 @@ public class InspectionSettingServiceImpl implements InspectionSettingService { inspectionSetting.setUpdateUserId(userId); inspectionSetting.setUpdateTime(new Date()); hyInspectionSettingDAO.updateInspectionSetting(inspectionSetting); - List openAreaMappingIds = param.getOpenAreaMappingIds(); return hyInspectionSettingMappingDAO.updateInspectionSettingMapping(param.getInspectionSettingId(), openAreaMappingIds); } From 313cbf531bdb5e12552f187faf059d4ebda0580c Mon Sep 17 00:00:00 2001 From: zhangchenbiao Date: Thu, 20 Jul 2023 16:20:28 +0800 Subject: [PATCH 19/21] update --- .../store/vo/inspection/setting/InspectionSettingPageVO.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingPageVO.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingPageVO.java index 29fee5519..2122d0c00 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingPageVO.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/inspection/setting/InspectionSettingPageVO.java @@ -37,7 +37,7 @@ public class InspectionSettingPageVO { private Date updateTime; @ApiModelProperty("更新人名称") - private String updateUsername; + private String updateUserName; /** * dto转vo @@ -57,7 +57,7 @@ public class InspectionSettingPageVO { result.setInspectionUserId(inspectionSetting.getInspectionUserId()); result.setInspectionUserName(userNameMap.get(inspectionSetting.getInspectionUserId())); result.setUpdateTime(inspectionSetting.getUpdateTime()); - result.setUpdateUsername(userNameMap.get(inspectionSetting.getUpdateUserId())); + result.setUpdateUserName(userNameMap.get(inspectionSetting.getUpdateUserId())); resultList.add(result); } return resultList; From 35dc22f8f1ff5d6d07a78ff1178286ec3f8129ef Mon Sep 17 00:00:00 2001 From: "feng.li" Date: Thu, 20 Jul 2023 16:46:50 +0800 Subject: [PATCH 20/21] =?UTF-8?q?=E5=8D=95=E8=AF=8D=E6=8B=BC=E5=86=99vedio?= =?UTF-8?q?->video?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/HyInspectionMapper.xml | 110 +++++++++--------- .../mapper/HyInterviewInspectionLogMapper.xml | 92 +++++++-------- .../cool/store/vo/interview/InterviewVO.java | 2 +- .../service/impl/InterviewServiceImpl.java | 2 +- 4 files changed, 103 insertions(+), 103 deletions(-) diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml index 7629e1fad..2934a272f 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml @@ -3,20 +3,20 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -51,11 +51,11 @@ description, inspection_time, creator, updator, remark, deleted, create_time, update_time) - values (#{id}, #{interviewPlanId}, #{operatorUserId,jdbcType=VARCHAR}, - #{type,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{files,jdbcType=VARCHAR}, - #{description,jdbcType=VARCHAR}, #{inspectionTime,jdbcType=TIMESTAMP}, #{creator,jdbcType=VARCHAR}, - #{updator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{deleted,jdbcType=BIT}, - #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) + values (#{id}, #{interviewPlanId}, #{operatorUserId}, + #{type}, #{status}, #{files}, + #{description}, #{inspectionTime}, #{creator}, + #{updator}, #{remark}, #{deleted}, + #{createTime}, #{updateTime}) insert into hy_inspection @@ -111,40 +111,40 @@ #{interviewPlanId}, - #{operatorUserId,jdbcType=VARCHAR}, + #{operatorUserId}, - #{type,jdbcType=TINYINT}, + #{type}, - #{status,jdbcType=TINYINT}, + #{status}, - #{files,jdbcType=VARCHAR}, + #{files}, - #{description,jdbcType=VARCHAR}, + #{description}, - #{inspectionTime,jdbcType=TIMESTAMP}, + #{inspectionTime}, - #{creator,jdbcType=VARCHAR}, + #{creator}, - #{updator,jdbcType=VARCHAR}, + #{updator}, - #{remark,jdbcType=VARCHAR}, + #{remark}, - #{deleted,jdbcType=BIT}, + #{deleted}, - #{createTime,jdbcType=TIMESTAMP}, + #{createTime}, - #{updateTime,jdbcType=TIMESTAMP}, + #{updateTime}, @@ -155,40 +155,40 @@ interview_plan_id = #{interviewPlanId}, - operator_user_id = #{operatorUserId,jdbcType=VARCHAR}, + operator_user_id = #{operatorUserId}, - type = #{type,jdbcType=TINYINT}, + type = #{type}, - status = #{status,jdbcType=TINYINT}, + status = #{status}, - files = #{files,jdbcType=VARCHAR}, + files = #{files}, - description = #{description,jdbcType=VARCHAR}, + description = #{description}, - inspection_time = #{inspectionTime,jdbcType=TIMESTAMP}, + inspection_time = #{inspectionTime}, - creator = #{creator,jdbcType=VARCHAR}, + creator = #{creator}, - updator = #{updator,jdbcType=VARCHAR}, + updator = #{updator}, - remark = #{remark,jdbcType=VARCHAR}, + remark = #{remark}, - deleted = #{deleted,jdbcType=BIT}, + deleted = #{deleted}, - create_time = #{createTime,jdbcType=TIMESTAMP}, + create_time = #{createTime}, - update_time = #{updateTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime}, where id = #{id} @@ -196,18 +196,18 @@ update hy_inspection set interview_plan_id = #{interviewPlanId}, - operator_user_id = #{operatorUserId,jdbcType=VARCHAR}, - type = #{type,jdbcType=TINYINT}, - status = #{status,jdbcType=TINYINT}, - files = #{files,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR}, - inspection_time = #{inspectionTime,jdbcType=TIMESTAMP}, - creator = #{creator,jdbcType=VARCHAR}, - updator = #{updator,jdbcType=VARCHAR}, - remark = #{remark,jdbcType=VARCHAR}, - deleted = #{deleted,jdbcType=BIT}, - create_time = #{createTime,jdbcType=TIMESTAMP}, - update_time = #{updateTime,jdbcType=TIMESTAMP} + operator_user_id = #{operatorUserId}, + type = #{type}, + status = #{status}, + files = #{files}, + description = #{description}, + inspection_time = #{inspectionTime}, + creator = #{creator}, + updator = #{updator}, + remark = #{remark}, + deleted = #{deleted}, + create_time = #{createTime}, + update_time = #{updateTime} where id = #{id} \ No newline at end of file diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml index 25a174b64..ce24de897 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml @@ -3,16 +3,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -23,21 +23,21 @@ select from hy_interview_inspection_log - where id = #{id,jdbcType=BIGINT} + where id = #{id} delete from hy_interview_inspection_log - where id = #{id,jdbcType=BIGINT} + where id = #{id} insert into hy_interview_inspection_log (id, operator_user_id, inspection_id, operation_type, description, files, operation_time, remark, create_time, update_time) - values (#{id,jdbcType=BIGINT}, #{operatorUserId,jdbcType=VARCHAR}, #{inspectionId,jdbcType=BIGINT}, - #{operationType,jdbcType=TINYINT}, #{description,jdbcType=VARCHAR}, #{files,jdbcType=VARCHAR}, - #{operationTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, - #{updateTime,jdbcType=TIMESTAMP}) + values (#{id}, #{operatorUserId}, #{inspectionId}, + #{operationType}, #{description}, #{files}, + #{operationTime}, #{remark}, #{createTime}, + #{updateTime}) insert into hy_interview_inspection_log @@ -75,34 +75,34 @@ - #{id,jdbcType=BIGINT}, + #{id}, - #{operatorUserId,jdbcType=VARCHAR}, + #{operatorUserId}, - #{inspectionId,jdbcType=BIGINT}, + #{inspectionId}, - #{operationType,jdbcType=TINYINT}, + #{operationType}, - #{description,jdbcType=VARCHAR}, + #{description}, - #{files,jdbcType=VARCHAR}, + #{files}, - #{operationTime,jdbcType=TIMESTAMP}, + #{operationTime}, - #{remark,jdbcType=VARCHAR}, + #{remark}, - #{createTime,jdbcType=TIMESTAMP}, + #{createTime}, - #{updateTime,jdbcType=TIMESTAMP}, + #{updateTime}, @@ -110,46 +110,46 @@ update hy_interview_inspection_log - operator_user_id = #{operatorUserId,jdbcType=VARCHAR}, + operator_user_id = #{operatorUserId}, - inspection_id = #{inspectionId,jdbcType=BIGINT}, + inspection_id = #{inspectionId}, - operation_type = #{operationType,jdbcType=TINYINT}, + operation_type = #{operationType}, - description = #{description,jdbcType=VARCHAR}, + description = #{description}, - files = #{files,jdbcType=VARCHAR}, + files = #{files}, - operation_time = #{operationTime,jdbcType=TIMESTAMP}, + operation_time = #{operationTime}, - remark = #{remark,jdbcType=VARCHAR}, + remark = #{remark}, - create_time = #{createTime,jdbcType=TIMESTAMP}, + create_time = #{createTime}, - update_time = #{updateTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime}, - where id = #{id,jdbcType=BIGINT} + where id = #{id} update hy_interview_inspection_log - set operator_user_id = #{operatorUserId,jdbcType=VARCHAR}, - inspection_id = #{inspectionId,jdbcType=BIGINT}, - operation_type = #{operationType,jdbcType=TINYINT}, - description = #{description,jdbcType=VARCHAR}, - files = #{files,jdbcType=VARCHAR}, - operation_time = #{operationTime,jdbcType=TIMESTAMP}, - remark = #{remark,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=TIMESTAMP}, - update_time = #{updateTime,jdbcType=TIMESTAMP} - where id = #{id,jdbcType=BIGINT} + set operator_user_id = #{operatorUserId}, + inspection_id = #{inspectionId}, + operation_type = #{operationType}, + description = #{description}, + files = #{files}, + operation_time = #{operationTime}, + remark = #{remark}, + create_time = #{createTime}, + update_time = #{updateTime} + where id = #{id} \ No newline at end of file diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewVO.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewVO.java index 50e4ec652..6d70c7dff 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewVO.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/interview/InterviewVO.java @@ -98,7 +98,7 @@ public class InterviewVO { private Integer status; @ApiModelProperty(value = "面试过程信息视频URL数组", required = true) - private List vedioList; + private List videoList; @ApiModelProperty(value = "面试过程信息未解析String", required = false) private String processInfo; diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewServiceImpl.java index 75b5f0fbc..7cbf0374c 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewServiceImpl.java @@ -123,7 +123,7 @@ public class InterviewServiceImpl implements InterviewService { //将 processInfo 解析为 List if (!StringUtils.isEmpty(vo.getProcessInfo())) { List split = Arrays.asList(vo.getProcessInfo().split(",")); - vo.setVedioList(split); + vo.setVideoList(split); vo.setProcessInfo(""); } //查询面试官和记录人信息(面试官必须有) From f3e46c281ebc46262891aa8f7915c41aa0c9e18f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E7=AB=B9=E7=BA=A2?= Date: Thu, 20 Jul 2023 16:51:25 +0800 Subject: [PATCH 21/21] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=84=8F=E5=90=91?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cool/store/service/impl/ZoneServiceImpl.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ZoneServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ZoneServiceImpl.java index 80f2d5763..16f6ff6fd 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ZoneServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ZoneServiceImpl.java @@ -48,6 +48,8 @@ public class ZoneServiceImpl implements ZoneService { EnterpriseUserDAO enterpriseUserDAO; @Resource RegionDAO regionDAO; + @Resource + HyOpenAreaInfoDAO hyOpenAreaInfoDAO; @@ -67,8 +69,9 @@ public class ZoneServiceImpl implements ZoneService { //添加战区映射的意向区域 hyIntendDevMappingDAO.deleteByOpenAreaIds(intentAreaSettingRequest.getOpenAreaIdList(),hyIntendDevZoneInfoDO.getType()); List openAreaIdList = intentAreaSettingRequest.getOpenAreaIdList(); + List openAreaIdFilterList = hyOpenAreaInfoDAO.filterLeafNode(openAreaIdList); List list = new ArrayList<>(); - openAreaIdList.stream().forEach(x->{ + openAreaIdFilterList.stream().forEach(x->{ HyIntendDevelopementMappingDO hyIntendDevelopementMappingDO = new HyIntendDevelopementMappingDO(); hyIntendDevelopementMappingDO.setType(intentAreaSettingRequest.getType()); hyIntendDevelopementMappingDO.setOpenAreaMappingId(String.valueOf(x)); @@ -95,8 +98,9 @@ public class ZoneServiceImpl implements ZoneService { hyIntendDevMappingDAO.deleteByMappingIds(Arrays.asList(intentAreaSettingRequest.getId()) ,intentAreaSettingRequest.getType()); List openAreaIdList = intentAreaSettingRequest.getOpenAreaIdList(); + List openAreaIdFilterList = hyOpenAreaInfoDAO.filterLeafNode(openAreaIdList); List list = new ArrayList<>(); - openAreaIdList.stream().forEach(x->{ + openAreaIdFilterList.stream().forEach(x->{ HyIntendDevelopementMappingDO hyIntendDevelopementMappingDO = new HyIntendDevelopementMappingDO(); hyIntendDevelopementMappingDO.setType(intentAreaSettingRequest.getType()); hyIntendDevelopementMappingDO.setOpenAreaMappingId(String.valueOf(x)); @@ -206,7 +210,8 @@ public class ZoneServiceImpl implements ZoneService { //查询已经绑定战区的 意向区域 List list = hyIntendDevMappingDAO.selectByOpenAreaMappingIdList(intentAreaSettingRequest.getOpenAreaIdList(),intentAreaSettingRequest.getType(),intentAreaSettingRequest.getId()); List openAreaIdList = list.stream().map(ZoneCheckDTO::getOpenAreaMappingId).collect(Collectors.toList()); - List hyOpenAreaInfoDOList = openAreaInfoDAO.selectByIds(openAreaIdList); + List openAreaIdFilterList = hyOpenAreaInfoDAO.filterLeafNode(openAreaIdList); + List hyOpenAreaInfoDOList = openAreaInfoDAO.selectByIds(openAreaIdFilterList); Map areaNameMap = hyOpenAreaInfoDOList.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, HyOpenAreaInfoDO::getAreaName)); List result = new ArrayList<>(); list.forEach(x->{