bug修改

dev
anthonywj 2 years ago
parent d79a83de2d
commit 069069e32b

@ -249,7 +249,4 @@ public class PlatformController {
}
}

@ -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("修改成功!");
}

@ -31,10 +31,11 @@
AND corpType = #{corpType}
</if>
<if test="corpTypeList != null and corpTypeList.size() > 0">
AND corpType in
AND (corpType in
<foreach item="item" index="index" collection="corpTypeList" open="(" separator="," close=")">
#{item}
</foreach>
) and outType <![CDATA[ <> ]]> 1
</if>
<if test="outType != null">
AND (outType <![CDATA[ <> ]]> #{outType} or outType is NULL)

@ -511,3 +511,6 @@ CALL Pro_Temp_ColumnWork('basic_products', 'syqsfxyjxmj', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'mjfs', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'categoryName', 'varchar(255)', 1);
INSERT ignore INTO `sys_param_config`(`parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`, `paramType`,
`paramExplain`, `updateTime`)
VALUES (0, '是否允许编辑第三方产品信息', 'enable_edit_third', '1', 0, 0, '01', NULL);

Loading…
Cancel
Save