feat: 装修测量阶段+设计阶段流程优化
This commit is contained in:
@@ -80,7 +80,8 @@ public enum MessageEnum {
|
|||||||
MESSAGE_52("您有一个门店建店资料的订货信息待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_52("您有一个门店建店资料的订货信息待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_53("您有一个门店建店资料的总部订货收款账户信息待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_53("您有一个门店建店资料的总部订货收款账户信息待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_54("您有一个门店建店资料待审核,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_54("您有一个门店建店资料待审核,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_55("您有一个门店设计阶段待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_56("您有一个门店测量阶段待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
;
|
;
|
||||||
|
|
||||||
private String title;
|
private String title;
|
||||||
|
|||||||
@@ -52,7 +52,13 @@ public enum UserRoleEnum {
|
|||||||
LOGISTICS(430000000L,"物流"),
|
LOGISTICS(430000000L,"物流"),
|
||||||
HEAD_OF_DIVISION(40000000L,"分部负责人"),
|
HEAD_OF_DIVISION(40000000L,"分部负责人"),
|
||||||
PRESIDENT(1715882476902L,"总裁"),
|
PRESIDENT(1715882476902L,"总裁"),
|
||||||
VICE_PRESIDENT_IN_CHARGE(1715331371325L,"分管副总裁")
|
VICE_PRESIDENT_IN_CHARGE(1715331371325L,"分管副总裁"),
|
||||||
|
|
||||||
|
MEASURE_OFFICE(440000000L,"测量员"),
|
||||||
|
|
||||||
|
HEAD_OF_DESIGN(450000000L,"设计组长"),
|
||||||
|
|
||||||
|
QUOTATION_OFFICE(470000000L,"报价员"),
|
||||||
;
|
;
|
||||||
|
|
||||||
private Long code;
|
private Long code;
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public enum ShopSubStageEnum {
|
|||||||
SHOP_STAGE_7(ShopStageEnum.SHOP_STAGE_2, 70, "缴纳加盟费/保证金", 1),
|
SHOP_STAGE_7(ShopStageEnum.SHOP_STAGE_2, 70, "缴纳加盟费/保证金", 1),
|
||||||
SHOP_STAGE_8(ShopStageEnum.SHOP_STAGE_2, 80, "加盟合同签约", 4),
|
SHOP_STAGE_8(ShopStageEnum.SHOP_STAGE_2, 80, "加盟合同签约", 4),
|
||||||
SHOP_STAGE_8_5(ShopStageEnum.SHOP_STAGE_2, 85, "发票回传", 5),
|
SHOP_STAGE_8_5(ShopStageEnum.SHOP_STAGE_2, 85, "发票回传", 5),
|
||||||
|
SHOP_STAGE_8_6(ShopStageEnum.SHOP_STAGE_2, 86, "测量阶段", 14),
|
||||||
SHOP_STAGE_9(ShopStageEnum.SHOP_STAGE_2, 90, "设计阶段", 14),
|
SHOP_STAGE_9(ShopStageEnum.SHOP_STAGE_2, 90, "设计阶段", 14),
|
||||||
SHOP_STAGE_11(ShopStageEnum.SHOP_STAGE_2, 110, "施工阶段", 25),
|
SHOP_STAGE_11(ShopStageEnum.SHOP_STAGE_2, 110, "施工阶段", 25),
|
||||||
SHOP_STAGE_12(ShopStageEnum.SHOP_STAGE_2, 120, "装修验收", 27),
|
SHOP_STAGE_12(ShopStageEnum.SHOP_STAGE_2, 120, "装修验收", 27),
|
||||||
@@ -33,7 +34,6 @@ public enum ShopSubStageEnum {
|
|||||||
SHOP_STAGE_24(ShopStageEnum.SHOP_STAGE_2, 240, "营帐通开通", 10),
|
SHOP_STAGE_24(ShopStageEnum.SHOP_STAGE_2, 240, "营帐通开通", 10),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SHOP_STAGE_18(ShopStageEnum.SHOP_STAGE_3, 180, "抖音", null),
|
SHOP_STAGE_18(ShopStageEnum.SHOP_STAGE_3, 180, "抖音", null),
|
||||||
SHOP_STAGE_19(ShopStageEnum.SHOP_STAGE_3, 190, "美团外卖", null),
|
SHOP_STAGE_19(ShopStageEnum.SHOP_STAGE_3, 190, "美团外卖", null),
|
||||||
SHOP_STAGE_20(ShopStageEnum.SHOP_STAGE_3, 200, "美团团购", null),
|
SHOP_STAGE_20(ShopStageEnum.SHOP_STAGE_3, 200, "美团团购", null),
|
||||||
@@ -41,7 +41,6 @@ public enum ShopSubStageEnum {
|
|||||||
SHOP_STAGE_22(ShopStageEnum.SHOP_STAGE_3, 220, "快手", null),
|
SHOP_STAGE_22(ShopStageEnum.SHOP_STAGE_3, 220, "快手", null),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
//阶段
|
//阶段
|
||||||
@@ -64,10 +63,10 @@ public enum ShopSubStageEnum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Integer getTotalStageIsLocationAndPreparation() {
|
public static Integer getTotalStageIsLocationAndPreparation() {
|
||||||
int total=0;
|
int total = 0;
|
||||||
for (ShopSubStageEnum shopStageEnum : ShopSubStageEnum.values()) {
|
for (ShopSubStageEnum shopStageEnum : ShopSubStageEnum.values()) {
|
||||||
if (shopStageEnum.getShopStageEnum().getShopStage().equals(ShopStageEnum.SHOP_STAGE_1.getShopStage())
|
if (shopStageEnum.getShopStageEnum().getShopStage().equals(ShopStageEnum.SHOP_STAGE_1.getShopStage())
|
||||||
||shopStageEnum.getShopStageEnum().getShopStage().equals(ShopStageEnum.SHOP_STAGE_2.getShopStage())) {
|
|| shopStageEnum.getShopStageEnum().getShopStage().equals(ShopStageEnum.SHOP_STAGE_2.getShopStage())) {
|
||||||
total++;
|
total++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -118,6 +117,7 @@ public enum ShopSubStageEnum {
|
|||||||
case SHOP_STAGE_4:
|
case SHOP_STAGE_4:
|
||||||
case SHOP_STAGE_8:
|
case SHOP_STAGE_8:
|
||||||
case SHOP_STAGE_8_5:
|
case SHOP_STAGE_8_5:
|
||||||
|
case SHOP_STAGE_8_6:
|
||||||
case SHOP_STAGE_9:
|
case SHOP_STAGE_9:
|
||||||
case SHOP_STAGE_11:
|
case SHOP_STAGE_11:
|
||||||
case SHOP_STAGE_12:
|
case SHOP_STAGE_12:
|
||||||
|
|||||||
@@ -53,9 +53,15 @@ public enum ShopSubStageStatusEnum {
|
|||||||
SHOP_SUB_STAGE_STATUS_85_1(ShopSubStageEnum.SHOP_STAGE_8_5, 880, "待提交", Boolean.FALSE),
|
SHOP_SUB_STAGE_STATUS_85_1(ShopSubStageEnum.SHOP_STAGE_8_5, 880, "待提交", Boolean.FALSE),
|
||||||
SHOP_SUB_STAGE_STATUS_85_3(ShopSubStageEnum.SHOP_STAGE_8_5, 890, "已完成", Boolean.TRUE),
|
SHOP_SUB_STAGE_STATUS_85_3(ShopSubStageEnum.SHOP_STAGE_8_5, 890, "已完成", Boolean.TRUE),
|
||||||
|
|
||||||
|
//测量阶段
|
||||||
|
SHOP_SUB_STAGE_STATUS_861(ShopSubStageEnum.SHOP_STAGE_8_6, 891, "待分配", Boolean.FALSE),
|
||||||
|
SHOP_SUB_STAGE_STATUS_862(ShopSubStageEnum.SHOP_STAGE_8_6, 892, "测量中", Boolean.FALSE),
|
||||||
|
SHOP_SUB_STAGE_STATUS_863(ShopSubStageEnum.SHOP_STAGE_8_6, 893, "测量完成", Boolean.TRUE),
|
||||||
//设计阶段
|
//设计阶段
|
||||||
SHOP_SUB_STAGE_STATUS_90(ShopSubStageEnum.SHOP_STAGE_9, 900, "待上传", Boolean.FALSE),
|
SHOP_SUB_STAGE_STATUS_90(ShopSubStageEnum.SHOP_STAGE_9, 900, "待分配设计师", Boolean.FALSE),
|
||||||
|
SHOP_SUB_STAGE_STATUS_901(ShopSubStageEnum.SHOP_STAGE_9, 901, "设计中", Boolean.FALSE),
|
||||||
|
SHOP_SUB_STAGE_STATUS_902(ShopSubStageEnum.SHOP_STAGE_9, 902, "待分配报价员", Boolean.FALSE),
|
||||||
|
SHOP_SUB_STAGE_STATUS_903(ShopSubStageEnum.SHOP_STAGE_9, 903, "待报价", Boolean.FALSE),
|
||||||
SHOP_SUB_STAGE_STATUS_905(ShopSubStageEnum.SHOP_STAGE_9, 905, "待确认", Boolean.FALSE),
|
SHOP_SUB_STAGE_STATUS_905(ShopSubStageEnum.SHOP_STAGE_9, 905, "待确认", Boolean.FALSE),
|
||||||
SHOP_SUB_STAGE_STATUS_91(ShopSubStageEnum.SHOP_STAGE_9, 910, "已完成", Boolean.TRUE),
|
SHOP_SUB_STAGE_STATUS_91(ShopSubStageEnum.SHOP_STAGE_9, 910, "已完成", Boolean.TRUE),
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.DecorationDesignInfoDO;
|
||||||
|
import com.cool.store.entity.DecorationMeasureDO;
|
||||||
|
import com.cool.store.mapper.DecorationMeasureMapper;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ryan.xu
|
||||||
|
* @date 2025/04/23
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class DecorationMeasureDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
DecorationMeasureMapper decorationMeasureMapper;
|
||||||
|
|
||||||
|
public DecorationMeasureDO getById(Long id) {
|
||||||
|
if (id == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return decorationMeasureMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DecorationMeasureDO> getByIds(List<Long> shopIds) {
|
||||||
|
if (CollectionUtils.isEmpty(shopIds)) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
Example example = new Example(DecorationDesignInfoDO.class);
|
||||||
|
example.createCriteria().andIn("shopId", shopIds);
|
||||||
|
return decorationMeasureMapper.selectByExample(example);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer insertSelective(DecorationMeasureDO decorationMeasureDO, String userId) {
|
||||||
|
decorationMeasureDO.setCreateUserId(userId);
|
||||||
|
decorationMeasureDO.setUpdateUserId(userId);
|
||||||
|
decorationMeasureDO.setUpdateTime(new Date());
|
||||||
|
decorationMeasureDO.setCreateTime(new Date());
|
||||||
|
return decorationMeasureMapper.insertSelective(decorationMeasureDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer updateByPrimaryKeySelective(DecorationMeasureDO decorationMeasureDO, String userId) {
|
||||||
|
decorationMeasureDO.setUpdateUserId(userId);
|
||||||
|
decorationMeasureDO.setUpdateTime(new Date());
|
||||||
|
return decorationMeasureMapper.updateByPrimaryKeySelective(decorationMeasureDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DecorationMeasureDO getByShopId(Long shopId) {
|
||||||
|
if (shopId == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return decorationMeasureMapper.selectByShopId(shopId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -28,110 +28,111 @@ public class EnterpriseUserDAO {
|
|||||||
private EnterpriseUserMapper enterpriseUserMapper;
|
private EnterpriseUserMapper enterpriseUserMapper;
|
||||||
|
|
||||||
|
|
||||||
public EnterpriseUserDO getUserInfoById(String userId){
|
public EnterpriseUserDO getUserInfoById(String userId) {
|
||||||
if(StringUtils.isBlank(userId)){
|
if (StringUtils.isBlank(userId)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return enterpriseUserMapper.getUserInfoById( userId);
|
return enterpriseUserMapper.getUserInfoById(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EnterpriseUserDO getUserInfoByJobnumber(String jobnumber){
|
public EnterpriseUserDO getUserInfoByJobnumber(String jobnumber) {
|
||||||
if(StringUtils.isBlank(jobnumber)){
|
if (StringUtils.isBlank(jobnumber)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return enterpriseUserMapper.getUserInfoByJobnumber(jobnumber);
|
return enterpriseUserMapper.getUserInfoByJobnumber(jobnumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EnterpriseUserDO getUserInfoByThirdOaUniqueFlag(String thirdOaUniqueFlag){
|
public EnterpriseUserDO getUserInfoByThirdOaUniqueFlag(String thirdOaUniqueFlag) {
|
||||||
if(StringUtils.isBlank(thirdOaUniqueFlag)){
|
if (StringUtils.isBlank(thirdOaUniqueFlag)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return enterpriseUserMapper.getUserInfoByThirdOaUniqueFlag(thirdOaUniqueFlag);
|
return enterpriseUserMapper.getUserInfoByThirdOaUniqueFlag(thirdOaUniqueFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<EnterpriseUserDO> getUserInfoByUserIds(List<String> userIdList){
|
public List<EnterpriseUserDO> getUserInfoByUserIds(List<String> userIdList) {
|
||||||
if(CollectionUtils.isEmpty(userIdList)){
|
if (CollectionUtils.isEmpty(userIdList)) {
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
return enterpriseUserMapper.getUserInfoByUserIds( userIdList);
|
return enterpriseUserMapper.getUserInfoByUserIds(userIdList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<EnterpriseUserDO> searchUserByRegionIdsAndKeyword(List<String> regionIds, String keyword, List<String> leaderRegionIds){
|
public List<EnterpriseUserDO> searchUserByRegionIdsAndKeyword(List<String> regionIds, String keyword, List<String> leaderRegionIds) {
|
||||||
if(CollectionUtils.isEmpty(regionIds)){
|
if (CollectionUtils.isEmpty(regionIds)) {
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
return enterpriseUserMapper.searchUserByRegionIdsAndKeyword( regionIds, keyword, leaderRegionIds);
|
return enterpriseUserMapper.searchUserByRegionIdsAndKeyword(regionIds, keyword, leaderRegionIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isExistDeptUser(String regionId){
|
public boolean isExistDeptUser(String regionId) {
|
||||||
if(StringUtils.isBlank(regionId)){
|
if (StringUtils.isBlank(regionId)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return enterpriseUserMapper.getUserCountByRegionId( regionId) > CommonConstants.ZERO;
|
return enterpriseUserMapper.getUserCountByRegionId(regionId) > CommonConstants.ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取部门负责人
|
* 获取部门负责人
|
||||||
|
*
|
||||||
* @param regionId
|
* @param regionId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<EnterpriseUserDO> getUserListByDeptLeader(String regionId){
|
public List<EnterpriseUserDO> getUserListByDeptLeader(String regionId) {
|
||||||
if(StringUtils.isBlank(regionId)){
|
if (StringUtils.isBlank(regionId)) {
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
return enterpriseUserMapper.getUserListByDeptLeader( regionId);
|
return enterpriseUserMapper.getUserListByDeptLeader(regionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<EnterpriseUserDO> getUserListByDeptLeaders(List<String> regionIds){
|
public List<EnterpriseUserDO> getUserListByDeptLeaders(List<String> regionIds) {
|
||||||
if(CollectionUtils.isEmpty(regionIds)){
|
if (CollectionUtils.isEmpty(regionIds)) {
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
return enterpriseUserMapper.getUserListByDeptLeaders( regionIds);
|
return enterpriseUserMapper.getUserListByDeptLeaders(regionIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<EnterpriseUserDO> getUserListByRegionIds(List<String> regionIds){
|
public List<EnterpriseUserDO> getUserListByRegionIds(List<String> regionIds) {
|
||||||
if(CollectionUtils.isEmpty(regionIds)){
|
if (CollectionUtils.isEmpty(regionIds)) {
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
return enterpriseUserMapper.getUserListByRegionIds( regionIds);
|
return enterpriseUserMapper.getUserListByRegionIds(regionIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getUserIdListByRegionId(Long regionId, List<String> userIdList){
|
public List<String> getUserIdListByRegionId(Long regionId, List<String> userIdList) {
|
||||||
if(CollectionUtils.isEmpty(userIdList) || regionId == null){
|
if (CollectionUtils.isEmpty(userIdList) || regionId == null) {
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
return enterpriseUserMapper.getUserIdListByRegionId(regionId, userIdList);
|
return enterpriseUserMapper.getUserIdListByRegionId(regionId, userIdList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> getUserNameAndMobile(List<String> userIds){
|
public Map<String, String> getUserNameAndMobile(List<String> userIds) {
|
||||||
List<EnterpriseUserDO> userList = getUserInfoByUserIds(userIds);
|
List<EnterpriseUserDO> userList = getUserInfoByUserIds(userIds);
|
||||||
return userList.stream().filter(o->!StringUtils.isAnyBlank(o.getMobile())).collect(Collectors.toMap(k -> k.getUserId(), v -> v.getName() + " " + v.getMobile()));
|
return userList.stream().filter(o -> !StringUtils.isAnyBlank(o.getMobile())).collect(Collectors.toMap(k -> k.getUserId(), v -> v.getName() + " " + v.getMobile()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> getUserNameMap(List<String> userIds){
|
public Map<String, String> getUserNameMap(List<String> userIds) {
|
||||||
List<EnterpriseUserDO> userList = getUserInfoByUserIds(userIds);
|
List<EnterpriseUserDO> userList = getUserInfoByUserIds(userIds);
|
||||||
return userList.stream().filter(o->!StringUtils.isAnyBlank(o.getName())).collect(Collectors.toMap(k -> k.getUserId(), v -> v.getName()));
|
return userList.stream().filter(o -> !StringUtils.isAnyBlank(o.getName())).collect(Collectors.toMap(k -> k.getUserId(), v -> v.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, EnterpriseUserDO> getUserMap(List<String> userIds){
|
public Map<String, EnterpriseUserDO> getUserMap(List<String> userIds) {
|
||||||
List<EnterpriseUserDO> userList = getUserInfoByUserIds(userIds);
|
List<EnterpriseUserDO> userList = getUserInfoByUserIds(userIds);
|
||||||
return userList.stream().filter(o->!StringUtils.isAnyBlank(o.getMobile(), o.getName())).collect(Collectors.toMap(k -> k.getUserId(), Function.identity()));
|
return userList.stream().filter(o -> !StringUtils.isAnyBlank(o.getMobile(), o.getName())).collect(Collectors.toMap(k -> k.getUserId(), Function.identity()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, EnterpriseUserDO> getUserInfoMap(List<String> userIds){
|
public Map<String, EnterpriseUserDO> getUserInfoMap(List<String> userIds) {
|
||||||
List<EnterpriseUserDO> userList = getUserInfoByUserIds(userIds);
|
List<EnterpriseUserDO> userList = getUserInfoByUserIds(userIds);
|
||||||
if (CollectionUtils.isEmpty(userList)){
|
if (CollectionUtils.isEmpty(userList)) {
|
||||||
return new HashMap<>();
|
return new HashMap<>();
|
||||||
}
|
}
|
||||||
return userList.stream().collect(Collectors.toMap(k -> k.getUserId(), Function.identity()));
|
return userList.stream().collect(Collectors.toMap(k -> k.getUserId(), Function.identity()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public EnterpriseUserDO selectByMobile(String mobile) {
|
public EnterpriseUserDO selectByMobile(String mobile) {
|
||||||
return enterpriseUserMapper.selectByMobile( mobile);
|
return enterpriseUserMapper.selectByMobile(mobile);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUserName(String userId){
|
public String getUserName(String userId) {
|
||||||
EnterpriseUserDO userInfo = getUserInfoById(userId);
|
EnterpriseUserDO userInfo = getUserInfoById(userId);
|
||||||
return Optional.ofNullable(userInfo).map(EnterpriseUserDO::getName).orElse(StringUtils.EMPTY);
|
return Optional.ofNullable(userInfo).map(EnterpriseUserDO::getName).orElse(StringUtils.EMPTY);
|
||||||
}
|
}
|
||||||
@@ -140,22 +141,31 @@ public class EnterpriseUserDAO {
|
|||||||
if (StringUtil.isEmpty(investmentManager)) {
|
if (StringUtil.isEmpty(investmentManager)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return enterpriseUserMapper.selectByInvestmentManager( investmentManager);
|
return enterpriseUserMapper.selectByInvestmentManager(investmentManager);
|
||||||
}
|
}
|
||||||
public List<UserNameDTO> getNameByUserId(List<String> userIdList){
|
|
||||||
|
public List<UserNameDTO> getNameByUserId(List<String> userIdList) {
|
||||||
if (CollectionUtils.isEmpty(userIdList)) {
|
if (CollectionUtils.isEmpty(userIdList)) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
return enterpriseUserMapper.selectNameByUserId(userIdList);
|
return enterpriseUserMapper.selectNameByUserId(userIdList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<EnterpriseUserDO> getUserListByRegionId(Long regionId){
|
public List<EnterpriseUserDO> getUserListByRegionId(Long regionId) {
|
||||||
if(regionId == null){
|
if (regionId == null) {
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
return enterpriseUserMapper.getUserListByRegionId(regionId);
|
return enterpriseUserMapper.getUserListByRegionId(regionId);
|
||||||
}
|
}
|
||||||
public List<UserDTO> getAllUser(String eid, String keyword){
|
|
||||||
return enterpriseUserMapper.getAllUser(eid,keyword);
|
public List<UserDTO> getAllUser(String eid, String keyword) {
|
||||||
|
return enterpriseUserMapper.getAllUser(eid, keyword);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<EnterpriseUserDO> findUserInfoByUserIdsAndKeyword(List<String> userIdList, String keyword) {
|
||||||
|
if (CollectionUtils.isEmpty(userIdList)) {
|
||||||
|
return Lists.newArrayList();
|
||||||
|
}
|
||||||
|
return enterpriseUserMapper.searchUserByUserIdsAndKeyword(userIdList, keyword);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.DecorationMeasureDO;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
public interface DecorationMeasureMapper extends Mapper<DecorationMeasureDO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询店铺的测量数据
|
||||||
|
*
|
||||||
|
* @param shopId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
DecorationMeasureDO selectByShopId(Long shopId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -91,4 +91,12 @@ public interface EnterpriseUserMapper {
|
|||||||
List<EnterpriseUserDO> getUserListByRegionId( @Param("regionId") Long regionId);
|
List<EnterpriseUserDO> getUserListByRegionId( @Param("regionId") Long regionId);
|
||||||
|
|
||||||
List<UserDTO> getAllUser(@Param("eid")String id, @Param("keyword") String keyword);
|
List<UserDTO> getAllUser(@Param("eid")String id, @Param("keyword") String keyword);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户id和关键字搜索用户
|
||||||
|
* @param userIdList
|
||||||
|
* @param keyword
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<EnterpriseUserDO> searchUserByUserIdsAndKeyword( @Param("userIdList") List<String> userIdList, @Param("keyword") String keyword);
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.DecorationMeasureMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.DecorationMeasureDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||||
|
<result column="measure_user_id" jdbcType="VARCHAR" property="measureUserId" />
|
||||||
|
<result column="design_user_id" jdbcType="VARCHAR" property="designUserId" />
|
||||||
|
<result column="measure_date" jdbcType="TIMESTAMP" property="measureDate" />
|
||||||
|
<result column="diagram_date" jdbcType="TIMESTAMP" property="diagramDate" />
|
||||||
|
<result column="measure_url" jdbcType="VARCHAR" property="measureUrl" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="submit_time" jdbcType="TIMESTAMP" property="submitTime" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||||
|
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||||
|
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="selectByShopId" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
id,shop_id,measure_user_id,design_user_id,measure_date,diagram_date,measure_url,remark,
|
||||||
|
submit_time,create_time,update_time,deleted,create_user_id,update_user_id
|
||||||
|
from xfsg_decoration_measure where shop_id = #{shopId} and deleted = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -179,4 +179,22 @@
|
|||||||
and( name like concat('%',#{keyword},'%') or mobile like concat('%',#{keyword},'%'))
|
and( name like concat('%',#{keyword},'%') or mobile like concat('%',#{keyword},'%'))
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="searchUserByUserIdsAndKeyword" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
user_id, name, mobile
|
||||||
|
from
|
||||||
|
enterprise_user_${enterpriseId}
|
||||||
|
<where>
|
||||||
|
active = true
|
||||||
|
<if test="userIdList !=null and userIdList.size>0">
|
||||||
|
<foreach collection="userIdList" item="userId" open="and user_id in (" close=")" separator=",">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="keyword!=null and keyword!=''">
|
||||||
|
and( name like concat('%',#{keyword},'%'))
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -1,8 +1,12 @@
|
|||||||
package com.cool.store.entity;
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Data
|
||||||
@Table(name = "xfsg_decoration_design_info")
|
@Table(name = "xfsg_decoration_design_info")
|
||||||
public class DecorationDesignInfoDO {
|
public class DecorationDesignInfoDO {
|
||||||
@Id
|
@Id
|
||||||
@@ -91,209 +95,37 @@ public class DecorationDesignInfoDO {
|
|||||||
*/
|
*/
|
||||||
@Column(name = "construction_create_user")
|
@Column(name = "construction_create_user")
|
||||||
private String constructionCreateUser;
|
private String constructionCreateUser;
|
||||||
/**
|
|
||||||
* @return id
|
|
||||||
*/
|
|
||||||
public Long getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param id
|
* 设计组长ID
|
||||||
*/
|
*/
|
||||||
public void setId(Long id) {
|
@Column(name = "design_leader_id")
|
||||||
this.id = id;
|
private String designLeaderId;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取xfsg_shop_info.id
|
* 设计人员ID
|
||||||
*
|
|
||||||
* @return shop_id - xfsg_shop_info.id
|
|
||||||
*/
|
*/
|
||||||
public Long getShopId() {
|
@Column(name = "design_user_id")
|
||||||
return shopId;
|
private String designUserId;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置xfsg_shop_info.id
|
* 报价员ID
|
||||||
*
|
|
||||||
* @param shopId xfsg_shop_info.id
|
|
||||||
*/
|
*/
|
||||||
public void setShopId(Long shopId) {
|
@Column(name = "quotation_user_id")
|
||||||
this.shopId = shopId;
|
private String quotationUserId;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取报价单
|
* 报价备注
|
||||||
*
|
|
||||||
* @return quotation_url - 报价单
|
|
||||||
*/
|
*/
|
||||||
public String getQuotationUrl() {
|
@Column(name = "quotation_remark")
|
||||||
return quotationUrl;
|
private String quotationRemark;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置报价单
|
* 设计提交时间
|
||||||
*
|
|
||||||
* @param quotationUrl 报价单
|
|
||||||
*/
|
*/
|
||||||
public void setQuotationUrl(String quotationUrl) {
|
@Column(name = "design_submit_time")
|
||||||
this.quotationUrl = quotationUrl;
|
private Date designSubmitTime;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
@Column(name = "quotation_submit_time")
|
||||||
* 获取设计图
|
private Date quotationSubmitTime;
|
||||||
*
|
|
||||||
* @return design_url - 设计图
|
|
||||||
*/
|
|
||||||
public String getDesignUrl() {
|
|
||||||
return designUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置设计图
|
|
||||||
*
|
|
||||||
* @param designUrl 设计图
|
|
||||||
*/
|
|
||||||
public void setDesignUrl(String designUrl) {
|
|
||||||
this.designUrl = designUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取备注
|
|
||||||
*
|
|
||||||
* @return remark - 备注
|
|
||||||
*/
|
|
||||||
public String getRemark() {
|
|
||||||
return remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置备注
|
|
||||||
*
|
|
||||||
* @param remark 备注
|
|
||||||
*/
|
|
||||||
public void setRemark(String remark) {
|
|
||||||
this.remark = remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取加密商验收签名 {"pic":"","acceptanceTime":"","result":"","remark":"","status":0}
|
|
||||||
*
|
|
||||||
* @return partner_acceptance_signatures - 加密商验收签名 {"pic":"","acceptanceTime":"","result":"","remark":"","status":0}
|
|
||||||
*/
|
|
||||||
public String getPartnerAcceptanceSignatures() {
|
|
||||||
return partnerAcceptanceSignatures;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置加密商验收签名 {"pic":"","acceptanceTime":"","result":"","remark":"","status":0}
|
|
||||||
*
|
|
||||||
* @param partnerAcceptanceSignatures 加密商验收签名 {"pic":"","acceptanceTime":"","result":"","remark":"","status":0}
|
|
||||||
*/
|
|
||||||
public void setPartnerAcceptanceSignatures(String partnerAcceptanceSignatures) {
|
|
||||||
this.partnerAcceptanceSignatures = partnerAcceptanceSignatures;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取创建时间
|
|
||||||
*
|
|
||||||
* @return create_time - 创建时间
|
|
||||||
*/
|
|
||||||
public Date getCreateTime() {
|
|
||||||
return createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置创建时间
|
|
||||||
*
|
|
||||||
* @param createTime 创建时间
|
|
||||||
*/
|
|
||||||
public void setCreateTime(Date createTime) {
|
|
||||||
this.createTime = createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取更新时间
|
|
||||||
*
|
|
||||||
* @return update_time - 更新时间
|
|
||||||
*/
|
|
||||||
public Date getUpdateTime() {
|
|
||||||
return updateTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置更新时间
|
|
||||||
*
|
|
||||||
* @param updateTime 更新时间
|
|
||||||
*/
|
|
||||||
public void setUpdateTime(Date updateTime) {
|
|
||||||
this.updateTime = updateTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取是否删除:0.否 1.是
|
|
||||||
*
|
|
||||||
* @return deleted - 是否删除:0.否 1.是
|
|
||||||
*/
|
|
||||||
public Boolean getDeleted() {
|
|
||||||
return deleted;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getConstructionPlanStartTime() {
|
|
||||||
return constructionPlanStartTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConstructionPlanStartTime(Date constructionPlanStartTime) {
|
|
||||||
this.constructionPlanStartTime = constructionPlanStartTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getConstructionPlanEndTime() {
|
|
||||||
return constructionPlanEndTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConstructionPlanEndTime(Date constructionPlanEndTime) {
|
|
||||||
this.constructionPlanEndTime = constructionPlanEndTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getConstructionAnnex() {
|
|
||||||
return constructionAnnex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConstructionAnnex(String constructionAnnex) {
|
|
||||||
this.constructionAnnex = constructionAnnex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getConstructionRemark() {
|
|
||||||
return constructionRemark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConstructionRemark(String constructionRemark) {
|
|
||||||
this.constructionRemark = constructionRemark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getConstructionCreateTime() {
|
|
||||||
return constructionCreateTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConstructionCreateTime(Date constructionCreateTime) {
|
|
||||||
this.constructionCreateTime = constructionCreateTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getConstructionCreateUser() {
|
|
||||||
return constructionCreateUser;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConstructionCreateUser(String constructionCreateUser) {
|
|
||||||
this.constructionCreateUser = constructionCreateUser;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置是否删除:0.否 1.是
|
|
||||||
*
|
|
||||||
* @param deleted 是否删除:0.否 1.是
|
|
||||||
*/
|
|
||||||
public void setDeleted(Boolean deleted) {
|
|
||||||
this.deleted = deleted;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Table(name = "xfsg_decoration_measure")
|
||||||
|
public class DecorationMeasureDO {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺ID
|
||||||
|
*/
|
||||||
|
@Column(name = "shop_id")
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测量员ID
|
||||||
|
*/
|
||||||
|
@Column(name = "measure_user_id")
|
||||||
|
private String measureUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计员角色ID
|
||||||
|
*/
|
||||||
|
@Column(name = "design_user_id")
|
||||||
|
private String designUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测量日期
|
||||||
|
*/
|
||||||
|
@Column(name = "measure_date")
|
||||||
|
private Date measureDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出图日期
|
||||||
|
*/
|
||||||
|
@Column(name = "diagram_date")
|
||||||
|
private Date diagramDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测量图
|
||||||
|
*/
|
||||||
|
@Column(name = "measure_url")
|
||||||
|
private String measureUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@Column(name = "remark")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "submit_time")
|
||||||
|
private Date submitTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@Column(name = "create_user_id")
|
||||||
|
private String createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
@Column(name = "update_user_id")
|
||||||
|
private String updateUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否删除:0.否 1.是
|
||||||
|
*/
|
||||||
|
@Column(name = "deleted", nullable = false, columnDefinition = "tinyint default '0'")
|
||||||
|
private Boolean deleted;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,10 +4,11 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.dto.decoration.ThreeAcceptanceDTO;
|
import com.cool.store.dto.decoration.ThreeAcceptanceDTO;
|
||||||
import com.cool.store.entity.DecorationDesignInfoDO;
|
import com.cool.store.entity.DecorationDesignInfoDO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.swing.text.StyleConstants;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -16,26 +17,31 @@ import java.util.Date;
|
|||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@ApiModel("设计阶段保存入参")
|
||||||
public class DecorationDesignRequest {
|
public class DecorationDesignRequest {
|
||||||
|
|
||||||
@Column(name = "shop_id")
|
@ApiModelProperty("店铺ID")
|
||||||
private Long shopId;
|
private Long shopId;
|
||||||
|
|
||||||
/**
|
@ApiModelProperty("设计组长ID")
|
||||||
* 报价单
|
private String designLeaderId;
|
||||||
*/
|
|
||||||
@Column(name = "quotation_url")
|
@ApiModelProperty("设计师ID")
|
||||||
|
private String designUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty("报价员ID")
|
||||||
|
private String quotationUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty("报价单URL")
|
||||||
private String quotationUrl;
|
private String quotationUrl;
|
||||||
|
|
||||||
/**
|
@ApiModelProperty("设计图URL")
|
||||||
* 设计图
|
|
||||||
*/
|
|
||||||
@Column(name = "design_url")
|
|
||||||
private String designUrl;
|
private String designUrl;
|
||||||
|
|
||||||
/**
|
@ApiModelProperty("报价备注")
|
||||||
* 备注
|
private String quotationRemark;
|
||||||
*/
|
|
||||||
|
@ApiModelProperty("设计备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,14 +51,28 @@ public class DecorationDesignRequest {
|
|||||||
private ThreeAcceptanceDTO partnerAcceptanceSignatures;
|
private ThreeAcceptanceDTO partnerAcceptanceSignatures;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public DecorationDesignInfoDO toDecorationDesignInfoDO() {
|
public DecorationDesignInfoDO toDecorationDesignInfoDO() {
|
||||||
DecorationDesignInfoDO decorationDesignInfoDO = new DecorationDesignInfoDO();
|
DecorationDesignInfoDO decorationDesignInfoDO = new DecorationDesignInfoDO();
|
||||||
decorationDesignInfoDO.setDesignUrl(this.designUrl);
|
decorationDesignInfoDO.setDesignUrl(this.designUrl);
|
||||||
decorationDesignInfoDO.setShopId(this.shopId);
|
decorationDesignInfoDO.setShopId(this.shopId);
|
||||||
|
if (this.designLeaderId != null) {
|
||||||
|
decorationDesignInfoDO.setDesignLeaderId(this.designLeaderId);
|
||||||
|
}
|
||||||
|
if (this.designUserId != null) {
|
||||||
|
decorationDesignInfoDO.setDesignUserId(this.designUserId);
|
||||||
|
}
|
||||||
|
if (this.quotationUserId != null) {
|
||||||
|
decorationDesignInfoDO.setQuotationUserId(this.quotationUserId);
|
||||||
|
}
|
||||||
|
if (this.quotationRemark != null) {
|
||||||
|
decorationDesignInfoDO.setQuotationRemark(this.quotationRemark);
|
||||||
|
}
|
||||||
|
if (this.quotationUrl != null) {
|
||||||
|
decorationDesignInfoDO.setQuotationUrl(this.quotationUrl);
|
||||||
|
}
|
||||||
decorationDesignInfoDO.setRemark(this.remark);
|
decorationDesignInfoDO.setRemark(this.remark);
|
||||||
decorationDesignInfoDO.setQuotationUrl(this.quotationUrl);
|
|
||||||
if (this.partnerAcceptanceSignatures != null){
|
if (this.partnerAcceptanceSignatures != null) {
|
||||||
ThreeAcceptanceDTO threeAcceptanceDTO = this.partnerAcceptanceSignatures;
|
ThreeAcceptanceDTO threeAcceptanceDTO = this.partnerAcceptanceSignatures;
|
||||||
threeAcceptanceDTO.setAcceptanceTime(new Date());
|
threeAcceptanceDTO.setAcceptanceTime(new Date());
|
||||||
threeAcceptanceDTO.setStatus(CommonConstants.ONE);
|
threeAcceptanceDTO.setStatus(CommonConstants.ONE);
|
||||||
@@ -60,7 +80,6 @@ public class DecorationDesignRequest {
|
|||||||
threeAcceptanceDTO.setRemark(threeAcceptanceDTO.getRemark() == null ? "" : threeAcceptanceDTO.getRemark());
|
threeAcceptanceDTO.setRemark(threeAcceptanceDTO.getRemark() == null ? "" : threeAcceptanceDTO.getRemark());
|
||||||
decorationDesignInfoDO.setPartnerAcceptanceSignatures(JSONObject.toJSONString(threeAcceptanceDTO));
|
decorationDesignInfoDO.setPartnerAcceptanceSignatures(JSONObject.toJSONString(threeAcceptanceDTO));
|
||||||
}
|
}
|
||||||
decorationDesignInfoDO.setUpdateTime(new Date());
|
|
||||||
return decorationDesignInfoDO;
|
return decorationDesignInfoDO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import com.cool.store.entity.DecorationMeasureDO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ryan.xu
|
||||||
|
* @date 2025/04/23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("测量阶段保存入参")
|
||||||
|
public class DecorationMeasureRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("店铺ID")
|
||||||
|
@NotNull(message = "店铺ID不能为空")
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
@ApiModelProperty("测量员ID")
|
||||||
|
private String measureUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty("设计组长ID")
|
||||||
|
private String designUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty("测量日期")
|
||||||
|
private Date measureDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("出图日期")
|
||||||
|
private Date diagramDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("测量图URL")
|
||||||
|
private String measureUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建DecorationMeasureDO
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public DecorationMeasureDO buildDecorationMeasureDO() {
|
||||||
|
DecorationMeasureDO decorationMeasureDO = new DecorationMeasureDO();
|
||||||
|
decorationMeasureDO.setShopId(this.shopId);
|
||||||
|
decorationMeasureDO.setMeasureUserId(this.measureUserId);
|
||||||
|
decorationMeasureDO.setDesignUserId(this.designUserId);
|
||||||
|
decorationMeasureDO.setMeasureDate(this.measureDate);
|
||||||
|
decorationMeasureDO.setDiagramDate(this.diagramDate);
|
||||||
|
decorationMeasureDO.setMeasureUrl(this.measureUrl);
|
||||||
|
decorationMeasureDO.setRemark(this.remark);
|
||||||
|
return decorationMeasureDO;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel("角色查询")
|
||||||
|
public class SysRoleRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("角色名称")
|
||||||
|
private String roleName;
|
||||||
|
|
||||||
|
@ApiModelProperty("关键字")
|
||||||
|
private String keyword;
|
||||||
|
}
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
package com.cool.store.vo;
|
package com.cool.store.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
@@ -11,29 +15,42 @@ import java.util.Date;
|
|||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@ApiModel("设计阶段返回实体")
|
||||||
public class DecorationDesignVO {
|
public class DecorationDesignVO {
|
||||||
|
|
||||||
/**
|
@ApiModelProperty("设计阶段ID")
|
||||||
* xfsg_shop_info.id
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
*/
|
private Long id;
|
||||||
@Column(name = "shop_id")
|
|
||||||
|
@ApiModelProperty("店铺ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long shopId;
|
private Long shopId;
|
||||||
|
|
||||||
/**
|
@ApiModelProperty("设计组长ID")
|
||||||
* 报价单
|
private String designLeaderId;
|
||||||
*/
|
|
||||||
@Column(name = "quotation_url")
|
@ApiModelProperty("设计组长名称")
|
||||||
|
private String designLeaderName;
|
||||||
|
|
||||||
|
@ApiModelProperty("设计师ID")
|
||||||
|
private String designUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty("设计师名称")
|
||||||
|
private String designUserName;
|
||||||
|
|
||||||
|
@ApiModelProperty("报价员ID")
|
||||||
|
private String quotationUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty("报价员名称")
|
||||||
|
private String quotationUserName;
|
||||||
|
|
||||||
|
@ApiModelProperty("报价单URL")
|
||||||
private String quotationUrl;
|
private String quotationUrl;
|
||||||
|
|
||||||
/**
|
@ApiModelProperty("设计图URL")
|
||||||
* 设计图
|
|
||||||
*/
|
|
||||||
@Column(name = "design_url")
|
|
||||||
private String designUrl;
|
private String designUrl;
|
||||||
|
|
||||||
/**
|
@ApiModelProperty("备注")
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,10 +59,16 @@ public class DecorationDesignVO {
|
|||||||
@Column(name = "partner_acceptance_signatures")
|
@Column(name = "partner_acceptance_signatures")
|
||||||
private String partnerAcceptanceSignatures;
|
private String partnerAcceptanceSignatures;
|
||||||
|
|
||||||
/**
|
@ApiModelProperty("创建时间")
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
@Column(name = "create_time")
|
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("设计提交时间")
|
||||||
|
private Date designSubmitTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("报价提交时间")
|
||||||
|
private Date quotationSubmitTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("报价备注")
|
||||||
|
private String quotationRemark;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package com.cool.store.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ryan.xu
|
||||||
|
* @date 2025/04/23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("装修测量返回实体")
|
||||||
|
public class DecorationMeasureVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("店铺ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
@ApiModelProperty("测量员ID")
|
||||||
|
private String measureUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty("测量员名称")
|
||||||
|
private String measureUserName;
|
||||||
|
|
||||||
|
@ApiModelProperty("设计组长ID")
|
||||||
|
private String designUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty("设计组长名称")
|
||||||
|
private String designUserName;
|
||||||
|
|
||||||
|
@ApiModelProperty("测量日期")
|
||||||
|
private Date measureDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("出图日期")
|
||||||
|
private Date diagramDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "测量图URL")
|
||||||
|
private String measureUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("提交时间")
|
||||||
|
private Date submitTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -46,7 +46,8 @@ public class RedisUtilConfig {
|
|||||||
jedisPoolConfig.setTestOnBorrow(false);
|
jedisPoolConfig.setTestOnBorrow(false);
|
||||||
|
|
||||||
List<JedisShardInfo> shards = new ArrayList<>();
|
List<JedisShardInfo> shards = new ArrayList<>();
|
||||||
JedisShardInfo jedisShardInfo = new JedisShardInfo(REDIS_HOST_URI);
|
JedisShardInfo jedisShardInfo = new JedisShardInfo("121.37.140.51",9101);
|
||||||
|
jedisShardInfo.setPassword("Q1w2e3r4t5");
|
||||||
shards.add(jedisShardInfo);
|
shards.add(jedisShardInfo);
|
||||||
redisUtil.setShardedJedisPool(new ShardedJedisPool(jedisPoolConfig, shards));
|
redisUtil.setShardedJedisPool(new ShardedJedisPool(jedisPoolConfig, shards));
|
||||||
return redisUtil;
|
return redisUtil;
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.request.DecorationMeasureRequest;
|
||||||
|
import com.cool.store.vo.DecorationMeasureVO;
|
||||||
|
|
||||||
|
public interface DecorationMeasureService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据门店ID获取获取测量数据数据
|
||||||
|
*
|
||||||
|
* @param shopId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
DecorationMeasureVO getDecorationMeasureByShopId(Long shopId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交测量数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean submitDecorationMeasure(DecorationMeasureRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存测量数据
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean saveDecorationMeasure(DecorationMeasureRequest request);
|
||||||
|
}
|
||||||
@@ -163,4 +163,12 @@ public interface DecorationService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Boolean confirmComplete(Long shopId, LoginUserInfo user);
|
Boolean confirmComplete(Long shopId, LoginUserInfo user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存设计数据
|
||||||
|
* @param request
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean saveDecorationDesign(DecorationDesignRequest request, LoginUserInfo user);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,4 +177,13 @@ public interface DeskService {
|
|||||||
*/
|
*/
|
||||||
PageInfo<PreparationCommonPendingVO> buildInformationPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
|
PageInfo<PreparationCommonPendingVO> buildInformationPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测量阶段
|
||||||
|
* @param pageNum
|
||||||
|
* @param pageSize
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageInfo<PreparationCommonPendingVO> measurePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import com.cool.store.dto.UserDTO;
|
|||||||
import com.cool.store.entity.EnterpriseUserDO;
|
import com.cool.store.entity.EnterpriseUserDO;
|
||||||
import com.cool.store.entity.UserAuthMappingDO;
|
import com.cool.store.entity.UserAuthMappingDO;
|
||||||
import com.cool.store.enums.UserRoleEnum;
|
import com.cool.store.enums.UserRoleEnum;
|
||||||
import com.cool.store.response.oppty.UserResponse;
|
import com.cool.store.request.SysRoleRequest;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -20,6 +20,7 @@ public interface UserAuthMappingService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户权限
|
* 获取用户权限
|
||||||
|
*
|
||||||
* @param userId
|
* @param userId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -27,6 +28,7 @@ public interface UserAuthMappingService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户授权的所有区域id
|
* 获取用户授权的所有区域id
|
||||||
|
*
|
||||||
* @param userId
|
* @param userId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -34,6 +36,7 @@ public interface UserAuthMappingService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户授权的所有门店id
|
* 获取用户授权的所有门店id
|
||||||
|
*
|
||||||
* @param userId
|
* @param userId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -41,6 +44,7 @@ public interface UserAuthMappingService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 提供 根据职位 意向区域 查 对应人的接口 同时返回人名字
|
* 提供 根据职位 意向区域 查 对应人的接口 同时返回人名字
|
||||||
|
*
|
||||||
* @param userRoleEnum
|
* @param userRoleEnum
|
||||||
* @param wantShopAreaId
|
* @param wantShopAreaId
|
||||||
* @return
|
* @return
|
||||||
@@ -49,6 +53,7 @@ public interface UserAuthMappingService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取有区域权限和职位 的人
|
* 获取有区域权限和职位 的人
|
||||||
|
*
|
||||||
* @param userRoleEnum
|
* @param userRoleEnum
|
||||||
* @param regionId
|
* @param regionId
|
||||||
* @return
|
* @return
|
||||||
@@ -59,13 +64,16 @@ public interface UserAuthMappingService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取有区域权限和职位 所有人
|
* 获取有区域权限和职位 所有人
|
||||||
|
*
|
||||||
* @param userRoleEnum
|
* @param userRoleEnum
|
||||||
* @param regionId
|
* @param regionId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<EnterpriseUserDO> getUserByRoleEnumAndRegionIdList(UserRoleEnum userRoleEnum, Long regionId);
|
List<EnterpriseUserDO> getUserByRoleEnumAndRegionIdList(UserRoleEnum userRoleEnum, Long regionId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 跟进角色和战区获取用户id
|
* 跟进角色和战区获取用户id
|
||||||
|
*
|
||||||
* @param roleIds
|
* @param roleIds
|
||||||
* @param regionId
|
* @param regionId
|
||||||
* @return
|
* @return
|
||||||
@@ -74,6 +82,7 @@ public interface UserAuthMappingService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据 人 查 这个人管辖区域 对应的意向区域省市code 团队线索
|
* 根据 人 查 这个人管辖区域 对应的意向区域省市code 团队线索
|
||||||
|
*
|
||||||
* @param userId
|
* @param userId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -81,6 +90,7 @@ public interface UserAuthMappingService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 【铺位1】所属战区没有战区经理、营运经理和大区经理,开店负责人展示【王磊】
|
* 【铺位1】所属战区没有战区经理、营运经理和大区经理,开店负责人展示【王磊】
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String getShopManagerUserId();
|
String getShopManagerUserId();
|
||||||
@@ -88,6 +98,7 @@ public interface UserAuthMappingService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 找督导,如果小区没有督导则带入战区经理,没有战区经理则带入大区经理、如果都没有则带入王磊
|
* 找督导,如果小区没有督导则带入战区经理,没有战区经理则带入大区经理、如果都没有则带入王磊
|
||||||
|
*
|
||||||
* @param supervision
|
* @param supervision
|
||||||
* @param regionId
|
* @param regionId
|
||||||
* @return
|
* @return
|
||||||
@@ -95,4 +106,12 @@ public interface UserAuthMappingService {
|
|||||||
EnterpriseUserDO hierarchicalSearch(UserRoleEnum supervision, Long regionId);
|
EnterpriseUserDO hierarchicalSearch(UserRoleEnum supervision, Long regionId);
|
||||||
|
|
||||||
PageInfo<UserDTO> getAllUser(String keyword, Integer pageNum, Integer pageSize);
|
PageInfo<UserDTO> getAllUser(String keyword, Integer pageNum, Integer pageSize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据角色查询用户列表
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<EnterpriseUserDO> findUserListByRole(SysRoleRequest request);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,160 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.cool.store.constants.CommonConstants;
|
||||||
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dao.DecorationMeasureDAO;
|
||||||
|
import com.cool.store.dao.EnterpriseUserDAO;
|
||||||
|
import com.cool.store.dao.ShopInfoDAO;
|
||||||
|
import com.cool.store.dao.ShopStageInfoDAO;
|
||||||
|
import com.cool.store.entity.DecorationMeasureDO;
|
||||||
|
import com.cool.store.entity.LineInfoDO;
|
||||||
|
import com.cool.store.entity.ShopInfoDO;
|
||||||
|
import com.cool.store.entity.ShopStageInfoDO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.MessageEnum;
|
||||||
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.LineInfoMapper;
|
||||||
|
import com.cool.store.request.DecorationMeasureRequest;
|
||||||
|
import com.cool.store.service.DecorationMeasureService;
|
||||||
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
|
import com.cool.store.vo.DecorationMeasureVO;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class DecorationMeasureServiceImpl implements DecorationMeasureService {
|
||||||
|
|
||||||
|
private final DecorationMeasureDAO decorationMeasureDAO;
|
||||||
|
private final EnterpriseUserDAO enterpriseUserDAO;
|
||||||
|
private final RedisUtilPool redisUtilPool;
|
||||||
|
private final ShopStageInfoDAO shopStageInfoDAO;
|
||||||
|
private final ShopInfoDAO shopInfoDAO;
|
||||||
|
private final CommonService commonService;
|
||||||
|
@Resource
|
||||||
|
private LineInfoMapper lineInfoMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DecorationMeasureVO getDecorationMeasureByShopId(Long shopId) {
|
||||||
|
DecorationMeasureDO measureDO = decorationMeasureDAO.getByShopId(shopId);
|
||||||
|
if (measureDO == null) {
|
||||||
|
return new DecorationMeasureVO();
|
||||||
|
}
|
||||||
|
|
||||||
|
DecorationMeasureVO measureVO = BeanUtil.toBean(measureDO, DecorationMeasureVO.class);
|
||||||
|
|
||||||
|
// 收集需要查询的用户ID
|
||||||
|
Set<String> userIds = new HashSet<>();
|
||||||
|
Optional.ofNullable(measureVO.getMeasureUserId()).ifPresent(userIds::add);
|
||||||
|
Optional.ofNullable(measureVO.getDesignUserId()).ifPresent(userIds::add);
|
||||||
|
|
||||||
|
// 只有当有用户ID需要查询时才进行查询
|
||||||
|
if (!userIds.isEmpty()) {
|
||||||
|
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIds));
|
||||||
|
measureVO.setMeasureUserName(userNameMap.getOrDefault(measureVO.getMeasureUserId(), null));
|
||||||
|
measureVO.setDesignUserName(userNameMap.getOrDefault(measureVO.getDesignUserId(), null));
|
||||||
|
}
|
||||||
|
|
||||||
|
return measureVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean submitDecorationMeasure(DecorationMeasureRequest request) {
|
||||||
|
// 重复提交校验(3秒内不能重复提交)
|
||||||
|
String lockKey = "submitDecorationMeasure:" + request.getShopId();
|
||||||
|
String lockValue = UUID.randomUUID().toString();
|
||||||
|
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE * CommonConstants.ONE_SECONDS);
|
||||||
|
if (!acquired) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||||
|
}
|
||||||
|
ShopStageInfoDO subStage = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_8_6);
|
||||||
|
// 获取当前登录用户
|
||||||
|
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||||
|
DecorationMeasureDO saveDO = request.buildDecorationMeasureDO();
|
||||||
|
DecorationMeasureDO measureDO = decorationMeasureDAO.getByShopId(request.getShopId());
|
||||||
|
if (Objects.nonNull(measureDO)) {
|
||||||
|
// 更新已有数据
|
||||||
|
BeanUtil.copyProperties(saveDO, measureDO, "id");
|
||||||
|
measureDO.setSubmitTime(new Date());
|
||||||
|
decorationMeasureDAO.updateByPrimaryKeySelective(measureDO, user.getUserId());
|
||||||
|
Integer currentStatus = subStage.getShopSubStageStatus();
|
||||||
|
|
||||||
|
// 处理状态861->862
|
||||||
|
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_861.getShopSubStageStatus().equals(currentStatus)) {
|
||||||
|
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_862, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90));
|
||||||
|
// 给测量员发送企业微信消息
|
||||||
|
sendMeasureUserMessage(request.getShopId(), request.getMeasureUserId());
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
// 处理状态862->863
|
||||||
|
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_862.getShopSubStageStatus().equals(currentStatus)) {
|
||||||
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_863);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 插入新数据
|
||||||
|
saveDO.setSubmitTime(new Date());
|
||||||
|
decorationMeasureDAO.insertSelective(saveDO, user.getUserId());
|
||||||
|
// 更新设计状态和测量状态
|
||||||
|
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(),
|
||||||
|
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_862, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90));
|
||||||
|
// 给测量员发送企业微信消息
|
||||||
|
sendMeasureUserMessage(request.getShopId(), request.getMeasureUserId());
|
||||||
|
}
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送测量消息给测量员
|
||||||
|
*/
|
||||||
|
private void sendMeasureUserMessage(Long shopId, String userId) {
|
||||||
|
// 获取商店信息
|
||||||
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
|
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||||
|
if (shopInfo == null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||||
|
}
|
||||||
|
HashMap<String, String> map = new HashMap<>(4);
|
||||||
|
map.put("partnerUsername", lineInfo.getUsername());
|
||||||
|
map.put("partnerMobile", lineInfo.getMobile());
|
||||||
|
map.put("storeName", shopInfo.getShopName());
|
||||||
|
commonService.sendQWMessage(
|
||||||
|
Collections.singletonList(userId),
|
||||||
|
MessageEnum.MESSAGE_55,
|
||||||
|
map
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean saveDecorationMeasure(DecorationMeasureRequest request) {
|
||||||
|
// 参数校验
|
||||||
|
if (request == null || request.getShopId() == null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
// 获取当前登录用户
|
||||||
|
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||||
|
DecorationMeasureDO saveDO = request.buildDecorationMeasureDO();
|
||||||
|
DecorationMeasureDO measureDO = decorationMeasureDAO.getByShopId(request.getShopId());
|
||||||
|
|
||||||
|
if (Objects.nonNull(measureDO)) {
|
||||||
|
// 更新已有数据
|
||||||
|
BeanUtil.copyProperties(saveDO, measureDO, "id");
|
||||||
|
decorationMeasureDAO.updateByPrimaryKeySelective(measureDO, user.getUserId());
|
||||||
|
} else {
|
||||||
|
// 插入新数据
|
||||||
|
decorationMeasureDAO.insertSelective(saveDO, user.getUserId());
|
||||||
|
}
|
||||||
|
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,19 +6,15 @@ import com.cool.store.constants.CommonConstants;
|
|||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.decoration.*;
|
import com.cool.store.dto.decoration.*;
|
||||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
|
||||||
import com.cool.store.dto.openPreparation.UserNameDTO;
|
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
||||||
import com.cool.store.enums.point.ShopStageEnum;
|
|
||||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.mapper.LineInfoMapper;
|
import com.cool.store.mapper.LineInfoMapper;
|
||||||
import com.cool.store.mapper.ShopInfoMapper;
|
import com.cool.store.mapper.ShopInfoMapper;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
|
|
||||||
import com.cool.store.response.ThreeSignResponse;
|
import com.cool.store.response.ThreeSignResponse;
|
||||||
import com.cool.store.service.*;
|
import com.cool.store.service.*;
|
||||||
import com.cool.store.utils.CoolDateUtils;
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
@@ -27,11 +23,9 @@ import com.cool.store.utils.poi.StringUtils;
|
|||||||
import com.cool.store.vo.*;
|
import com.cool.store.vo.*;
|
||||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||||
import com.cool.store.vo.Fitment.DesignInfoVo;
|
import com.cool.store.vo.Fitment.DesignInfoVo;
|
||||||
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -40,12 +34,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
|
||||||
import java.text.ParseException;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
|
||||||
import java.util.function.Function;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
@@ -99,6 +88,9 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
RedisUtilPool redisUtilPool;
|
RedisUtilPool redisUtilPool;
|
||||||
@Resource
|
@Resource
|
||||||
DecorationDesignInfoDAO decorationDesignInfoDAO;
|
DecorationDesignInfoDAO decorationDesignInfoDAO;
|
||||||
|
@Resource
|
||||||
|
DecorationMeasureDAO decorationMeasureDAO;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DesignInfoVo DesignInfo(Long shopId) {
|
public DesignInfoVo DesignInfo(Long shopId) {
|
||||||
return null;
|
return null;
|
||||||
@@ -349,7 +341,7 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean miniSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
public Boolean miniSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
||||||
if (!request.miniCheck()){
|
if (!request.miniCheck()) {
|
||||||
throw new ServiceException(ErrorCodeEnum.THE_DATA_IS_NOT_FILLED);
|
throw new ServiceException(ErrorCodeEnum.THE_DATA_IS_NOT_FILLED);
|
||||||
}
|
}
|
||||||
//加盟商
|
//加盟商
|
||||||
@@ -383,7 +375,7 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
@Override
|
@Override
|
||||||
public PageInfo<fitmentCheckVO> getFitmentAcceptanceList(AcceptanceListRequest request, LoginUserInfo user) {
|
public PageInfo<fitmentCheckVO> getFitmentAcceptanceList(AcceptanceListRequest request, LoginUserInfo user) {
|
||||||
List<Long> regions = new ArrayList<>();
|
List<Long> regions = new ArrayList<>();
|
||||||
if ( !sysRoleService.checkIsAdmin(user.getUserId())){
|
if (!sysRoleService.checkIsAdmin(user.getUserId())) {
|
||||||
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(user.getUserId());
|
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(user.getUserId());
|
||||||
for (String authRegionId : authRegionIds) {
|
for (String authRegionId : authRegionIds) {
|
||||||
regions.add(Long.parseLong(authRegionId));
|
regions.add(Long.parseLong(authRegionId));
|
||||||
@@ -543,25 +535,58 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
if (Objects.isNull(request) || request.getShopId() == null) {
|
if (Objects.isNull(request) || request.getShopId() == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
}
|
}
|
||||||
// //必须是待提交状态才能提交
|
|
||||||
// ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage());
|
|
||||||
// if (shopStageInfo != null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
|
|
||||||
// throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
|
|
||||||
// }
|
|
||||||
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
||||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||||
if (Objects.nonNull(decoration)) {
|
if (Objects.nonNull(decoration)) {
|
||||||
|
//更新设计阶段状态
|
||||||
|
ShopStageInfoDO subStage = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_9);
|
||||||
|
decorationDesignInfoDO.setUpdateTime(new Date());
|
||||||
decorationDesignInfoDO.setId(decoration.getId());
|
decorationDesignInfoDO.setId(decoration.getId());
|
||||||
|
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||||
|
decorationDesignInfoDO.setDesignSubmitTime(new Date());
|
||||||
|
}
|
||||||
|
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_902.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||||
|
decorationDesignInfoDO.setQuotationSubmitTime(new Date());
|
||||||
|
}
|
||||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
||||||
} else {
|
|
||||||
decorationDesignInfoDAO.insertSelective(decorationDesignInfoDO);
|
|
||||||
//更新装修设计状态
|
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_905);
|
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||||
Map<String, String> templateParam = new HashMap<>();
|
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||||
templateParam.put("shopName", shopInfo.getShopName());
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901);
|
||||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.DESIGN_STAGE, templateParam);
|
// 给设计师发送企业微信消息
|
||||||
|
sendMeasureUserMessage(request.getShopId(), decorationDesignInfoDO.getDesignUserId(), MessageEnum.MESSAGE_55);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||||
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_902);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_902.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||||
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_903);
|
||||||
|
// 给报价员发送企业微信消息
|
||||||
|
sendMeasureUserMessage(request.getShopId(), request.getQuotationUserId(), MessageEnum.MESSAGE_55);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
//更新设计阶段状态=待确认,装修子流程=待进场
|
||||||
|
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_903.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||||
|
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_905, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110));
|
||||||
|
Map<String, String> templateParam = new HashMap<>();
|
||||||
|
templateParam.put("shopName", shopInfo.getShopName());
|
||||||
|
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.DESIGN_STAGE, templateParam);
|
||||||
|
// 发送企业微信消息
|
||||||
|
sendMeasureUserMessage(request.getShopId(), shopInfo.getInvestmentManager(), MessageEnum.MESSAGE_36);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
decorationDesignInfoDO.setCreateTime(new Date());
|
||||||
|
decorationDesignInfoDO.setUpdateTime(new Date());
|
||||||
|
decorationDesignInfoDO.setDesignSubmitTime(new Date());
|
||||||
|
decorationDesignInfoDAO.insertSelective(decorationDesignInfoDO);
|
||||||
|
//更新装修设计状态
|
||||||
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901);
|
||||||
|
// 给设计师发送企业微信消息
|
||||||
|
sendMeasureUserMessage(request.getShopId(), decorationDesignInfoDO.getDesignUserId(), MessageEnum.MESSAGE_55);
|
||||||
}
|
}
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
@@ -572,16 +597,29 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
}
|
}
|
||||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId);
|
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId);
|
||||||
if (!Objects.isNull(decoration)) {
|
if (decoration == null) {
|
||||||
|
//查询测量阶段的设计组长
|
||||||
|
DecorationMeasureDO measureDO = decorationMeasureDAO.getByShopId(shopId);
|
||||||
|
if (measureDO == null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||||
|
}
|
||||||
DecorationDesignVO decorationDesignVO = new DecorationDesignVO();
|
DecorationDesignVO decorationDesignVO = new DecorationDesignVO();
|
||||||
decorationDesignVO.setDesignUrl(decoration.getDesignUrl());
|
decorationDesignVO.setDesignUserId(measureDO.getDesignUserId());
|
||||||
decorationDesignVO.setRemark(decoration.getRemark());
|
String userName = enterpriseUserDAO.getUserName(measureDO.getMeasureUserId().toString());
|
||||||
decorationDesignVO.setQuotationUrl(decoration.getQuotationUrl());
|
decorationDesignVO.setDesignUserName(userName);
|
||||||
decorationDesignVO.setShopId(decoration.getShopId());
|
|
||||||
decorationDesignVO.setPartnerAcceptanceSignatures(decoration.getPartnerAcceptanceSignatures());
|
|
||||||
return decorationDesignVO;
|
return decorationDesignVO;
|
||||||
}
|
}
|
||||||
return null;
|
DecorationDesignVO decorationDesignVO = BeanUtil.toBean(decoration, DecorationDesignVO.class);
|
||||||
|
//查询员工名称
|
||||||
|
Set<String> userIds = new HashSet<>();
|
||||||
|
Optional.ofNullable(decorationDesignVO.getDesignLeaderId()).ifPresent(userIds::add);
|
||||||
|
Optional.ofNullable(decorationDesignVO.getDesignUserId()).ifPresent(userIds::add);
|
||||||
|
Optional.ofNullable(decorationDesignVO.getQuotationUserId()).ifPresent(userIds::add);
|
||||||
|
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIds));
|
||||||
|
decorationDesignVO.setDesignLeaderName(userNameMap.get(decorationDesignVO.getDesignLeaderId()));
|
||||||
|
decorationDesignVO.setQuotationUserName(userNameMap.get(decorationDesignVO.getQuotationUserId()));
|
||||||
|
decorationDesignVO.setDesignUserName(userNameMap.get(decorationDesignVO.getDesignUserId()));
|
||||||
|
return decorationDesignVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -638,10 +676,10 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean confirmDesign(DecorationDesignRequest request, LoginUserInfo user) {
|
public Boolean confirmDesign(DecorationDesignRequest request, LoginUserInfo user) {
|
||||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||||
if (StringUtils.isBlank(decoration.getQuotationUrl())){
|
if (StringUtils.isBlank(decoration.getQuotationUrl())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.QUOTATION_URL_REQUIRED);
|
throw new ServiceException(ErrorCodeEnum.QUOTATION_URL_REQUIRED);
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(decoration.getDesignUrl())){
|
if (StringUtils.isBlank(decoration.getDesignUrl())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.DESIGN_URL_REQUIRED);
|
throw new ServiceException(ErrorCodeEnum.DESIGN_URL_REQUIRED);
|
||||||
}
|
}
|
||||||
//重复提交校验 3秒内不能重复提交
|
//重复提交校验 3秒内不能重复提交
|
||||||
@@ -653,20 +691,11 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
}
|
}
|
||||||
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
||||||
if (Objects.nonNull(decoration)) {
|
if (Objects.nonNull(decoration)) {
|
||||||
decorationDesignInfoDO.setId(decoration.getId());
|
BeanUtil.copyProperties(decorationDesignInfoDO, decoration, "id");
|
||||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
decorationDesignInfoDAO.updateByPrimaryKeySelective(decoration);
|
||||||
}
|
}
|
||||||
//更新装修设计状态
|
//更新装修设计状态
|
||||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110));
|
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91));
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
|
||||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
|
||||||
HashMap<String, String> map = new HashMap<>();
|
|
||||||
map.put("partnerUsername", lineInfoDO.getUsername());
|
|
||||||
map.put("partnerMobile", lineInfoDO.getMobile());
|
|
||||||
map.put("storeName", shopInfo.getShopName());
|
|
||||||
commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()),
|
|
||||||
MessageEnum.MESSAGE_36,
|
|
||||||
map);
|
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -698,7 +727,7 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
@Override
|
@Override
|
||||||
public Boolean pcSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
public Boolean pcSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
||||||
log.info("submitAcceptance, request:{} ", JSONObject.toJSONString(request));
|
log.info("submitAcceptance, request:{} ", JSONObject.toJSONString(request));
|
||||||
if(StringUtils.isAnyBlank(request.getShopDoorwayPhoto(),request.getShopInteriorPhoto())){
|
if (StringUtils.isAnyBlank(request.getShopDoorwayPhoto(), request.getShopInteriorPhoto())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.THE_DATA_IS_NOT_FILLED);
|
throw new ServiceException(ErrorCodeEnum.THE_DATA_IS_NOT_FILLED);
|
||||||
}
|
}
|
||||||
//营运部 验收签名
|
//营运部 验收签名
|
||||||
@@ -767,6 +796,25 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean saveDecorationDesign(DecorationDesignRequest request, LoginUserInfo user) {
|
||||||
|
//校验参数
|
||||||
|
if (Objects.isNull(request) || request.getShopId() == null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
||||||
|
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||||
|
if (Objects.nonNull(decoration)) {
|
||||||
|
decorationDesignInfoDO.setUpdateTime(new Date());
|
||||||
|
decorationDesignInfoDO.setId(decoration.getId());
|
||||||
|
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
||||||
|
} else {
|
||||||
|
decorationDesignInfoDO.setCreateTime(new Date());
|
||||||
|
decorationDesignInfoDO.setUpdateTime(new Date());
|
||||||
|
decorationDesignInfoDAO.insertSelective(decorationDesignInfoDO);
|
||||||
|
}
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
private DecorationDTO getDecorationDTO(Long shopId) {
|
private DecorationDTO getDecorationDTO(Long shopId) {
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
@@ -783,4 +831,25 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送测量消息给测量员
|
||||||
|
*/
|
||||||
|
private void sendMeasureUserMessage(Long shopId, String userId, MessageEnum messageEnum) {
|
||||||
|
// 获取商店信息
|
||||||
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
|
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||||
|
if (shopInfo == null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||||
|
}
|
||||||
|
HashMap<String, String> map = new HashMap<>(4);
|
||||||
|
map.put("partnerUsername", lineInfo.getUsername());
|
||||||
|
map.put("partnerMobile", lineInfo.getMobile());
|
||||||
|
map.put("storeName", shopInfo.getShopName());
|
||||||
|
commonService.sendQWMessage(
|
||||||
|
Collections.singletonList(userId),
|
||||||
|
messageEnum,
|
||||||
|
map
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package com.cool.store.service.impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
|
import com.cool.store.dto.DeskStageDTO;
|
||||||
import com.cool.store.dto.InvestmentCountDTO;
|
import com.cool.store.dto.InvestmentCountDTO;
|
||||||
import com.cool.store.dto.PendingCountDTO;
|
import com.cool.store.dto.PendingCountDTO;
|
||||||
import com.cool.store.dto.DeskStageDTO;
|
|
||||||
import com.cool.store.dto.openPreparation.PlanLineDTO;
|
import com.cool.store.dto.openPreparation.PlanLineDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.UserRoleEnum;
|
import com.cool.store.enums.UserRoleEnum;
|
||||||
@@ -25,7 +25,10 @@ import com.cool.store.utils.StringUtil;
|
|||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
import com.cool.store.vo.BaseInfoVO;
|
import com.cool.store.vo.BaseInfoVO;
|
||||||
import com.cool.store.vo.LabelBaseInfoVO;
|
import com.cool.store.vo.LabelBaseInfoVO;
|
||||||
import com.cool.store.vo.desk.*;
|
import com.cool.store.vo.desk.IntendPendingVO;
|
||||||
|
import com.cool.store.vo.desk.PayStagePendingVO;
|
||||||
|
import com.cool.store.vo.desk.PreparationCommonPendingVO;
|
||||||
|
import com.cool.store.vo.desk.SigningPendingVO;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
@@ -504,27 +507,47 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
}
|
}
|
||||||
if (userRoleIds.contains(UserRoleEnum.FINANCE.getCode())) {
|
if (userRoleIds.contains(UserRoleEnum.FINANCE.getCode())) {
|
||||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus());
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus());
|
||||||
}
|
}
|
||||||
if (userRoleIds.contains(UserRoleEnum.HEAD_OF_DIVISION.getCode()) || userRoleIds.contains(UserRoleEnum.REGIONAL_MANAGER.getCode())) {
|
if (userRoleIds.contains(UserRoleEnum.HEAD_OF_DIVISION.getCode()) || userRoleIds.contains(UserRoleEnum.REGIONAL_MANAGER.getCode())) {
|
||||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153.getShopSubStageStatus());
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153.getShopSubStageStatus());
|
||||||
}
|
}
|
||||||
if (userRoleIds.contains(UserRoleEnum.VICE_PRESIDENT_IN_CHARGE.getCode()) ) {
|
if (userRoleIds.contains(UserRoleEnum.VICE_PRESIDENT_IN_CHARGE.getCode())) {
|
||||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_154.getShopSubStageStatus());
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_154.getShopSubStageStatus());
|
||||||
}
|
}
|
||||||
if (userRoleIds.contains(UserRoleEnum.PRESIDENT.getCode()) ) {
|
if (userRoleIds.contains(UserRoleEnum.PRESIDENT.getCode())) {
|
||||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_155.getShopSubStageStatus());
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_155.getShopSubStageStatus());
|
||||||
}
|
}
|
||||||
Boolean isAdmin = sysRoleService.checkIsAdmin(user.getUserId());
|
Boolean isAdmin = sysRoleService.checkIsAdmin(user.getUserId());
|
||||||
if(isAdmin){
|
if (isAdmin) {
|
||||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus());
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus());
|
||||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus());
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus());
|
||||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153.getShopSubStageStatus());
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153.getShopSubStageStatus());
|
||||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_154.getShopSubStageStatus());
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_154.getShopSubStageStatus());
|
||||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_155.getShopSubStageStatus());
|
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_155.getShopSubStageStatus());
|
||||||
}
|
}
|
||||||
return commonPendingVOPageInfo(pageNum, pageSize, isAdmin?null:user, ShopSubStageEnum.SHOP_STAGE_15, subStageStatusList, isAdmin?Boolean.FALSE:Boolean.TRUE);
|
return commonPendingVOPageInfo(pageNum, pageSize, isAdmin ? null : user, ShopSubStageEnum.SHOP_STAGE_15, subStageStatusList, isAdmin ? Boolean.FALSE : Boolean.TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<PreparationCommonPendingVO> measurePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||||
|
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_8_6,
|
||||||
|
Arrays.asList(SHOP_SUB_STAGE_STATUS_861.getShopSubStageStatus(),SHOP_SUB_STAGE_STATUS_862.getShopSubStageStatus()), Boolean.FALSE);
|
||||||
|
List<PreparationCommonPendingVO> list = pageInfo.getList();
|
||||||
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
||||||
|
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
|
||||||
|
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
||||||
|
doThing(deskStageMap, subStageList);
|
||||||
|
for (PreparationCommonPendingVO vo : list) {
|
||||||
|
if (deskStageMap.get(vo.getShopId()) != null) {
|
||||||
|
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pageInfo.setList(list);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用查询
|
* 通用查询
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ public class PreparationServiceImpl implements PreparationService {
|
|||||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_30);
|
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_30);
|
||||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_40);
|
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_40);
|
||||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_1);
|
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_1);
|
||||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90);
|
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_861);
|
||||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_140);
|
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_140);
|
||||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_150);
|
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_150);
|
||||||
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, list);
|
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, list);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.cool.store.service.impl;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.dao.EnterpriseUserDAO;
|
import com.cool.store.dao.EnterpriseUserDAO;
|
||||||
|
import com.cool.store.dao.EnterpriseUserRoleDao;
|
||||||
import com.cool.store.dao.RegionAreaConfigDao;
|
import com.cool.store.dao.RegionAreaConfigDao;
|
||||||
import com.cool.store.dto.UserDTO;
|
import com.cool.store.dto.UserDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
@@ -11,6 +12,7 @@ import com.cool.store.exception.ServiceException;
|
|||||||
import com.cool.store.mapper.RegionMapper;
|
import com.cool.store.mapper.RegionMapper;
|
||||||
import com.cool.store.mapper.SysRoleMapper;
|
import com.cool.store.mapper.SysRoleMapper;
|
||||||
import com.cool.store.mapper.UserAuthMappingMapper;
|
import com.cool.store.mapper.UserAuthMappingMapper;
|
||||||
|
import com.cool.store.request.SysRoleRequest;
|
||||||
import com.cool.store.service.UserAuthMappingService;
|
import com.cool.store.service.UserAuthMappingService;
|
||||||
import com.cool.store.utils.RedisConstantUtil;
|
import com.cool.store.utils.RedisConstantUtil;
|
||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
@@ -71,6 +73,10 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
|||||||
@Value("${spring.profiles.active}")
|
@Value("${spring.profiles.active}")
|
||||||
private String active;
|
private String active;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private EnterpriseUserRoleDao enterpriseUserRoleDao;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<UserAuthMappingDO> listUserAuthMappingByUserId(String userId) {
|
public List<UserAuthMappingDO> listUserAuthMappingByUserId(String userId) {
|
||||||
if (StringUtils.isBlank(userId)) {
|
if (StringUtils.isBlank(userId)) {
|
||||||
@@ -305,7 +311,7 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
|||||||
@Override
|
@Override
|
||||||
public String getShopManagerUserId() {
|
public String getShopManagerUserId() {
|
||||||
Boolean isOnline = active.equals(CommonConstants.HD_ENV) || active.equals(CommonConstants.ONLINE_ENV);
|
Boolean isOnline = active.equals(CommonConstants.HD_ENV) || active.equals(CommonConstants.ONLINE_ENV);
|
||||||
return isOnline ? CommonConstants.DEAULT_SHOP_MANAGER_USER_ID_ONLINE : CommonConstants.DEAULT_SHOP_MANAGER_USER_ID_TEST;
|
return isOnline ? CommonConstants.DEAULT_SHOP_MANAGER_USER_ID_ONLINE : CommonConstants.DEAULT_SHOP_MANAGER_USER_ID_TEST;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查找有战区权限的人
|
// 查找有战区权限的人
|
||||||
@@ -399,11 +405,11 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
|||||||
private String getDefaultJobnumber(UserRoleEnum userRoleEnum) {
|
private String getDefaultJobnumber(UserRoleEnum userRoleEnum) {
|
||||||
Boolean isOnline = active.equals(CommonConstants.HD_ENV) || active.equals(CommonConstants.ONLINE_ENV);
|
Boolean isOnline = active.equals(CommonConstants.HD_ENV) || active.equals(CommonConstants.ONLINE_ENV);
|
||||||
// 如果找不到招商专员,则分配给默认的招商经理
|
// 如果找不到招商专员,则分配给默认的招商经理
|
||||||
if (UserRoleEnum.INVESTMENT_COMMISSIONER.equals(userRoleEnum)|| UserRoleEnum.STRONG_INVESTMENT_COMMISSIONER.equals(userRoleEnum)) {
|
if (UserRoleEnum.INVESTMENT_COMMISSIONER.equals(userRoleEnum) || UserRoleEnum.STRONG_INVESTMENT_COMMISSIONER.equals(userRoleEnum)) {
|
||||||
return isOnline ? CommonConstants.DEAULT_INVESTMENT_JOBNUMBER_ONLINE : CommonConstants.DEAULT_INVESTMENT_JOBNUMBER_TEST;
|
return isOnline ? CommonConstants.DEAULT_INVESTMENT_JOBNUMBER_ONLINE : CommonConstants.DEAULT_INVESTMENT_JOBNUMBER_TEST;
|
||||||
} else if (UserRoleEnum.SELECT_SITE_COMMISSIONER.equals(userRoleEnum)) {
|
} else if (UserRoleEnum.SELECT_SITE_COMMISSIONER.equals(userRoleEnum)) {
|
||||||
// 如果找不到选址专员,则分配给默认的选址经理
|
// 如果找不到选址专员,则分配给默认的选址经理
|
||||||
return isOnline ? CommonConstants.DEAULT_SELECT_SITE_MANAGER_ONLINE : CommonConstants.DEAULT_SELECT_SITE_MANAGER_TEST;
|
return isOnline ? CommonConstants.DEAULT_SELECT_SITE_MANAGER_ONLINE : CommonConstants.DEAULT_SELECT_SITE_MANAGER_TEST;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -420,32 +426,32 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
|||||||
List<RegionDO> bigRegions = regionByRegionIds.stream().filter(item -> Constants.ONE_STRING.equals(item.getThirdRegionType())).collect(Collectors.toList());
|
List<RegionDO> bigRegions = regionByRegionIds.stream().filter(item -> Constants.ONE_STRING.equals(item.getThirdRegionType())).collect(Collectors.toList());
|
||||||
RegionDO fightRegion = new RegionDO();
|
RegionDO fightRegion = new RegionDO();
|
||||||
RegionDO bigRegion = new RegionDO();
|
RegionDO bigRegion = new RegionDO();
|
||||||
if (CollectionUtils.isNotEmpty(fightRegions)){
|
if (CollectionUtils.isNotEmpty(fightRegions)) {
|
||||||
fightRegion = fightRegions.get(0);
|
fightRegion = fightRegions.get(0);
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(bigRegions)){
|
if (CollectionUtils.isNotEmpty(bigRegions)) {
|
||||||
bigRegion = bigRegions.get(0);
|
bigRegion = bigRegions.get(0);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (Objects.isNull(supervisionUser)){
|
if (Objects.isNull(supervisionUser)) {
|
||||||
//战区经理
|
//战区经理
|
||||||
EnterpriseUserDO theaterManager = getUserByRoleEnumAndRegionId(UserRoleEnum.THEATER_MANAGER, fightRegion.getId());
|
EnterpriseUserDO theaterManager = getUserByRoleEnumAndRegionId(UserRoleEnum.THEATER_MANAGER, fightRegion.getId());
|
||||||
if (Objects.isNull(theaterManager)){
|
if (Objects.isNull(theaterManager)) {
|
||||||
//大区总
|
//大区总
|
||||||
EnterpriseUserDO regionManager = getUserByRoleEnumAndRegionId(UserRoleEnum.REGION_MANAGER, bigRegion.getId());
|
EnterpriseUserDO regionManager = getUserByRoleEnumAndRegionId(UserRoleEnum.REGION_MANAGER, bigRegion.getId());
|
||||||
if (Objects.isNull(regionManager)){
|
if (Objects.isNull(regionManager)) {
|
||||||
EnterpriseUserDO userInfoByJobnumber = enterpriseUserDAO.getUserInfoByJobnumber(Constants.WANG_LEI_JOB_NUMBER);
|
EnterpriseUserDO userInfoByJobnumber = enterpriseUserDAO.getUserInfoByJobnumber(Constants.WANG_LEI_JOB_NUMBER);
|
||||||
if (Objects.isNull(userInfoByJobnumber)){
|
if (Objects.isNull(userInfoByJobnumber)) {
|
||||||
throw new ServiceException("找不到督导");
|
throw new ServiceException("找不到督导");
|
||||||
}else {
|
} else {
|
||||||
return userInfoByJobnumber;
|
return userInfoByJobnumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return theaterManager;
|
return theaterManager;
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
log.error("hierarchicalSearch errorMessage:{}",e.getMessage());
|
log.error("hierarchicalSearch errorMessage:{}", e.getMessage());
|
||||||
throw new ServiceException(ErrorCodeEnum.UNKNOWN);
|
throw new ServiceException(ErrorCodeEnum.UNKNOWN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -454,11 +460,24 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<UserDTO> getAllUser(String keyword, Integer pageNum, Integer pageSize) {
|
public PageInfo<UserDTO> getAllUser(String keyword, Integer pageNum, Integer pageSize) {
|
||||||
PageHelper.startPage(pageNum,pageSize);
|
PageHelper.startPage(pageNum, pageSize);
|
||||||
List<UserDTO> allUser = enterpriseUserDAO.getAllUser(eid, keyword);
|
List<UserDTO> allUser = enterpriseUserDAO.getAllUser(eid, keyword);
|
||||||
return new PageInfo<>(allUser);
|
return new PageInfo<>(allUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<EnterpriseUserDO> findUserListByRole(SysRoleRequest request) {
|
||||||
|
UserRoleEnum userRoleEnum = UserRoleEnum.getByDesc(request.getRoleName());
|
||||||
|
List<String> hasRoleUserIdList = enterpriseUserRoleDao.selectUserIdsByRoleIdList(Collections.singletonList(userRoleEnum.getCode()));
|
||||||
|
if (CollectionUtils.isEmpty(hasRoleUserIdList)) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(hasRoleUserIdList)) {
|
||||||
|
return enterpriseUserDAO.findUserInfoByUserIdsAndKeyword(hasRoleUserIdList, request.getKeyword());
|
||||||
|
}
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
private List<String> extractNumbers(String regionPath) {
|
private List<String> extractNumbers(String regionPath) {
|
||||||
List<String> regionIds = new ArrayList<>();
|
List<String> regionIds = new ArrayList<>();
|
||||||
Pattern pattern = Pattern.compile("\\d+");
|
Pattern pattern = Pattern.compile("\\d+");
|
||||||
|
|||||||
@@ -205,5 +205,11 @@ public class DeskController {
|
|||||||
return ResponseResult.success(deskService.buildInformationPendingList(pageNumber,pageSize,userInfo));
|
return ResponseResult.success(deskService.buildInformationPendingList(pageNumber,pageSize,userInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("待处理-测量阶段")
|
||||||
|
@GetMapping("/measurePendingList")
|
||||||
|
public ResponseResult<PageInfo<PreparationCommonPendingVO>> measurePendingList(@RequestParam(value = "pageNumber",required = true,defaultValue = "1")Integer pageNumber,
|
||||||
|
@RequestParam(value = "pageSize",required = true,defaultValue = "10")Integer pageSize) {
|
||||||
|
LoginUserInfo userInfo = CurrentUserHolder.getUser();
|
||||||
|
return ResponseResult.success(deskService.measurePendingList(pageNumber,pageSize,userInfo));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,21 +2,17 @@ package com.cool.store.controller.webb;
|
|||||||
|
|
||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
|
||||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||||
import com.cool.store.entity.ShopAuditInfoDO;
|
import com.cool.store.entity.ShopAuditInfoDO;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.response.ThreeSignResponse;
|
import com.cool.store.response.ThreeSignResponse;
|
||||||
|
import com.cool.store.service.DecorationMeasureService;
|
||||||
import com.cool.store.service.DecorationService;
|
import com.cool.store.service.DecorationService;
|
||||||
import com.cool.store.service.PreparationService;
|
import com.cool.store.service.PreparationService;
|
||||||
import com.cool.store.service.SeeAcceptanceService;
|
import com.cool.store.service.SeeAcceptanceService;
|
||||||
import com.cool.store.vo.ConstructionDataVO;
|
import com.cool.store.vo.*;
|
||||||
import com.cool.store.vo.DecorationDesignVO;
|
|
||||||
import com.cool.store.vo.Fitment.DesignInfoVo;
|
import com.cool.store.vo.Fitment.DesignInfoVo;
|
||||||
import com.cool.store.vo.LinePayVO;
|
|
||||||
|
|
||||||
import com.cool.store.vo.fitmentCheckVO;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -44,116 +40,157 @@ public class PCDecorationController {
|
|||||||
private PreparationService preparationService;
|
private PreparationService preparationService;
|
||||||
@Resource
|
@Resource
|
||||||
private SeeAcceptanceService seeAcceptanceService;
|
private SeeAcceptanceService seeAcceptanceService;
|
||||||
|
@Resource
|
||||||
|
private DecorationMeasureService decorationMeasureService;
|
||||||
|
|
||||||
@ApiOperation("获取新店装修flush")
|
@ApiOperation("获取新店装修flush")
|
||||||
@GetMapping("/flush")
|
@GetMapping("/flush")
|
||||||
public ResponseResult<Boolean> getFitmentSub(@RequestParam Long shopId) {
|
public ResponseResult<Boolean> getFitmentSub(@RequestParam Long shopId) {
|
||||||
return ResponseResult.success(preparationService.decorationFlush(shopId));
|
return ResponseResult.success(preparationService.decorationFlush(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取设计子阶段信息")
|
@ApiOperation("获取设计子阶段信息")
|
||||||
@GetMapping("/designSub")
|
@GetMapping("/designSub")
|
||||||
public ResponseResult<DesignInfoVo> getDesignSub(@RequestParam Long shopId){
|
public ResponseResult<DesignInfoVo> getDesignSub(@RequestParam Long shopId) {
|
||||||
return ResponseResult.success( decorationService.DesignInfo(shopId)) ;
|
return ResponseResult.success(decorationService.DesignInfo(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取施工子阶段信息")
|
@ApiOperation("获取施工子阶段信息")
|
||||||
@GetMapping("/getConstructionSub")
|
@GetMapping("/getConstructionSub")
|
||||||
public ResponseResult<List<ConstructionScheduleDTO>> getConstructionSub(@RequestParam Long shopId){
|
public ResponseResult<List<ConstructionScheduleDTO>> getConstructionSub(@RequestParam Long shopId) {
|
||||||
return ResponseResult.success(decorationService.getConstruction(shopId)) ;
|
return ResponseResult.success(decorationService.getConstruction(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取装修款信息")
|
@ApiOperation("获取装修款信息")
|
||||||
@GetMapping("/getDecorationModelInfo")
|
@GetMapping("/getDecorationModelInfo")
|
||||||
public ResponseResult<LinePayVO> getDecorationModelInfo(@RequestParam Long shopId){
|
public ResponseResult<LinePayVO> getDecorationModelInfo(@RequestParam Long shopId) {
|
||||||
return ResponseResult.success(decorationService.getDecorationModel(shopId,null));
|
return ResponseResult.success(decorationService.getDecorationModel(shopId, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取验收列表:三方验收1200待预约,1210 待验收,1220验收中,1230已验收;视觉验收:1300待验收,1310验收不通过,1320验收通过")
|
@ApiOperation("获取验收列表:三方验收1200待预约,1210 待验收,1220验收中,1230已验收;视觉验收:1300待验收,1310验收不通过,1320验收通过")
|
||||||
@PostMapping("/getAcceptanceList")
|
@PostMapping("/getAcceptanceList")
|
||||||
public ResponseResult<PageInfo<fitmentCheckVO>> getAcceptanceList(@RequestBody AcceptanceListRequest request){
|
public ResponseResult<PageInfo<fitmentCheckVO>> getAcceptanceList(@RequestBody AcceptanceListRequest request) {
|
||||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||||
return ResponseResult.success(decorationService.getFitmentAcceptanceList(request,user));
|
return ResponseResult.success(decorationService.getFitmentAcceptanceList(request, user));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取三方验收列表详情")
|
@ApiOperation("获取三方验收列表详情")
|
||||||
@GetMapping("/getAcceptanceDetail")
|
@GetMapping("/getAcceptanceDetail")
|
||||||
public ResponseResult<fitmentCheckVO> getAcceptanceDetail(@RequestParam("shopId") Long shopId){
|
public ResponseResult<fitmentCheckVO> getAcceptanceDetail(@RequestParam("shopId") Long shopId) {
|
||||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||||
return ResponseResult.success(decorationService.getAcceptanceDetail(shopId,user));
|
return ResponseResult.success(decorationService.getAcceptanceDetail(shopId, user));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("预约三方验收")
|
@ApiOperation("预约三方验收")
|
||||||
@PostMapping("/bookingAcceptance")
|
@PostMapping("/bookingAcceptance")
|
||||||
public ResponseResult<Boolean> submitBookingAcceptance(@RequestBody BookingAcceptanceRequest response){
|
public ResponseResult<Boolean> submitBookingAcceptance(@RequestBody BookingAcceptanceRequest response) {
|
||||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||||
return ResponseResult.success(decorationService.bookingAcceptance(response,user));
|
return ResponseResult.success(decorationService.bookingAcceptance(response, user));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取三方验收检查项")
|
@ApiOperation("获取三方验收检查项")
|
||||||
@GetMapping("/getAcceptanceChecks")
|
@GetMapping("/getAcceptanceChecks")
|
||||||
public ResponseResult<ThreeAcceptanceCheckRequest> getAcceptanceChecks(@RequestParam Long shopId){
|
public ResponseResult<ThreeAcceptanceCheckRequest> getAcceptanceChecks(@RequestParam Long shopId) {
|
||||||
return ResponseResult.success(decorationService.getThreeChecks(shopId));
|
return ResponseResult.success(decorationService.getThreeChecks(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("提交三方验收签字")
|
@ApiOperation("提交三方验收签字")
|
||||||
@PostMapping("/submitThreeAcceptanceSign")
|
@PostMapping("/submitThreeAcceptanceSign")
|
||||||
public ResponseResult<Boolean> submitThreeAcceptanceSign(@RequestBody @Validated ThreeAcceptanceRequest request){
|
public ResponseResult<Boolean> submitThreeAcceptanceSign(@RequestBody @Validated ThreeAcceptanceRequest request) {
|
||||||
return ResponseResult.success(decorationService.pcSubmitAcceptanceSign(request));
|
return ResponseResult.success(decorationService.pcSubmitAcceptanceSign(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查看三方验收签字")
|
@ApiOperation("查看三方验收签字")
|
||||||
@GetMapping("/getThreeSign")
|
@GetMapping("/getThreeSign")
|
||||||
public ResponseResult<ThreeSignResponse> getThreeAcceptance(@RequestParam Long shopId){
|
public ResponseResult<ThreeSignResponse> getThreeAcceptance(@RequestParam Long shopId) {
|
||||||
return ResponseResult.success(decorationService.getThreeAcceptanceSign(shopId));
|
return ResponseResult.success(decorationService.getThreeAcceptanceSign(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取视觉验收撤场数据")
|
@ApiOperation("获取视觉验收撤场数据")
|
||||||
@GetMapping("/getSeeAcceptanceWithdrawal")
|
@GetMapping("/getSeeAcceptanceWithdrawal")
|
||||||
public ResponseResult<ConstructionScheduleDTO> getSeeAcceptanceWithdrawal(@RequestParam Long shopId){
|
public ResponseResult<ConstructionScheduleDTO> getSeeAcceptanceWithdrawal(@RequestParam Long shopId) {
|
||||||
return ResponseResult.success(seeAcceptanceService.getWithdrawal(shopId));
|
return ResponseResult.success(seeAcceptanceService.getWithdrawal(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("视觉验收列表")
|
@ApiOperation("视觉验收列表")
|
||||||
@PostMapping("/getSeeAcceptanceList")
|
@PostMapping("/getSeeAcceptanceList")
|
||||||
public ResponseResult< PageInfo<fitmentCheckVO>> getSeeAcceptanceList(@RequestBody AcceptanceListRequest request){
|
public ResponseResult<PageInfo<fitmentCheckVO>> getSeeAcceptanceList(@RequestBody AcceptanceListRequest request) {
|
||||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||||
return ResponseResult.success(seeAcceptanceService.getAcceptanceList(request,user));
|
return ResponseResult.success(seeAcceptanceService.getAcceptanceList(request, user));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取撤场数据")
|
@ApiOperation("获取撤场数据")
|
||||||
@GetMapping("/getWithdrawal")
|
@GetMapping("/getWithdrawal")
|
||||||
public ResponseResult<ConstructionScheduleDTO> getWithdrawal(@RequestParam Long shopId){
|
public ResponseResult<ConstructionScheduleDTO> getWithdrawal(@RequestParam Long shopId) {
|
||||||
return ResponseResult.success(seeAcceptanceService.getWithdrawal(shopId));
|
return ResponseResult.success(seeAcceptanceService.getWithdrawal(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取视觉验收审核数据")
|
@ApiOperation("获取视觉验收审核数据")
|
||||||
@GetMapping("/getSeeAuditInfo")
|
@GetMapping("/getSeeAuditInfo")
|
||||||
public ResponseResult< List<ShopAuditInfoDO> > getAuditInfo(@RequestParam Long shopId){
|
public ResponseResult<List<ShopAuditInfoDO>> getAuditInfo(@RequestParam Long shopId) {
|
||||||
return ResponseResult.success(seeAcceptanceService.getAuditInfo(shopId));
|
return ResponseResult.success(seeAcceptanceService.getAuditInfo(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("验收视觉验收")
|
@ApiOperation("验收视觉验收")
|
||||||
@PostMapping("/auditSee")
|
@PostMapping("/auditSee")
|
||||||
public ResponseResult<Boolean> auditSee(@RequestBody SeeAcceptanceRequest request){
|
public ResponseResult<Boolean> auditSee(@RequestBody SeeAcceptanceRequest request) {
|
||||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||||
return ResponseResult.success(seeAcceptanceService.auditSeeAcceptance(request,user));
|
return ResponseResult.success(seeAcceptanceService.auditSeeAcceptance(request, user));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("提交设计方案")
|
@ApiOperation("提交设计方案")
|
||||||
@PostMapping("/submitDecorationDesign")
|
@PostMapping("/submitDecorationDesign")
|
||||||
public ResponseResult<Boolean> submitDecorationDesign(@RequestBody DecorationDesignRequest request){
|
public ResponseResult<Boolean> submitDecorationDesign(@RequestBody DecorationDesignRequest request) {
|
||||||
return ResponseResult.success(decorationService.submitDecorationDesign(request,CurrentUserHolder.getUser()));
|
return ResponseResult.success(decorationService.submitDecorationDesign(request, CurrentUserHolder.getUser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询设计方案")
|
@ApiOperation("查询设计方案")
|
||||||
@GetMapping("/getDecorationDesign")
|
@GetMapping("/getDecorationDesign")
|
||||||
public ResponseResult<DecorationDesignVO> getDecorationDesign(@RequestParam Long shopId){
|
public ResponseResult<DecorationDesignVO> getDecorationDesign(@RequestParam Long shopId) {
|
||||||
return ResponseResult.success(decorationService.getDecorationDesign(shopId));
|
return ResponseResult.success(decorationService.getDecorationDesign(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("提交施工方案")
|
@ApiOperation("提交施工方案")
|
||||||
@PostMapping("/submitConstructionData")
|
@PostMapping("/submitConstructionData")
|
||||||
public ResponseResult<Boolean> submitConstructionData(@RequestBody ConstructionRequest request){
|
public ResponseResult<Boolean> submitConstructionData(@RequestBody ConstructionRequest request) {
|
||||||
return ResponseResult.success(decorationService.submitConstructionData(request,CurrentUserHolder.getUser()));
|
return ResponseResult.success(decorationService.submitConstructionData(request, CurrentUserHolder.getUser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询施工方案")
|
@ApiOperation("查询施工方案")
|
||||||
@GetMapping("/getConstructionData")
|
@GetMapping("/getConstructionData")
|
||||||
public ResponseResult<ConstructionDataVO> getConstructionData(@RequestParam Long shopId){
|
public ResponseResult<ConstructionDataVO> getConstructionData(@RequestParam Long shopId) {
|
||||||
return ResponseResult.success(decorationService.getConstructionData(shopId));
|
return ResponseResult.success(decorationService.getConstructionData(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("装修阶段完成")
|
@ApiOperation("装修阶段完成")
|
||||||
@PostMapping("/confirmComplete")
|
@PostMapping("/confirmComplete")
|
||||||
public ResponseResult<Boolean> confirmComplete(@RequestBody DecorationDesignRequest request){
|
public ResponseResult<Boolean> confirmComplete(@RequestBody DecorationDesignRequest request) {
|
||||||
return ResponseResult.success(decorationService.confirmComplete(request.getShopId(),CurrentUserHolder.getUser()));
|
return ResponseResult.success(decorationService.confirmComplete(request.getShopId(), CurrentUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询测量方案")
|
||||||
|
@GetMapping("/getDecorationMeasure/{shopId}")
|
||||||
|
public ResponseResult<DecorationMeasureVO> getDecorationMeasure(@PathVariable Long shopId) {
|
||||||
|
return ResponseResult.success(decorationMeasureService.getDecorationMeasureByShopId(shopId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("保存测量方案")
|
||||||
|
@PostMapping("/saveDecorationMeasure")
|
||||||
|
public ResponseResult<Boolean> saveDecorationMeasure(@Validated @RequestBody DecorationMeasureRequest request) {
|
||||||
|
return ResponseResult.success(decorationMeasureService.saveDecorationMeasure(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("提交测量方案")
|
||||||
|
@PostMapping("/submitDecorationMeasure")
|
||||||
|
public ResponseResult<Boolean> submitDecorationMeasure(@Validated @RequestBody DecorationMeasureRequest request) {
|
||||||
|
return ResponseResult.success(decorationMeasureService.submitDecorationMeasure(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("保存设计方案")
|
||||||
|
@PostMapping("/saveDecorationDesign")
|
||||||
|
public ResponseResult<Boolean> saveDecorationDesign(@Validated @RequestBody DecorationDesignRequest request) {
|
||||||
|
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||||
|
return ResponseResult.success(decorationService.saveDecorationDesign(request, user));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.cool.store.controller.webb;
|
|||||||
|
|
||||||
import com.cool.store.entity.EnterpriseUserDO;
|
import com.cool.store.entity.EnterpriseUserDO;
|
||||||
import com.cool.store.enums.UserRoleEnum;
|
import com.cool.store.enums.UserRoleEnum;
|
||||||
|
import com.cool.store.request.SysRoleRequest;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.SysRoleService;
|
import com.cool.store.service.SysRoleService;
|
||||||
import com.cool.store.service.UserAuthMappingService;
|
import com.cool.store.service.UserAuthMappingService;
|
||||||
@@ -9,10 +10,7 @@ import io.swagger.annotations.Api;
|
|||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -47,4 +45,10 @@ public class SysRoleController {
|
|||||||
UserRoleEnum userRoleEnum = UserRoleEnum.getByDesc(roleName);
|
UserRoleEnum userRoleEnum = UserRoleEnum.getByDesc(roleName);
|
||||||
return ResponseResult.success(userAuthMappingService.getUserByRoleEnumAndRegionId(userRoleEnum, regionId));
|
return ResponseResult.success(userAuthMappingService.getUserByRoleEnumAndRegionId(userRoleEnum, regionId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping(path = "/findUserListByRole")
|
||||||
|
@ApiOperation("根据角色获取用户")
|
||||||
|
public ResponseResult<List<EnterpriseUserDO>> findUserListByRole(@RequestBody SysRoleRequest request) {
|
||||||
|
return ResponseResult.success(userAuthMappingService.findUserListByRole(request));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.cool.store.response.ResponseResult;
|
|||||||
|
|
||||||
import com.cool.store.response.ThreeSignResponse;
|
import com.cool.store.response.ThreeSignResponse;
|
||||||
import com.cool.store.service.AssessmentTemplateService;
|
import com.cool.store.service.AssessmentTemplateService;
|
||||||
|
import com.cool.store.service.DecorationMeasureService;
|
||||||
import com.cool.store.service.DecorationService;
|
import com.cool.store.service.DecorationService;
|
||||||
import com.cool.store.service.SeeAcceptanceService;
|
import com.cool.store.service.SeeAcceptanceService;
|
||||||
import com.cool.store.vo.*;
|
import com.cool.store.vo.*;
|
||||||
@@ -45,6 +46,8 @@ public class MiniDecorationController {
|
|||||||
private AssessmentTemplateService assessmentTemplateService;
|
private AssessmentTemplateService assessmentTemplateService;
|
||||||
@Resource
|
@Resource
|
||||||
private SeeAcceptanceService seeAcceptanceService;
|
private SeeAcceptanceService seeAcceptanceService;
|
||||||
|
@Resource
|
||||||
|
private DecorationMeasureService decorationMeasureService;
|
||||||
@ApiOperation("获取设计阶段子阶段信息")
|
@ApiOperation("获取设计阶段子阶段信息")
|
||||||
@GetMapping("/designSub")
|
@GetMapping("/designSub")
|
||||||
public ResponseResult<DesignInfoVo> getDesign(@RequestParam Long shopId){
|
public ResponseResult<DesignInfoVo> getDesign(@RequestParam Long shopId){
|
||||||
@@ -131,5 +134,9 @@ public class MiniDecorationController {
|
|||||||
return ResponseResult.success(decorationService.confirmDesign(request,CurrentUserHolder.getUser()));
|
return ResponseResult.success(decorationService.confirmDesign(request,CurrentUserHolder.getUser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询测量方案")
|
||||||
|
@GetMapping("/getDecorationMeasure")
|
||||||
|
public ResponseResult<DecorationMeasureVO> getDecorationMeasure(@RequestParam Long shopId){
|
||||||
|
return ResponseResult.success(decorationMeasureService.getDecorationMeasureByShopId(shopId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user