产品信息编辑问题

zhairh
anthonywj 2 years ago
parent b72ca9e07d
commit 2831601d9d

@ -13,6 +13,8 @@ import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
import com.glxp.api.admin.httpclient.UdiDlHttpClient;
import com.glxp.api.admin.req.basic.CombineRequest;
import com.glxp.api.admin.req.basic.RemoveRelRequest;
import com.glxp.api.admin.req.basic.UdiInfoRequest;
import com.glxp.api.admin.req.basic.UdiRelevanceRequest;
import com.glxp.api.admin.req.receipt.ProductInfoFilterRequest;
import com.glxp.api.admin.req.thrsys.FilterThrProductsRequest;
import com.glxp.api.admin.res.PageSimpleResponse;
@ -117,18 +119,23 @@ public class UdiContrastController {
}
List<UdiInfoEntity> udiInfoEntities = udiDlHttpClient.getUdiByUuid(combineRequest.getKeys().get(0));
udiInfoService.deleteByUuid(udiRelevanceEntity.getUuid());
// udiInfoService.deleteByUuid(udiRelevanceEntity.getUuid());
for (UdiInfoEntity udiInfoEntity : udiInfoEntities) {
udiInfoEntity.setUuid(udiRelevanceEntity.getUuid());
udiInfoEntity.setProductType(ConstantStatus.PRODUCT_TYPE_UDI);
UdiInfoUtil.initUdiInfoEntity(udiInfoEntity);
UdiInfoRequest udiInfoReqeust = new UdiInfoRequest();
BeanUtils.copyProperties(udiInfoEntity, udiInfoReqeust);
udiInfoService.updateUdiInfo(udiInfoReqeust);
}
udiInfoService.insertUdiInfos(UdiInfoUtil.initUdiInfoEntitys(udiInfoEntities));
// udiRelevanceEntity.setUuid(udiInfoEntities.get(0).getUuid());
// udiInfoService.insertUdiInfos(UdiInfoUtil.initUdiInfoEntitys(udiInfoEntities));
udiRelevanceEntity.setUuid(udiInfoEntities.get(0).getUuid());
String time = DateUtil.formatDateTime(new Date());
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
UdiRelevanceRequest udiRelevanceRequest = new UdiRelevanceRequest();
BeanUtils.copyProperties(udiRelevanceEntity, udiRelevanceRequest);
udiRelevanceService.updateUdiRelevance(udiRelevanceRequest);
return ResultVOUtils.success("切换成功!");
}
@ -149,13 +156,14 @@ public class UdiContrastController {
udiRelevanceEntity.setPrice(combineRequest.getPrice());
udiRelevanceEntity.setSptm(combineRequest.getSptm());
udiRelevanceEntity.setYbbm(combineRequest.getYbbm());
UdiRelevanceEntity temp = udiContrastService.findById(udiRelevanceEntity.getId());
if (udiContrastService.isExit(temp.getOriginUuid(), udiRelevanceEntity.getMainId(), combineRequest.getThirdSys())) {
return ResultVOUtils.error(500, "已存在相同的对照关系,对照失败!");
} else {
try {
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
UdiRelevanceRequest udiRelevanceRequest = new UdiRelevanceRequest();
BeanUtils.copyProperties(udiRelevanceEntity, udiRelevanceRequest);
udiRelevanceService.updateUdiRelevance(udiRelevanceRequest);
} catch (Exception e) {
return ResultVOUtils.error(500, "已存在相同的对照关系,对照失败!");
}
@ -185,7 +193,7 @@ public class UdiContrastController {
udiRelevanceEntity.setThirdName("");
UdiRelevanceEntity temp = udiContrastService.findById(udiRelevanceEntity.getId());
if (udiContrastService.isExit(temp.getOriginUuid(), null, null)) {
return ResultVOUtils.error(500, "解除绑定失败");
return ResultVOUtils.error(500, "解除绑定失败,存在未关联第三方产品信息DI");
}
} else if (removeRelRequest.getThirdSys().equals("thirdId1")) {
udiRelevanceEntity.setThirdId1("");
@ -205,7 +213,11 @@ public class UdiContrastController {
combineRequest.setRelId(removeRelRequest.getRelId());
udiRelevanceEntity.setSupName("");
udiRelevanceEntity.setPrice("");
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
udiRelevanceEntity.setManufactory("");
udiRelevanceEntity.setMeasname("");
UdiRelevanceRequest udiRelevanceRequest = new UdiRelevanceRequest();
BeanUtils.copyProperties(udiRelevanceEntity, udiRelevanceRequest);
udiRelevanceService.updateUdiRelevance(udiRelevanceRequest);
} catch (Exception e) {
e.printStackTrace();
return ResultVOUtils.error(500, "解除绑定失败!");
@ -304,8 +316,8 @@ public class UdiContrastController {
udiRelevanceEntity.setUuid(CustomUtil.getUUId());
udiRelevanceEntity.setManufactory(thrProductsEntity.getManufactory());
udiRelevanceEntity.setSupName(combineRequest.getSupName());
udiRelevanceEntity.setPrice(thrProductsEntity.getPrice());
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceEntity.setPrice(thrProductsEntity.getPrice());
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
BeanUtils.copyProperties(thrProductsEntity, udiInfoEntity);
@ -323,7 +335,9 @@ public class UdiContrastController {
udiInfoEntity.setScbssfbhsxrq("是");
udiInfoEntity.setScbssfbhxlh("否");
udiInfoEntity = UdiInfoUtil.initUdiInfoEntity(udiInfoEntity);
udiInfoService.insertUdiInfo(udiInfoEntity);
UdiInfoRequest udiInfoRequest = new UdiInfoRequest();
BeanUtils.copyProperties(udiInfoEntity, udiInfoRequest);
udiInfoService.insertUdiInfo(udiInfoRequest);
}
public void updateDi(UdiRelevanceEntity udiRelevanceEntity, String key) {
@ -333,7 +347,9 @@ public class UdiContrastController {
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
UdiRelevanceRequest udiRelevanceRequest = new UdiRelevanceRequest();
BeanUtils.copyProperties(udiRelevanceEntity, udiRelevanceRequest);
udiRelevanceService.updateUdiRelevance(udiRelevanceRequest);
insertUdiInfos(udiInfoEntities);
}

@ -302,43 +302,48 @@ public class UdiRelevanceController {
if (udiRelevanceResponse.getPid() != null) {
udiRelevanceResponse.setId(udiRelevanceResponse.getPid());
}
UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
BeanUtils.copyProperties(udiRelevanceResponse, udiRelevanceEntity);
udiRelevanceEntity.setId(udiRelevanceResponse.getId() + "");
//更新关联表相关信息
UdiRelevanceRequest udiRelevanceRequest = new UdiRelevanceRequest();
BeanUtils.copyProperties(udiRelevanceResponse, udiRelevanceRequest);
udiRelevanceRequest.setId(udiRelevanceResponse.getId() + "");
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceRequest.setUpdateTime(time);
udiRelevanceRequest.setModifyTime(time);
if (udiRelevanceResponse.getIsUseDy() == 1) {
udiRelevanceEntity.setIsUseDy(true);
} else udiRelevanceEntity.setIsUseDy(false);
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
udiInfoEntity.setSptm(udiRelevanceResponse.getSptm());
udiInfoEntity.setYbbm(udiRelevanceResponse.getYbbm());
udiInfoEntity.setMeasname(udiRelevanceResponse.getMeasname());
udiInfoEntity.setManufactory(udiRelevanceResponse.getManufactory());
udiInfoEntity.setCpms(udiRelevanceResponse.getCpms());
udiInfoEntity.setPrice(udiRelevanceResponse.getPrice());
udiInfoEntity.setSpmc(udiRelevanceResponse.getSpmc());
udiInfoEntity.setZxxsbzbhsydysl(udiRelevanceResponse.getZxxsbzbhsydysl());
udiInfoEntity.setAllowNoBatch(udiRelevanceResponse.isAllowNoBatch());
udiInfoEntity.setAllowNoExpire(udiRelevanceResponse.isAllowNoExpire());
udiInfoEntity.setAllowNoProduct(udiRelevanceResponse.isAllowNoProduct());
udiInfoEntity.setBasicPrductRemak1(udiRelevanceResponse.getBasicPrductRemak1());
udiInfoEntity.setBasicPrductRemak2(udiRelevanceResponse.getBasicPrductRemak2());
udiInfoEntity.setBasicPrductRemak3(udiRelevanceResponse.getBasicPrductRemak3());
udiInfoEntity.setBasicPrductRemak4(udiRelevanceResponse.getBasicPrductRemak4());
udiInfoEntity.setBasicPrductRemak5(udiRelevanceResponse.getBasicPrductRemak5());
udiInfoEntity.setBasicPrductRemak6(udiRelevanceResponse.getBasicPrductRemak6());
udiInfoEntity.setBasicPrductRemak7(udiRelevanceResponse.getBasicPrductRemak7());
udiInfoEntity.setBasicPrductRemak8(udiRelevanceResponse.getBasicPrductRemak8());
udiRelevanceRequest.setIsUseDy(true);
} else udiRelevanceRequest.setIsUseDy(false);
udiRelevanceService.updateUdiRelevance(udiRelevanceRequest);
//更新产品信息表相关产品信息
UdiInfoRequest udiInfoRequest = new UdiInfoRequest();
udiInfoRequest.setNameCode(udiRelevanceResponse.getNameCode());
udiInfoRequest.setSptm(udiRelevanceResponse.getSptm());
udiInfoRequest.setYbbm(udiRelevanceResponse.getYbbm());
udiInfoRequest.setMeasname(udiRelevanceResponse.getMeasname());
udiInfoRequest.setManufactory(udiRelevanceResponse.getManufactory());
udiInfoRequest.setCpms(udiRelevanceResponse.getCpms());
// udiInfoRequest.setDiType(udiRelevanceResponse.getDiType());
udiInfoRequest.setPrice(udiRelevanceResponse.getPrice());
udiInfoRequest.setSpmc(udiRelevanceResponse.getSpmc());
udiInfoRequest.setAllowNoBatch(udiRelevanceResponse.isAllowNoBatch());
udiInfoRequest.setAllowNoExpire(udiRelevanceResponse.isAllowNoExpire());
udiInfoRequest.setAllowNoProduct(udiRelevanceResponse.isAllowNoProduct());
udiInfoRequest.setZxxsbzbhsydysl(udiRelevanceResponse.getZxxsbzbhsydysl());
udiInfoRequest.setBasicPrductRemak1(udiRelevanceResponse.getBasicPrductRemak1());
udiInfoRequest.setBasicPrductRemak2(udiRelevanceResponse.getBasicPrductRemak2());
udiInfoRequest.setBasicPrductRemak3(udiRelevanceResponse.getBasicPrductRemak3());
udiInfoRequest.setBasicPrductRemak4(udiRelevanceResponse.getBasicPrductRemak4());
udiInfoRequest.setBasicPrductRemak5(udiRelevanceResponse.getBasicPrductRemak5());
udiInfoRequest.setBasicPrductRemak6(udiRelevanceResponse.getBasicPrductRemak6());
udiInfoRequest.setBasicPrductRemak7(udiRelevanceResponse.getBasicPrductRemak7());
udiInfoRequest.setBasicPrductRemak8(udiRelevanceResponse.getBasicPrductRemak8());
if (StrUtil.isNotEmpty(udiRelevanceResponse.getOriginUuid())) {
udiInfoEntity.setProductType(ConstantStatus.PRODUCT_TYPE_UDI);
udiInfoRequest.setProductType(ConstantStatus.PRODUCT_TYPE_UDI);
}
udiInfoEntity.setUuid(udiRelevanceResponse.getUuid());
udiInfoService.updateUdiInfo(udiInfoEntity);
udiInfoRequest.setUuid(udiRelevanceResponse.getUuid());
udiInfoService.updateUdiInfo(udiInfoRequest);
return ResultVOUtils.success("更新成功");
}
@ -509,10 +514,11 @@ public class UdiRelevanceController {
} else {
udiRelevanceEntity.setUuid(postSmpUdiInfoRequest.getUuid());
}
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
UdiInfoRequest udiInfoEntity = new UdiInfoRequest();
udiInfoEntity.setYbbm(postSmpUdiInfoRequest.getYbbm());
udiInfoEntity.setSptm(postSmpUdiInfoRequest.getSptm());
BeanUtils.copyProperties(postSmpUdiInfoRequest, udiInfoEntity);
@ -696,23 +702,25 @@ public class UdiRelevanceController {
}
BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectMainThrSys();
ThrProductsEntity thrProductsEntity = thrDataService.getProducts(udiRelevanceEntity.getMainId(), basicThirdSysEntity.getThirdId());
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
BeanUtils.copyProperties(thrProductsEntity, udiInfoEntity);
udiInfoEntity.setNameCode(thrProductsEntity.getCode());
udiInfoEntity.setCpmctymc(thrProductsEntity.getName());
udiInfoEntity.setManufactory(thrProductsEntity.getManufactory());
udiInfoEntity.setYlqxzcrbarmc(thrProductsEntity.getManufactory());
udiInfoEntity.setGgxh(thrProductsEntity.getSpec());
udiInfoEntity.setZczbhhzbapzbh(thrProductsEntity.getRegisterNo());
udiInfoEntity.setUuid(CustomUtil.getUUId());
udiInfoEntity.setProductType(ConstantStatus.PRODUCT_TYPE_THIRD);
udiInfoEntity.setDiType(1);
udiInfoService.insertUdiInfo(udiInfoEntity);
udiRelevanceEntity.setUuid(udiInfoEntity.getUuid());
UdiInfoRequest UdiInfoRequest = new UdiInfoRequest();
BeanUtils.copyProperties(thrProductsEntity, UdiInfoRequest);
UdiInfoRequest.setNameCode(thrProductsEntity.getCode());
UdiInfoRequest.setCpmctymc(thrProductsEntity.getName());
UdiInfoRequest.setManufactory(thrProductsEntity.getManufactory());
UdiInfoRequest.setYlqxzcrbarmc(thrProductsEntity.getManufactory());
UdiInfoRequest.setGgxh(thrProductsEntity.getSpec());
UdiInfoRequest.setZczbhhzbapzbh(thrProductsEntity.getRegisterNo());
UdiInfoRequest.setUuid(CustomUtil.getUUId());
UdiInfoRequest.setProductType(ConstantStatus.PRODUCT_TYPE_THIRD);
UdiInfoRequest.setDiType(1);
udiInfoService.insertUdiInfo(UdiInfoRequest);
udiRelevanceEntity.setUuid(UdiInfoRequest.getUuid());
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
UdiRelevanceRequest udiRelevanceRequest = new UdiRelevanceRequest();
BeanUtils.copyProperties(udiRelevanceEntity, udiRelevanceRequest);
udiRelevanceService.updateUdiRelevance(udiRelevanceRequest);
return ResultVOUtils.success("解除绑定成功!");
}
@ -732,7 +740,9 @@ public class UdiRelevanceController {
UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
udiRelevanceEntity.setId(id);
udiRelevanceEntity.setLockStatus(lockUdiRequest.getLockStatus());
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
UdiRelevanceRequest udiRelevanceRequest = new UdiRelevanceRequest();
BeanUtils.copyProperties(udiRelevanceEntity, udiRelevanceRequest);
udiRelevanceService.updateUdiRelevance(udiRelevanceRequest);
}
return ResultVOUtils.success("更新成功!");
} else {

@ -2,6 +2,7 @@ package com.glxp.api.admin.dao.basic;
import com.glxp.api.admin.entity.basic.UdiInfoEntity;
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.api.admin.req.basic.UdiInfoRequest;
import com.glxp.api.admin.res.basic.UdiRelevanceResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -21,11 +22,11 @@ public interface UdiInfoDao {
UdiInfoEntity findById(@Param("id") String id);
boolean insertUdiInfo(UdiInfoEntity udiInfoEntity);
boolean insertUdiInfo(UdiInfoRequest udiInfoRequest);
boolean insertUdiInfos(@Param("udiInfoEntities") List<UdiInfoEntity> udiInfoEntities);
boolean updateUdiInfo(UdiInfoEntity udiInfoEntity);
boolean updateUdiInfo(UdiInfoRequest udiInfoEntity);
boolean deleteById(@Param("id") String id);
@ -59,5 +60,4 @@ public interface UdiInfoDao {
void updateUdiInfoByUuid(UdiInfoEntity udiInfoEntity);
}

@ -2,6 +2,7 @@ package com.glxp.api.admin.dao.basic;
import com.glxp.api.admin.entity.basic.UdiRelevanceEntity;
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.api.admin.req.basic.UdiRelevanceRequest;
import com.glxp.api.admin.res.basic.UdiRelevanceResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -40,7 +41,7 @@ public interface UdiRelevanceDao {
boolean insertUdiRelevanceignore(UdiRelevanceEntity udiRelevanceEntity);
boolean updateUdiRelevance(UdiRelevanceEntity udiRelevanceEntity);
boolean updateUdiRelevance(UdiRelevanceRequest udiRelevanceRequest);
boolean deleteById(@Param("id") String id);
@ -77,6 +78,7 @@ public interface UdiRelevanceDao {
/**
* UUID
*
* @param relId
* @return
*/

@ -35,38 +35,6 @@ public class UdiRelevanceEntity {
private String price;
private String modifyTime;//修改时间
private Boolean isCheck;
private boolean allowNoBatch;
private boolean allowNoExpire;
private boolean allowNoProduct;
//规格型号
private String ggxh;
//器械类别
private String qxlb;
//产品类别
private String cplb;
//分类编码
private String flbm;
//医疗器械注册人
private String ylqxzcrbarmc;
//注册人英文名称
private String ylqxzcrbarywmc;
//统一社会信用号
private String tyshxydm;
//注册证/备案号
private String zczbhhzbapzbh;
//产品描述
private String cpms;
private Boolean useMuti; //是否多次使用
private Integer useNum; //最小包装单元可使用次数
@ -76,4 +44,5 @@ public class UdiRelevanceEntity {
return 1;
return lockStatus;
}
}

@ -0,0 +1,83 @@
package com.glxp.api.admin.req.basic;
import lombok.Data;
@Data
public class UdiInfoRequest {
private Integer id;
private String nameCode;
private String packRatio;
private String packLevel;
private Integer bhxjsl;
private Integer bhzxxsbzsl;
private Integer zxxsbzbhsydysl;
private String bhxjcpbm;
private String sjcpbm; //
private String bzcj;
private String addType;
private String deviceRecordKey;
private String cpmctymc;
private String cplb;
private String flbm;
private String ggxh;
private String qxlb;
private String tyshxydm;
private String ylqxzcrbarmc;
private String zczbhhzbapzbh;
private String ylqxzcrbarywmc;
private String sydycpbs;
private String uuid;
private Integer versionNumber;
private Integer diType;
private String thirdId;
private String thirdName;
private String ybbm;
private String sptm;
private String manufactory;
private String measname;
private Integer productType;
private String scbssfbhph;
private String scbssfbhxlh;
private String scbssfbhscrq;
private String scbssfbhsxrq;
private String cpms;
private String spmc;
private String originUuid;
//本地生成信息
private String batchNo;
private String produceDate;
private String expireDate;
private String serialNo;
private String udi;
private String code;
private Integer count;
private String warehouseCode;
private String udplatCode;
private String relId;//关联ID主键
private Integer status;
private String supId;
private Boolean isCheck;
private boolean allowNoBatch;
private boolean allowNoExpire;
private boolean allowNoProduct;
private String price;
private String cplx;
private String hchzsb;
//产品代理商
private String cpdls;
private String basicPrductRemak1;
private String basicPrductRemak2;
private String basicPrductRemak3;
private String basicPrductRemak4;
private String basicPrductRemak5;
private String basicPrductRemak6;
private String basicPrductRemak7;
private String basicPrductRemak8;
}

@ -0,0 +1,42 @@
package com.glxp.api.admin.req.basic;
import lombok.Data;
@Data
public class UdiRelevanceRequest {
private String id;
private String thirdId;
private String thirdName;
private String uuid;
private Boolean isUseDy;
private String updateTime;
private String thirdId1;
private String thirdId2;
private String thirdId3;
private String thirdId4;
private String thirdName1;
private String thirdName2;
private String thirdName3;
private String thirdName4;
private String manufactory;
private String measname;
private String ybbm;
private String sptm;
private Boolean isDisable;
private Boolean isLock;
private String mainId;
private String mainName;
private Integer lockStatus;
private String udplatCode;
private Boolean isAdavence;
private String supName;
private String originUuid;
private String price;
private String modifyTime; //修改时间
private Boolean useMuti; //是否多次使用
private Integer useNum; //最小包装单元可使用次数
}

@ -10,6 +10,7 @@ import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
import com.glxp.api.admin.httpclient.UdiDlHttpClient;
import com.glxp.api.admin.req.basic.CombineRequest;
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.api.admin.req.basic.UdiInfoRequest;
import com.glxp.api.admin.req.thrsys.FilterThrProductsRequest;
import com.glxp.api.admin.service.thrsys.ThrProductsService;
import com.glxp.api.admin.util.CustomUtil;
@ -153,7 +154,7 @@ public class UdiContrastService {
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceEntity.setPrice(thrProductsEntity.getPrice());
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
UdiInfoRequest udiInfoEntity = new UdiInfoRequest();
BeanUtils.copyProperties(thrProductsEntity, udiInfoEntity);
udiInfoEntity.setNameCode(thrProductsEntity.getCode());
udiInfoEntity.setCpmctymc(thrProductsEntity.getName());

@ -3,6 +3,7 @@ package com.glxp.api.admin.service.basic;
import com.glxp.api.admin.entity.basic.UdiInfoEntity;
import com.glxp.api.admin.entity.basic.UdiRelevanceEntity;
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.api.admin.req.basic.UdiInfoRequest;
import com.glxp.api.admin.res.basic.UdiRelevanceResponse;
import org.apache.ibatis.annotations.Param;
@ -25,11 +26,11 @@ public interface UdiInfoService {
List<UdiInfoEntity> findByUuids(String uuid);
boolean insertUdiInfo(UdiInfoEntity udiInfoEntity);
boolean insertUdiInfo(UdiInfoRequest udiInfoRequest);
boolean insertUdiInfos(List<UdiInfoEntity> udiInfoEntities);
boolean updateUdiInfo(UdiInfoEntity udiInfoEntity);
boolean updateUdiInfo(UdiInfoRequest udiInfoRequest);
boolean deleteById(String id);

@ -2,6 +2,7 @@ package com.glxp.api.admin.service.basic;
import com.glxp.api.admin.entity.basic.UdiRelevanceEntity;
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.api.admin.req.basic.UdiRelevanceRequest;
import com.glxp.api.admin.res.basic.UdiRelevanceResponse;
import java.util.List;
@ -55,7 +56,7 @@ public interface UdiRelevanceService {
boolean insertUdiRelevanceignore(UdiRelevanceEntity udiRelevanceEntity);
boolean updateUdiRelevance(UdiRelevanceEntity udiRelevanceEntity);
boolean updateUdiRelevance(UdiRelevanceRequest udiRelevanceRequest);
boolean deleteById(String id);

@ -7,6 +7,7 @@ import com.glxp.api.admin.dao.thrsys.ThrProductsDao;
import com.glxp.api.admin.entity.basic.*;
import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
import com.glxp.api.admin.req.basic.FilterUdiIpLogRequest;
import com.glxp.api.admin.req.basic.UdiInfoRequest;
import com.glxp.api.admin.res.basic.UdiRelevanceExportJsonResponse;
import com.glxp.api.admin.service.basic.UdiInfoImportDetailService;
import com.glxp.api.admin.service.info.CompanyProductRelevanceService;
@ -14,6 +15,7 @@ import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.TransactionIsolationLevel;
import org.springframework.beans.BeanUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@ -85,8 +87,10 @@ public class UdiInfoImportDetailServiceImpl implements UdiInfoImportDetailServic
if (CollUtil.isNotEmpty(udiRelevanceExportJsonResponse.getUdiInfoEntities())) {
List<UdiInfoEntity> corpList = udiRelevanceExportJsonResponse.getUdiInfoEntities();
UdiInfoDao mapper = batchSession.getMapper(UdiInfoDao.class);
for (UdiInfoEntity basicUnitMaintainEntity : corpList) {
mapper.insertUdiInfo(basicUnitMaintainEntity);
for (UdiInfoEntity udiInfoEntity : corpList) {
UdiInfoRequest udiInfoRequest = new UdiInfoRequest();
BeanUtils.copyProperties(udiInfoEntity, udiInfoRequest);
mapper.insertUdiInfo(udiInfoRequest);
}
batchSession.commit();
}

@ -6,6 +6,7 @@ import com.github.pagehelper.PageHelper;
import com.glxp.api.admin.dao.basic.UdiInfoDao;
import com.glxp.api.admin.entity.basic.UdiInfoEntity;
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.api.admin.req.basic.UdiInfoRequest;
import com.glxp.api.admin.res.basic.UdiRelevanceResponse;
import com.glxp.api.admin.service.basic.UdiInfoService;
import com.glxp.api.admin.util.FilterUdiUtils;
@ -92,8 +93,8 @@ public class UdiInfoServiceImpl implements UdiInfoService {
}
@Override
public boolean insertUdiInfo(UdiInfoEntity udiInfoEntity) {
return udiInfoDao.insertUdiInfo(udiInfoEntity);
public boolean insertUdiInfo(UdiInfoRequest udiInfoRequest) {
return udiInfoDao.insertUdiInfo(udiInfoRequest);
}
@Override
@ -102,7 +103,7 @@ public class UdiInfoServiceImpl implements UdiInfoService {
}
@Override
public boolean updateUdiInfo(UdiInfoEntity udiInfoEntity) {
public boolean updateUdiInfo(UdiInfoRequest udiInfoEntity) {
if (StrUtil.isEmpty(udiInfoEntity.getUuid()))
return false;
return udiInfoDao.updateUdiInfo(udiInfoEntity);

@ -10,6 +10,7 @@ import com.glxp.api.admin.entity.basic.BasicThirdSysEntity;
import com.glxp.api.admin.entity.basic.UdiInfoEntity;
import com.glxp.api.admin.entity.basic.UdiRelevanceEntity;
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.api.admin.req.basic.UdiRelevanceRequest;
import com.glxp.api.admin.res.basic.UdiRelevanceResponse;
import com.glxp.api.admin.service.basic.BasicThirdSysService;
import com.glxp.api.admin.service.basic.UdiRelevanceService;
@ -278,30 +279,26 @@ public class UdiRelevanceServiceImpl implements UdiRelevanceService {
}
@Override
public boolean updateUdiRelevance(UdiRelevanceEntity udiRelevanceEntity) {
public boolean updateUdiRelevance(UdiRelevanceRequest udiRelevanceRequest) {
BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectMainThrSys();
String mainSys = basicThirdSysEntity.getThirdId();
if (mainSys.equals("thirdId")) {
udiRelevanceEntity.setMainId(udiRelevanceEntity.getThirdId());
udiRelevanceEntity.setMainName(udiRelevanceEntity.getThirdName());
udiRelevanceRequest.setMainId(udiRelevanceRequest.getThirdId());
udiRelevanceRequest.setMainName(udiRelevanceRequest.getThirdName());
} else if (mainSys.equals("thirdId1")) {
udiRelevanceEntity.setMainId(udiRelevanceEntity.getThirdId1());
udiRelevanceEntity.setMainName(udiRelevanceEntity.getThirdName1());
udiRelevanceRequest.setMainId(udiRelevanceRequest.getThirdId1());
udiRelevanceRequest.setMainName(udiRelevanceRequest.getThirdName1());
} else if (mainSys.equals("thirdId2")) {
udiRelevanceEntity.setMainId(udiRelevanceEntity.getThirdId2());
udiRelevanceEntity.setMainName(udiRelevanceEntity.getThirdName2());
udiRelevanceRequest.setMainId(udiRelevanceRequest.getThirdId2());
udiRelevanceRequest.setMainName(udiRelevanceRequest.getThirdName2());
} else if (mainSys.equals("thirdId3")) {
udiRelevanceEntity.setMainId(udiRelevanceEntity.getThirdId3());
udiRelevanceEntity.setMainName(udiRelevanceEntity.getThirdName3());
udiRelevanceRequest.setMainId(udiRelevanceRequest.getThirdId3());
udiRelevanceRequest.setMainName(udiRelevanceRequest.getThirdName3());
} else if (mainSys.equals("thirdId4")) {
udiRelevanceEntity.setMainId(udiRelevanceEntity.getThirdId4());
udiRelevanceEntity.setMainName(udiRelevanceEntity.getThirdName4());
udiRelevanceRequest.setMainId(udiRelevanceRequest.getThirdId4());
udiRelevanceRequest.setMainName(udiRelevanceRequest.getThirdName4());
}
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
BeanUtil.copyProperties(udiRelevanceEntity, udiInfoEntity);
udiInfoDao.updateUdiInfoByUuid(udiInfoEntity);
return udiRelevanceDao.updateUdiRelevance(udiRelevanceEntity);
return udiRelevanceDao.updateUdiRelevance(udiRelevanceRequest);
}
@Override

@ -8,6 +8,7 @@ import com.glxp.api.admin.entity.info.SystemParamConfigEntity;
import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
import com.glxp.api.admin.httpclient.ErpBasicClient;
import com.glxp.api.admin.req.basic.FilterErpGoodsRequest;
import com.glxp.api.admin.req.basic.UdiInfoRequest;
import com.glxp.api.admin.req.thrsys.FilterThrProductsRequest;
import com.glxp.api.admin.res.PageSimpleResponse;
import com.glxp.api.admin.res.basic.ErpProductsResponse;
@ -77,17 +78,13 @@ public class BasicBackUpdateProductService {
Map<String, ErpProductsResponse> erpProductsMap = new HashMap<>();
if (invmandocResponses != null && invmandocResponses.size() > 0) {
List<String> inventoryCodes = new ArrayList<>();
// if (filterErpGoodsRequest.getCode() != null) {
// inventoryCodes.add(filterErpGoodsRequest.getCode());
// erpProductsMap.put(filterErpGoodsRequest.getCode(), invmandocResponses.get(0));
// } else {
for (ErpProductsResponse invmandocResponse : invmandocResponses) {
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectByThirdId(invmandocResponse.getCode(), thirdSysId);
if (udiRelevanceEntity == null) {
inventoryCodes.add(invmandocResponse.getCode());
erpProductsMap.put(invmandocResponse.getCode(), invmandocResponse);
if (isUpdate.getParamValue().equals("1")) {//不根据库存信息过滤
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
UdiInfoRequest udiInfoEntity = new UdiInfoRequest();
udiInfoEntity.setNameCode(invmandocResponse.getCode());
udiInfoEntity.setCpmctymc(invmandocResponse.getName());
udiInfoEntity.setGgxh(invmandocResponse.getSpec());
@ -140,8 +137,8 @@ public class BasicBackUpdateProductService {
udiRelevanceEntity1.setThirdName(invmandocResponse.getName());
String time = DateUtil.getDateTime();
udiRelevanceEntity1.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceEntity1.setModifyTime(time);
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity1);
}
}
@ -151,31 +148,6 @@ public class BasicBackUpdateProductService {
//若需要对照库存信息
if (!isUpdate.getParamValue().equals("1")) {
// if (inventoryCodes.size() > 0) {
// ErpOnhandRequest erpOnhandRequest = new ErpOnhandRequest();
// erpOnhandRequest.setInventoryCodes(inventoryCodes);
// List<ErpInvProductResponse> erpOnHandResponses = new ErpInvClient().getInvPrdoduct(erpOnhandRequest, onHandUrl);
// if (erpOnHandResponses != null) {
// Map<String, List<ErpInvProductResponse>> map = erpOnHandResponses.stream().collect(Collectors.groupingBy(ErpInvProductResponse::getCode));
// for (List<ErpInvProductResponse> onHandResponses : map.values()) {
// if (onHandResponses != null && onHandResponses.size() > 0) {
// ErpInvProductResponse onhandQueryResponse = onHandResponses.get(0);
// if (isUpdate.getParamValue().equals("2")) {
// addRl(onhandQueryResponse, thirdSysId, erpProductsMap);
// } else if (isUpdate.getParamValue().equals("3")) {
// if (onhandQueryResponse.getCount() != null && onhandQueryResponse.getCount() > 0) {
// addRl(onhandQueryResponse, thirdSysId, erpProductsMap);
// }
// } else if (isUpdate.getParamValue().equals("4")) {
// if (onhandQueryResponse.getCount() == null || onhandQueryResponse.getCount() <= 0) {
// addRl(onhandQueryResponse, thirdSysId, erpProductsMap);
// }
// }
//
// }
// }
// }
// }
}
filterErpGoodsRequest.setPage(filterErpGoodsRequest.getPage() + 1);
@ -214,7 +186,7 @@ public class BasicBackUpdateProductService {
if (udiRelevanceEntity == null) {
if (isUpdate.getParamValue().equals("1")) {
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
UdiInfoRequest udiInfoEntity = new UdiInfoRequest();
udiInfoEntity.setNameCode(thrProductsEntity.getCode());
udiInfoEntity.setCpmctymc(thrProductsEntity.getName());
udiInfoEntity.setGgxh(thrProductsEntity.getSpec());
@ -265,7 +237,7 @@ public class BasicBackUpdateProductService {
udiRelevanceEntity1.setMainId(udiRelevanceEntity1.getThirdId4());
udiRelevanceEntity1.setMainName(udiRelevanceEntity1.getThirdName4());
}
udiRelevanceEntity1.setPrice(thrProductsEntity.getPrice());
udiRelevanceEntity1.setManufactory(thrProductsEntity.getManufactory());
udiRelevanceEntity1.setMeasname(thrProductsEntity.getMeasname());
udiRelevanceEntity1.setThirdId(thrProductsEntity.getCode());
@ -273,14 +245,13 @@ public class BasicBackUpdateProductService {
String time = DateUtil.getDateTime();
udiRelevanceEntity1.setUpdateTime(time);
udiRelevanceEntity1.setModifyTime(time);
udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevanceignore(udiRelevanceEntity1);
}
}
}
}
redisUtil.set("load_thrid_basic", "finish", 15 * 60);
}
}

@ -9,6 +9,8 @@ import com.glxp.api.admin.entity.info.SystemParamConfigEntity;
import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
import com.glxp.api.admin.httpclient.UdiDlHttpClient;
import com.glxp.api.admin.req.basic.FilterUdiIpLogRequest;
import com.glxp.api.admin.req.basic.UdiInfoRequest;
import com.glxp.api.admin.req.basic.UdiRelevanceRequest;
import com.glxp.api.admin.res.PageSimpleResponse;
import com.glxp.api.admin.res.basic.UdiRelevanceResponse;
import com.glxp.api.admin.service.basic.*;
@ -52,6 +54,7 @@ public class BasicUdiInfoImportService {
@Resource
GennerOrderUtils gennerOrderUtils;
//导入产品信息文件,生成产品信息,更新或插入对照表
@Async
public void importUdiInfo(String genKey) {
@ -62,31 +65,11 @@ public class BasicUdiInfoImportService {
filterUdiIpLogRequest.setGenKey(genKey);
List<UdiInfoImportDetailEntity> udiInfoImportEntities
= udiInfoImportService.filterUdiInfoImport(filterUdiIpLogRequest);
if (udiInfoImportEntities != null && udiInfoImportEntities.size() > 0) {
if (udiInfoImportEntities != null) {
for (UdiInfoImportDetailEntity udiInfoImportDetailEntity : udiInfoImportEntities) {
UdiInfoEntity udiInfoEntity = null;
//判断更新
BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectMainThrSys();
String mainSys = basicThirdSysEntity.getThirdId();
String mainId = null;
if (mainSys.equals("thirdId")) {
mainId = udiInfoImportDetailEntity.getThirdId();
} else if (mainSys.equals("thirdId1")) {
mainId = udiInfoImportDetailEntity.getThirdId1();
} else if (mainSys.equals("thirdId2")) {
mainId = udiInfoImportDetailEntity.getThirdId2();
} else if (mainSys.equals("thirdId3")) {
mainId = udiInfoImportDetailEntity.getThirdId3();
} else if (mainSys.equals("thirdId4")) {
mainId = udiInfoImportDetailEntity.getThirdId4();
}
//国家库获取取UDI信息
if (udiInfoImportDetailEntity.getUdiCode() != null
&& !udiInfoImportDetailEntity.getUdiCode().trim().isEmpty()
&& !udiInfoImportDetailEntity.getUdiCode().equals(mainId)
) {
if (udiInfoImportDetailEntity.getUdiCode() != null && !udiInfoImportDetailEntity.getUdiCode().trim().isEmpty()) {
udiInfoEntity = udiInfoService.findByNameCode(udiInfoImportDetailEntity.getUdiCode());
List<UdiInfoEntity> froms = null;
if (udiInfoEntity == null) {
@ -104,7 +87,21 @@ public class BasicUdiInfoImportService {
if (froms != null)
udiInfoService.insertUdiInfos(froms);
}
//判断更新
BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectMainThrSys();
String mainSys = basicThirdSysEntity.getThirdId();
String mainId = null;
if (mainSys.equals("thirdId")) {
mainId = udiInfoImportDetailEntity.getThirdId();
} else if (mainSys.equals("thirdId1")) {
mainId = udiInfoImportDetailEntity.getThirdId1();
} else if (mainSys.equals("thirdId2")) {
mainId = udiInfoImportDetailEntity.getThirdId2();
} else if (mainSys.equals("thirdId3")) {
mainId = udiInfoImportDetailEntity.getThirdId3();
} else if (mainSys.equals("thirdId4")) {
mainId = udiInfoImportDetailEntity.getThirdId4();
}
UdiRelevanceEntity udiRelevanceEntity = null;
if (udiInfoEntity == null) {
udiRelevanceEntity = udiRelevanceService.selectUpdateByThirdId(mainId); //更新
@ -116,11 +113,13 @@ public class BasicUdiInfoImportService {
udiInfoEntity.setGgxh(thrProductsEntity.getSpec());
udiInfoEntity.setUuid(CustomUtil.getUUId());
udiInfoEntity.setProductType(ConstantStatus.PRODUCT_TYPE_THIRD);
udiInfoEntity.setDiType(ConstantStatus.DI_TYPE_MAIN);
udiInfoEntity.setDiType(1);
udiInfoEntity.setManufactory(thrProductsEntity.getManufactory());
udiInfoEntity.setYlqxzcrbarmc(thrProductsEntity.getManufactory());
udiInfoEntity.setZczbhhzbapzbh(thrProductsEntity.getRegisterNo());
udiInfoService.insertUdiInfo(udiInfoEntity);
UdiInfoRequest udiInfoRequest=new UdiInfoRequest();
BeanUtils.copyProperties(udiInfoEntity, udiInfoRequest);
udiInfoService.insertUdiInfo(udiInfoRequest);
} else {
udiInfoImportDetailEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_CODE_FAIL);
@ -168,17 +167,12 @@ public class BasicUdiInfoImportService {
UdiRelevanceEntity temp = udiRelevanceService.selectUpteaByAll(udiInfoEntity.getUuid(), mainId);
if (temp != null) {
updateValue(temp, udiInfoImportDetailEntity, udiInfoImportLogEntity, mainId);
udiRelevanceService.updateUdiRelevance(temp);
UdiRelevanceRequest udiRelevanceRequest=new UdiRelevanceRequest();
BeanUtils.copyProperties(temp,udiRelevanceRequest);
udiRelevanceService.updateUdiRelevance(udiRelevanceRequest);
} else {
UdiRelevanceEntity mTemp = udiRelevanceService.selectUpdateByThirdId(mainId);
boolean isThird = false;
if (mTemp != null) {
UdiInfoEntity udiInfoEntity1 = udiInfoService.findByUuid(mTemp.getUuid());
if (udiInfoEntity1 != null && udiInfoEntity1.getProductType() != null && udiInfoEntity1.getProductType() == 1) {
isThird = true;
}
}
if (mTemp != null && !isThird) {
udiInfoImportDetailEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_CODE_FAIL);
udiInfoImportDetailEntity.setRemark("产品编码已存在关联不能重复插入!");
udiInfoImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
@ -205,19 +199,18 @@ public class BasicUdiInfoImportService {
}
}
//字段更新
udiInfoImportService.updateUdiInfoImport(udiInfoImportDetailEntity);
}
}
udiInfoImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
udiInfoImportLogService.updateImportLog(udiInfoImportLogEntity);
} else {
udiInfoImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
udiInfoImportLogService.updateImportLog(udiInfoImportLogEntity);
}
}
}
public void updateValue(UdiRelevanceEntity udiRelevanceEntity, UdiInfoImportDetailEntity udiInfoImportDetailEntity,
UdiInfoImportLogEntity udiInfoImportLogEntity, String mainId) {

@ -9,6 +9,7 @@ import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
import com.glxp.api.admin.httpclient.ErpInvClient;
import com.glxp.api.admin.req.basic.CombineRequest;
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.api.admin.req.basic.UdiInfoRequest;
import com.glxp.api.admin.req.inventory.ErpOnhandRequest;
import com.glxp.api.admin.req.thrsys.FilterThrInvProductsRequest;
import com.glxp.api.admin.req.thrsys.FilterThrProductsRequest;
@ -111,7 +112,7 @@ public class BasicUpdateProductService {
}
}
} else {
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
UdiInfoRequest udiInfoEntity = new UdiInfoRequest();
BeanUtils.copyProperties(thrProductsEntity, udiInfoEntity);
udiInfoEntity.setNameCode(thrProductsEntity.getCode());
udiInfoEntity.setCpmctymc(thrProductsEntity.getName());
@ -161,7 +162,7 @@ public class BasicUpdateProductService {
public void addRl(ErpInvProductResponse onhandQueryResponse, String
thirdSysId, Map<String, ErpProductsResponse> erpProductsMap) {
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
UdiInfoRequest udiInfoEntity = new UdiInfoRequest();
udiInfoEntity.setNameCode(onhandQueryResponse.getCode());
udiInfoEntity.setCpmctymc(onhandQueryResponse.getName());
udiInfoEntity.setGgxh(onhandQueryResponse.getSpec());

@ -33,6 +33,7 @@ import com.glxp.api.admin.entity.purchase.*;
import com.glxp.api.admin.entity.thrsys.*;
import com.glxp.api.admin.httpclient.SpGetHttpClient;
import com.glxp.api.admin.req.basic.BasicExportStatusRequest;
import com.glxp.api.admin.req.basic.UdiInfoRequest;
import com.glxp.api.admin.req.purchase.FilterCertSetsRequest;
import com.glxp.api.admin.req.sync.PostDownloadInfo;
import com.glxp.api.admin.res.basic.*;
@ -229,7 +230,9 @@ public class DlBasicService {
List<UdiInfoEntity> corpList = syncDataResponse.getUdiInfoEntities();
UdiInfoDao mapper = batchSession.getMapper(UdiInfoDao.class);
for (UdiInfoEntity udiInfoEntity : corpList) {
mapper.insertUdiInfo(udiInfoEntity);
UdiInfoRequest udiInfoRequest = new UdiInfoRequest();
BeanUtils.copyProperties(udiInfoEntity, udiInfoRequest);
mapper.insertUdiInfo(udiInfoRequest);
}
batchSession.commit();
remark.append("耗材字典:").append(syncDataResponse.getUdiInfoEntities().size()).append("条\n");

@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.entity.basic.UdiInfoEntity;
import com.glxp.api.admin.req.basic.UdiInfoRequest;
import java.util.List;
@ -42,5 +43,18 @@ public class UdiInfoUtil {
return udiInfoEntitys;
}
public static UdiInfoRequest initUdiInfoEntity(UdiInfoRequest udiInfoEntity) {
if (StrUtil.isNotEmpty(udiInfoEntity.getScbssfbhph()) && "否".equals(udiInfoEntity.getScbssfbhph())) {
udiInfoEntity.setAllowNoBatch(true);
}
if (StrUtil.isNotEmpty(udiInfoEntity.getScbssfbhscrq()) && "否".equals(udiInfoEntity.getScbssfbhscrq())) {
udiInfoEntity.setAllowNoProduct(true);
}
if (StrUtil.isNotEmpty(udiInfoEntity.getScbssfbhsxrq()) && "否".equals(udiInfoEntity.getScbssfbhsxrq())) {
udiInfoEntity.setAllowNoExpire(true);
}
return udiInfoEntity;
}
}

@ -127,7 +127,7 @@
nameCode = #{nameCode}) limit 1
</select>
<insert id="insertUdiInfo" keyProperty="id" parameterType="com.glxp.api.admin.entity.basic.UdiInfoEntity">
<insert id="insertUdiInfo" keyProperty="id" parameterType="com.glxp.api.admin.req.basic.UdiInfoRequest">
replace
INTO basic_products
(id,
@ -230,7 +230,7 @@
WHERE uuid = #{uuid}
</delete>
<update id="updateUdiInfo" parameterType="com.glxp.api.admin.entity.basic.UdiInfoEntity">
<update id="updateUdiInfo" parameterType="com.glxp.api.admin.req.basic.UdiInfoRequest">
UPDATE basic_products
<trim prefix="set" suffixOverrides=",">
<if test="packRatio != null">packRatio=#{packRatio},</if>
@ -268,6 +268,7 @@
<if test="allowNoBatch != null">allowNoBatch=#{allowNoBatch},</if>
<if test="allowNoExpire != null">allowNoExpire=#{allowNoExpire},</if>
<if test="allowNoProduct != null">allowNoProduct=#{allowNoProduct},</if>
<if test="spmc != null">spmc=#{spmc},</if>
<if test="cpdls != null">cpdls=#{cpdls},</if>
<if test="basicPrductRemak1 != null">basicPrductRemak1=#{basicPrductRemak1},</if>
<if test="basicPrductRemak2 != null">basicPrductRemak2=#{basicPrductRemak2},</if>
@ -277,9 +278,8 @@
<if test="basicPrductRemak6 != null">basicPrductRemak6=#{basicPrductRemak6},</if>
<if test="basicPrductRemak7 != null">basicPrductRemak7=#{basicPrductRemak7},</if>
<if test="basicPrductRemak8 != null">basicPrductRemak8=#{basicPrductRemak8},</if>
</trim>
WHERE uuid = #{uuid}
WHERE nameCode = #{nameCode}
</update>
<update id="updateUdiInfoByUuid" parameterType="com.glxp.api.admin.entity.basic.UdiInfoEntity">

@ -653,87 +653,33 @@
<update id="updateUdiRelevance" parameterType="com.glxp.api.admin.entity.basic.UdiRelevanceEntity">
UPDATE basic_udirel
<trim prefix="set" suffixOverrides=",">
<if test="thirdId != null">
thirdId=#{thirdId},
</if>
<if test="thirdName != null">
thirdName=#{thirdName},
</if>
<if test="uuid != null">
uuid=#{uuid},
</if>
<if test="isUseDy != null">
isUseDy=#{isUseDy},
</if>
<if test="thirdId1 != null">
thirdId1=#{thirdId1},
</if>
<if test="thirdId2 != null">
thirdId2=#{thirdId2},
</if>
<if test="thirdId3 != null">
thirdId3=#{thirdId3},
</if>
<if test="thirdId4 != null">
thirdId4=#{thirdId4},
</if>
<if test="thirdName1 != null">
thirdName1=#{thirdName1},
</if>
<if test="thirdName2 != null">
thirdName2=#{thirdName2},
</if>
<if test="thirdName3 != null">
thirdName3=#{thirdName3},
</if>
<if test="thirdName4 != null">
thirdName4=#{thirdName4},
</if>
<if test="manufactory != null">
manufactory=#{manufactory},
</if>
<if test="measname != null">
measname=#{measname},
</if>
<if test="ybbm != null">
ybbm=#{ybbm},
</if>
<if test="sptm != null">
sptm=#{sptm},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="modifyTime != null">
modifyTime=#{modifyTime},
</if>
<if test="isDisable != null">
isDisable=#{isDisable},
</if>
<if test="isLock != null">
isLock=#{isLock},
</if>
<if test="mainId != null">
mainId=#{mainId},
</if>
<if test="lockStatus != null">
lockStatus=#{lockStatus},
</if>
<if test="mainName != null">
mainName=#{mainName},
</if>
<if test="udplatCode != null">
udplatCode=#{udplatCode},
</if>
<if test="isAdavence != null">
isAdavence=#{isAdavence},
</if>
<if test="supName != null">
supName=#{supName},
</if>
<if test="price != null">
price=#{price},
</if>
<if test="thirdId != null">thirdId=#{thirdId},</if>
<if test="thirdName != null">thirdName=#{thirdName},</if>
<if test="uuid != null">uuid=#{uuid},</if>
<if test="isUseDy != null">isUseDy=#{isUseDy},</if>
<if test="thirdId1 != null">thirdId1=#{thirdId1},</if>
<if test="thirdId2 != null">thirdId2=#{thirdId2},</if>
<if test="thirdId3 != null">thirdId3=#{thirdId3},</if>
<if test="thirdId4 != null">thirdId4=#{thirdId4},</if>
<if test="thirdName1 != null">thirdName1=#{thirdName1},</if>
<if test="thirdName2 != null">thirdName2=#{thirdName2},</if>
<if test="thirdName3 != null">thirdName3=#{thirdName3},</if>
<if test="thirdName4 != null">thirdName4=#{thirdName4},</if>
<if test="manufactory != null">manufactory=#{manufactory},</if>
<if test="measname != null">measname=#{measname},</if>
<if test="ybbm != null">ybbm=#{ybbm},</if>
<if test="sptm != null">sptm=#{sptm},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="modifyTime != null">modifyTime=#{modifyTime},</if>
<if test="isDisable != null">isDisable=#{isDisable},</if>
<if test="isLock != null">isLock=#{isLock},</if>
<if test="mainId != null">mainId=#{mainId},</if>
<if test="lockStatus != null">lockStatus=#{lockStatus},</if>
<if test="mainName != null">mainName=#{mainName},</if>
<if test="udplatCode != null">udplatCode=#{udplatCode},</if>
<if test="isAdavence != null">isAdavence=#{isAdavence},</if>
<if test="supName != null">supName=#{supName},</if>
<if test="price != null">price=#{price},</if>
<if test="useNum != null">useNum=#{useNum},</if>
<if test="useMuti != null">useMuti=#{useMuti}</if>
</trim>

Loading…
Cancel
Save