|
|
|
@ -11,7 +11,6 @@ import com.dxhy.order.baseservice.annotation.SysLog; |
|
|
|
|
import com.dxhy.order.baseservice.module.base.service.BaseService; |
|
|
|
|
import com.dxhy.order.baseservice.module.commodity.constant.CommodityEnum; |
|
|
|
|
import com.dxhy.order.baseservice.module.commodity.model.CommodityCodeEntity; |
|
|
|
|
import com.dxhy.order.baseservice.module.commodity.model.CommodityCodeEnum; |
|
|
|
|
import com.dxhy.order.baseservice.module.commodity.model.CommodityExcel; |
|
|
|
|
import com.dxhy.order.baseservice.module.commodity.model.dto.QueryModifyLogDTO; |
|
|
|
|
import com.dxhy.order.baseservice.module.commodity.service.CommodityCodeModifyLogService; |
|
|
|
@ -21,6 +20,7 @@ import com.dxhy.order.baseservice.module.thirdservice.user.model.DeptEntity; |
|
|
|
|
import com.dxhy.order.baseservice.module.thirdservice.user.model.UserEntity; |
|
|
|
|
import com.dxhy.order.baseservice.module.thirdservice.user.service.UserInfoService; |
|
|
|
|
import com.dxhy.order.baseservice.openapi.protocol.qd.PageSpxxReq; |
|
|
|
|
import com.dxhy.order.baseservice.utils.BaseServiceBeanTransitionUtils; |
|
|
|
|
import com.dxhy.order.constant.*; |
|
|
|
|
import com.dxhy.order.model.CommodityCodeCheckQuery; |
|
|
|
|
import com.dxhy.order.model.CommodityTaxClassCodeReq; |
|
|
|
@ -120,7 +120,10 @@ public class CommodityController { |
|
|
|
|
return R.error(OrderInfoContentEnum.MORE_NSRSBH_ERROR); |
|
|
|
|
} |
|
|
|
|
String nsrsbh = xfshs[0]; |
|
|
|
|
|
|
|
|
|
String entId = commodityCodeEntity.getEntId(); |
|
|
|
|
if(StringUtils.isBlank(entId)){ |
|
|
|
|
return R.error(OrderInfoContentEnum.MORE_ENTID_ERROR); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
commodityCodeEntity.setXhfNsrsbh(nsrsbh); |
|
|
|
|
log.info("参数:{}", JsonUtils.getInstance().toJsonString(commodityCodeEntity)); |
|
|
|
@ -166,9 +169,8 @@ public class CommodityController { |
|
|
|
|
/** |
|
|
|
|
* 添加校验 |
|
|
|
|
*/ |
|
|
|
|
List<CommodityCodeEntity> commodityCodeEntityList = new ArrayList<>(); |
|
|
|
|
commodityCodeEntityList.add(commodityCodeEntity); |
|
|
|
|
List<Map<String, String>> maps = verifyCommodityCodeService.checkCommodityParams(commodityCodeEntityList, type, 0); |
|
|
|
|
List<CommodityCodeEntity> commodityCodeEntities = Arrays.asList(commodityCodeEntity); |
|
|
|
|
List<Map<String, String>> maps = verifyCommodityCodeService.checkCommodityParams(commodityCodeEntities, type, 0); |
|
|
|
|
if (ObjectUtil.isNotEmpty(maps)) { |
|
|
|
|
return R.error().put(OrderManagementConstant.DATA, maps); |
|
|
|
|
} |
|
|
|
@ -335,12 +337,12 @@ public class CommodityController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 同步集团税编接口 |
|
|
|
|
* 同步集团税编接口,接口放弃如果需要启用则入库逻辑需要修改 |
|
|
|
|
* |
|
|
|
|
* @date: Created on 2018年7月25日 下午3:30:28 |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value = "同步集团税编接口", notes = "商品信息管理-同步集团税编接口") |
|
|
|
|
@PostMapping("/syncGroupTaxClassCode") |
|
|
|
|
//@PostMapping("/syncGroupTaxClassCode")
|
|
|
|
|
@SysLog(operation = "同步集团税编接口", operationDesc = "同步集团税编接口", key = "同步集团税编接口") |
|
|
|
|
public R syncGroupTaxClassCode(@RequestBody() CommodityTaxClassCodeReq groupTaxList) { |
|
|
|
|
log.info("同步集团税编接口,入参:{}", groupTaxList); |
|
|
|
@ -411,8 +413,9 @@ public class CommodityController { |
|
|
|
|
@ApiParam(name = "entId", value = "数据组织Id", required = false) @RequestParam(value = "entId", required = false) String entId, |
|
|
|
|
@ApiParam(name = "userId", value = "用户ID", required = true) @RequestParam(value = "userId") String userId) throws Exception { |
|
|
|
|
log.info("商品模板导入"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isBlank(entId)||StringUtils.isBlank(userId)){ |
|
|
|
|
return R.error("请求参数有误"); |
|
|
|
|
} |
|
|
|
|
Map<String, String> headToProperty = new HashMap<>(10); |
|
|
|
|
|
|
|
|
|
for (CommodityEnum flowStatus : CommodityEnum.values()) { |
|
|
|
@ -472,7 +475,7 @@ public class CommodityController { |
|
|
|
|
* @param commodityExcelList |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
public List<CommodityCodeEntity> transCommodityCodeEntityList(List<CommodityExcel> commodityExcelList,String xhfNsrsbh,String xhfMc, String userId, String deptId) { |
|
|
|
|
public List<CommodityCodeEntity> transCommodityCodeEntityList(List<CommodityExcel> commodityExcelList,String xhfNsrsbh,String xhfMc, String userId, String entId) { |
|
|
|
|
List<CommodityCodeEntity> commodityCodeEntityList = new ArrayList<>(); |
|
|
|
|
if (ObjectUtil.isNotEmpty(commodityExcelList)) { |
|
|
|
|
for (CommodityExcel commodityExcel : commodityExcelList) { |
|
|
|
@ -495,7 +498,9 @@ public class CommodityController { |
|
|
|
|
sl = CommonUtils.formatSl(sl); |
|
|
|
|
} |
|
|
|
|
commodityCodeEntity.setSl(sl); |
|
|
|
|
commodityCodeEntity.setGgxh(commodityExcel.getGgxh()); |
|
|
|
|
|
|
|
|
|
String ggxh = BaseServiceBeanTransitionUtils.ggxhTransition(commodityExcel.getGgxh()); |
|
|
|
|
commodityCodeEntity.setGgxh(ggxh); |
|
|
|
|
commodityCodeEntity.setXmdw(StringUtils.isEmpty(commodityExcel.getDw()) ? "" : commodityExcel.getDw()); |
|
|
|
|
commodityCodeEntity.setXmdj(StringUtils.isEmpty(commodityExcel.getDj()) ? "" : commodityExcel.getDj()); |
|
|
|
|
commodityCodeEntity.setHsbz(commodityExcel.getHsbz()); |
|
|
|
@ -519,10 +524,10 @@ public class CommodityController { |
|
|
|
|
commodityCodeEntity.setSpjc(commodityExcel.getSpjc()); |
|
|
|
|
commodityCodeEntity.setBz(commodityExcel.getBz()); |
|
|
|
|
commodityCodeEntity.setCollectIdent(""); |
|
|
|
|
commodityCodeEntity.setCpy(""); |
|
|
|
|
commodityCodeEntity.setJdc(""); |
|
|
|
|
commodityCodeEntity.setCpy(ConfigureConstant.STRING_N); |
|
|
|
|
commodityCodeEntity.setJdc(ConfigureConstant.STRING_N); |
|
|
|
|
commodityCodeEntity.setBmbBbh(""); |
|
|
|
|
commodityCodeEntity.setEntId(deptId); |
|
|
|
|
commodityCodeEntity.setEntId(entId); |
|
|
|
|
commodityCodeEntity.setUserId(userId); |
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(commodityCodeEntity.getHsbz())) { |
|
|
|
|