2/8 新增加第三产品 修改1.0

Lhxyy
wangwei 2 months ago
parent cac43f532e
commit 5c955be0a5

@ -26,7 +26,7 @@ import com.glxp.mipsdl.entity.auth.AuthWarehouseEntity;
import com.glxp.mipsdl.entity.basic.BasicBussinessTypeEntity;
import com.glxp.mipsdl.entity.basic.BasicCorpEntity;
import com.glxp.mipsdl.entity.basic.BasicUdirelEntity;
import com.glxp.mipsdl.entity.ctqyy.MaterialDictEntity;
import com.glxp.mipsdl.entity.lhsyy.MaterialDictEntity;
import com.glxp.mipsdl.entity.inout.IoCodeEntity;
import com.glxp.mipsdl.entity.inout.IoOrderDetailBizEntity;
import com.glxp.mipsdl.entity.inout.IoOrderEntity;
@ -63,6 +63,7 @@ import org.dom4j.DocumentHelper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@ -400,37 +401,42 @@ public class LhzyyClient extends CommonHttpClient {
return ResultVOUtils.error(500, "提交产品列表不能为空!");
}
MaterialDictEntity materialDictEntity = new MaterialDictEntity();
if (StrUtil.isEmpty(udiRelevanceResponse.getMainId()))
materialDictEntity.setOperatType("1");
else
materialDictEntity.setOperatType("2");
materialDictEntity.setMaterialName(udiRelevanceResponse.getCpmctymc());
materialDictEntity.setCostlySign("1");
materialDictEntity.setYpspm(udiRelevanceResponse.getCpmctymc());
if (StrUtil.isNotEmpty(udiRelevanceResponse.getMainId()) && udiRelevanceResponse.getMainId().endsWith("x")) {
materialDictEntity.setMaterialMasterCode(null);
materialDictEntity.setHisMaterialCode(null);
materialDictEntity.setCostlySign("0");
materialDictEntity.setOperatType("1");
materialDictEntity.setMaterialCode(null);
} else {
materialDictEntity.setMaterialMasterCode(udiRelevanceResponse.getNameCode());
materialDictEntity.setHisMaterialCode(udiRelevanceResponse.getMainId());
materialDictEntity.setMaterialCode(udiRelevanceResponse.getNameCode());
}
materialDictEntity.setMaterialSpec(udiRelevanceResponse.getGgxh());
materialDictEntity.setMaterialUnit(udiRelevanceResponse.getMeasname());
//暂无区分进货价,零售价
materialDictEntity.setImportPrice(udiRelevanceResponse.getPrice() == null ? "0" : udiRelevanceResponse.getPrice().toString());
materialDictEntity.setRetailPrice(udiRelevanceResponse.getPrice() == null ? "0" : udiRelevanceResponse.getPrice().toString());
materialDictEntity.setFactoryName(udiRelevanceResponse.getManufactory());
materialDictEntity.setSupplierName(udiRelevanceResponse.getSupName());
materialDictEntity.setInsuranceCode(udiRelevanceResponse.getYbbm());
materialDictEntity.setRegeditNo(udiRelevanceResponse.getZczbhhzbapzbh());
materialDictEntity.setMaterialClass(udiRelevanceResponse.getBasicPrductRemak7());
//暂无中标标识
materialDictEntity.setPublicFlag("1");
materialDictEntity.setPriceItemClass(udiRelevanceResponse.getBasicPrductRemak8());
//暂无收费标志
materialDictEntity.setFeeFlag(udiRelevanceResponse.getBasicPrductRemak6());
materialDictEntity.setDlid(Integer.valueOf(udiRelevanceResponse.getBasicPrductRemak6()));
materialDictEntity.setFlid(Integer.valueOf(udiRelevanceResponse.getBasicPrductRemak1()));
materialDictEntity.setXlid(Integer.valueOf(udiRelevanceResponse.getBasicPrductRemak2()));
materialDictEntity.setCd(Integer.valueOf(udiRelevanceResponse.getBasicPrductRemak3()));
materialDictEntity.setGg(udiRelevanceResponse.getBasicPrductRemak4());
materialDictEntity.setXh(udiRelevanceResponse.getBasicPrductRemak5());
materialDictEntity.setDw(1);
materialDictEntity.setDw1(Integer.valueOf(udiRelevanceResponse.getBasicPrductRemak7()));
BigDecimal bigDecimal1 = new BigDecimal(udiRelevanceResponse.getBasicPrductRemak8());
BigDecimal scaledValue1 = bigDecimal1.setScale(3, BigDecimal.ROUND_HALF_UP);
materialDictEntity.setHsgx(scaledValue1);
materialDictEntity.setYbbm(udiRelevanceResponse.getYbbm());
materialDictEntity.setGjhcbm(udiRelevanceResponse.getYbbm());
BigDecimal bigDecimal = new BigDecimal(udiRelevanceResponse.getBasicPrductRemak10());
BigDecimal scaledValue = bigDecimal.setScale(3, BigDecimal.ROUND_HALF_UP);
materialDictEntity.setLsj(scaledValue);
materialDictEntity.setPfj(scaledValue);
materialDictEntity.setPzwh(udiRelevanceResponse.getZczbhhzbapzbh());
materialDictEntity.setGhdw(Integer.valueOf(udiRelevanceResponse.getBasicPrductRemak9()));
materialDictEntity.setHealthcode(udiRelevanceResponse.getBasicPrductRemak11());
materialDictEntity.setYbjsqr(udiRelevanceResponse.getBasicPrductRemak12());
if (udiRelevanceResponse.getIsStack()){
materialDictEntity.setSfzht(1);
}else {
materialDictEntity.setSfzht(0);
}
materialDictEntity.setSfybfw(Integer.valueOf(udiRelevanceResponse.getBasicPrductRemak13()));
LhzyyRequest lhzyyRequest = new LhzyyRequest();
lhzyyRequest.setMsgHeader(getMsgHeader("addMaterialDict"));
lhzyyRequest.setMsgBody(JSONUtil.toJsonStr(materialDictEntity));
@ -457,4 +463,5 @@ public class LhzyyClient extends CommonHttpClient {
}
}
}

@ -42,6 +42,7 @@ public class MaterialDictEntity {
private String xh;
private Integer dw;
/**
* ()
*/
@ -62,6 +63,9 @@ public class MaterialDictEntity {
*
*/
private BigDecimal lsj;
private BigDecimal pfj;
/**
@ -70,9 +74,9 @@ public class MaterialDictEntity {
private String pzwh;
/**
*
*
*/
private BigDecimal ghdw;
private Integer ghdw;
/**

@ -84,6 +84,11 @@ public class UdiRelevanceResponse {
private String basicPrductRemak6;
private String basicPrductRemak7;
private String basicPrductRemak8;
private String basicPrductRemak9;
private String basicPrductRemak10;
private String basicPrductRemak11;
private String basicPrductRemak12;
private String basicPrductRemak13;
private BigDecimal price;
private String PRId;
@ -134,6 +139,8 @@ public class UdiRelevanceResponse {
private String hslbName;
private Boolean isStack;
public int getBhzxxsbzsl() {
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {
return 1;

Loading…
Cancel
Save