xucaiqin 1 månad sedan
förälder
incheckning
e159ee997e

+ 1 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/DictTypeEnum.java

@@ -54,6 +54,7 @@ public enum DictTypeEnum {
     SETTLEMENT_WAY(" settlement_way", "结算方式"),
     LOAD_UNLOAD_WAY("load_unload_way", "装卸方式"),
     DISPATCHING_TYPE("dispatching_type", "派车方式"),
+    GOODS_SPEC("goods_spec", "商品规格"),
     ;
 
     private final String type;

+ 5 - 2
sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsService.java

@@ -1044,14 +1044,16 @@ public class KwpGoodsService {
         List<EntCacheResDto> entList = remoteSystemService.queryEntCacheByIds(supplyEntIds);
         Map<Long, String> entMap = entList.stream().collect(Collectors.toMap(EntCacheResDto::getId, EntCacheResDto::getFirmName, (k1, k2) -> k1));
         Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(List.of(DictTypeEnum.PRODUCT_NAME_TYPE.getType(),
-                DictTypeEnum.UNIT_TYPE.getType()));
-        Map<String, String> productNameMap, unitMap;
+                DictTypeEnum.UNIT_TYPE.getType(), DictTypeEnum.GOODS_SPEC.getType()));
+        Map<String, String> productNameMap, unitMap,specMap;
         if (CollectionUtils.isNotEmpty(dict)) {
             productNameMap = dict.get(DictTypeEnum.PRODUCT_NAME_TYPE.getType());
             unitMap = dict.get(DictTypeEnum.UNIT_TYPE.getType());
+            specMap = dict.get(DictTypeEnum.GOODS_SPEC.getType());
         } else {
             productNameMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
             unitMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+            specMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
         }
         Long entId = LoginUserHolder.getEntId();
         list.forEach(e -> {
@@ -1060,6 +1062,7 @@ public class KwpGoodsService {
             List<KwpGoodsPriceRange> priceRanges = priceRangeMap.get(e.getId());
             materials.setGoodsTypeLabel(CollectionUtils.isNotEmpty(productNameMap) ? productNameMap.get(e.getGoodsType()) : null)
                     .setUnitLabel(CollectionUtils.isNotEmpty(unitMap) ? unitMap.get(e.getUnit()) : null)
+                    .setSpec(CollectionUtils.isNotEmpty(specMap) ? specMap.get(e.getSpec()) : null)
                     .setAddressName(Objects.isNull(address) ? null : address.getCityName())
                     .setDetailAddress(Objects.isNull(address) ? null : address.getDetailAddress())
                     .setPrice(CollectionUtils.isEmpty(priceRanges) ? null : priceRanges.get(0).getPrice())

+ 6 - 6
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsEnterpriseService.java

@@ -286,9 +286,9 @@ public class KwsEnterpriseService {
         if (StringUtils.isNotBlank(reqVo.getEntTypes())) {
             findPojoParam.setTypeList(Arrays.stream(reqVo.getEntTypes().split(Global.COMMA)).map(Integer::parseInt).toList());
         }
-        if(StrUtil.isNotEmpty(findPojoParam.getStartTime())&&StrUtil.isNotEmpty(findPojoParam.getEndTime())){
-            findPojoParam.setStartTime(findPojoParam.getStartTime()+" 00:00:00");
-            findPojoParam.setEndTime(findPojoParam.getEndTime()+" 23:59:59");
+        if (StrUtil.isNotEmpty(findPojoParam.getStartTime()) && StrUtil.isNotEmpty(findPojoParam.getEndTime())) {
+            findPojoParam.setStartTime(findPojoParam.getStartTime() + " 00:00:00");
+            findPojoParam.setEndTime(findPojoParam.getEndTime() + " 23:59:59");
         }
         return kwsEnterpriseDao.findPojoAndManager(findPojoParam, authEntIdList);
     }
@@ -545,7 +545,7 @@ public class KwsEnterpriseService {
             String loginEntStr = RedissonUtils.getString(Global.getFullUserEntKey(entId));
             LoginEntInfo loginEntInfo = StringUtils.isNotBlank(loginEntStr) ? JSON.parseObject(loginEntStr, LoginEntInfo.class) : null;
             if (Objects.nonNull(loginEntInfo)) {
-                loginEntInfo.setStatus(reqVo.getStatus());
+                loginEntInfo.setStatus(Global.NO);
                 RedissonUtils.putString(Global.getFullUserEntKey(entId), JSONObject.toJSONString(loginEntInfo), Global.PC_TOKEN_EXPIRE);
             }
         }
@@ -1511,8 +1511,8 @@ public class KwsEnterpriseService {
         Set<Long> entIds = kwsEnterprises.stream().map(BaseModel::getId).collect(Collectors.toSet());
 
         //查询父企业
-        List<KwsEnterprise> parentEnts  =kwsEnterpriseRepository.queryByParentEntIds(entIds);
-        if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(parentEnts)){
+        List<KwsEnterprise> parentEnts = kwsEnterpriseRepository.queryByParentEntIds(entIds);
+        if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(parentEnts)) {
             kwsEnterprises.addAll(parentEnts);
         }
         //根据类型进行过滤