|
|
|
@ -12,6 +12,8 @@ import com.glxp.api.annotation.AuthRuleAnnotation;
|
|
|
|
|
import com.glxp.api.common.enums.ResultEnum;
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.entity.basic.UdiProductEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SystemParamConfigEntity;
|
|
|
|
|
import com.glxp.api.entity.thrsys.ThrProductsEntity;
|
|
|
|
|
import com.glxp.api.entity.thrsys.ThrSystemDetailEntity;
|
|
|
|
|
import com.glxp.api.http.ErpBasicClient;
|
|
|
|
@ -22,6 +24,8 @@ import com.glxp.api.req.thrsys.ThrOnhandRequest;
|
|
|
|
|
import com.glxp.api.res.PageSimpleResponse;
|
|
|
|
|
import com.glxp.api.res.thrsys.ThrProductsResponse;
|
|
|
|
|
import com.glxp.api.service.auth.CustomerService;
|
|
|
|
|
import com.glxp.api.service.basic.UdiProductService;
|
|
|
|
|
import com.glxp.api.service.system.SystemParamConfigService;
|
|
|
|
|
import com.glxp.api.service.thrsys.ThrProductsService;
|
|
|
|
|
import com.glxp.api.service.thrsys.ThrSystemDetailService;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
@ -176,6 +180,11 @@ public class ThrProductsController {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
SystemParamConfigService systemParamConfigService;
|
|
|
|
|
@Resource
|
|
|
|
|
UdiProductService udiProductService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 编辑第三方产品信息
|
|
|
|
|
*
|
|
|
|
@ -189,6 +198,39 @@ public class ThrProductsController {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
|
|
|
|
thrProductsEntity.setUpdateTime(new Date());
|
|
|
|
|
thrProductsService.updateById(thrProductsEntity);
|
|
|
|
|
String value = systemParamConfigService.selectValueByParamKey("enable_edit_third");
|
|
|
|
|
if (StrUtil.isNotEmpty(value) && value.equals("1")) {
|
|
|
|
|
UdiProductEntity udiProductEntity = udiProductService.findByNameCode(thrProductsEntity.getCode());
|
|
|
|
|
if (StrUtil.isNotEmpty(thrProductsEntity.getMeasname()))
|
|
|
|
|
udiProductEntity.setMeasname(thrProductsEntity.getMeasname());
|
|
|
|
|
if (StrUtil.isNotEmpty(thrProductsEntity.getSpec()))
|
|
|
|
|
udiProductEntity.setGgxh(thrProductsEntity.getSpec());
|
|
|
|
|
if (StrUtil.isNotEmpty(thrProductsEntity.getRegisterNo()))
|
|
|
|
|
udiProductEntity.setZczbhhzbapzbh(thrProductsEntity.getRegisterNo());
|
|
|
|
|
if (StrUtil.isNotEmpty(thrProductsEntity.getManufactory()))
|
|
|
|
|
udiProductEntity.setManufactory(thrProductsEntity.getManufactory());
|
|
|
|
|
if (StrUtil.isNotEmpty(thrProductsEntity.getCplb()))
|
|
|
|
|
udiProductEntity.setCplb(thrProductsEntity.getCplb());
|
|
|
|
|
if (StrUtil.isNotEmpty(thrProductsEntity.getFlbm()))
|
|
|
|
|
udiProductEntity.setFlbm(thrProductsEntity.getFlbm());
|
|
|
|
|
if (StrUtil.isNotEmpty(thrProductsEntity.getQxlb()))
|
|
|
|
|
udiProductEntity.setQxlb(thrProductsEntity.getQxlb());
|
|
|
|
|
if (StrUtil.isNotEmpty(thrProductsEntity.getYbbm()))
|
|
|
|
|
udiProductEntity.setYbbm(thrProductsEntity.getYbbm());
|
|
|
|
|
if (StrUtil.isNotEmpty(thrProductsEntity.getSptm()))
|
|
|
|
|
udiProductEntity.setSptm(thrProductsEntity.getSptm());
|
|
|
|
|
if (StrUtil.isNotEmpty(thrProductsEntity.getTyshxydm()))
|
|
|
|
|
udiProductEntity.setTyshxydm(thrProductsEntity.getTyshxydm());
|
|
|
|
|
if (StrUtil.isNotEmpty(thrProductsEntity.getZczbhhzbapzbh()))
|
|
|
|
|
udiProductEntity.setZczbhhzbapzbh(thrProductsEntity.getZczbhhzbapzbh());
|
|
|
|
|
if (StrUtil.isNotEmpty(thrProductsEntity.getYlqxzcrbarmc()))
|
|
|
|
|
udiProductEntity.setYlqxzcrbarmc(thrProductsEntity.getYlqxzcrbarmc());
|
|
|
|
|
if (StrUtil.isNotEmpty(thrProductsEntity.getCpms()))
|
|
|
|
|
udiProductEntity.setCpms(thrProductsEntity.getCpms());
|
|
|
|
|
if (StrUtil.isNotEmpty(thrProductsEntity.getStandard()))
|
|
|
|
|
udiProductEntity.setGgxh(thrProductsEntity.getStandard());
|
|
|
|
|
udiProductService.updateUdiInfo(udiProductEntity);
|
|
|
|
|
}
|
|
|
|
|
return ResultVOUtils.success("修改成功!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|