Commit e78a891a authored by 刘学辉's avatar 刘学辉

产品主数据接口调整

parent ecf47cc6
......@@ -265,7 +265,7 @@ public class NonProdApplyController extends CommonController {
SapNonProdApplyDept sapNonProdApplyDept=nonProdApplyDeptApplication.getNonProdApplyDeptByMatnr(prodApplyFromSapVO.getMatnr());
if (sapNonProdApplyDept!=null){
messageMap.put("Message_Status","E");
messageMap.put("Message_Text","物料编号"+prodApplyFromSapVO.getMatnr()+"已经存在!");
messageMap.put("Message_Text","产品编号"+prodApplyFromSapVO.getMatnr()+"已经存在!");
} else {
nonProdApplyApplication.saveProdApplyFromSapVO(prodApplyFromSapVO);
}
......
......@@ -93,21 +93,30 @@ public class ProdApplyFromSapVO {
/**
* 一般销售项次组
*/
@JsonProperty("MTPOS_MARA")
// @JsonProperty("MTPOS_MARA")
// private String mtposMara;
@JsonProperty("MTPOS")
private String mtposMara;
/**
* 汉语品名
*/
@JsonProperty("MAKTX")
private String maktx;
// @JsonProperty("MAKTX")
// private String maktx;
@JsonProperty("MAKTX_ZH")
private String maktx;
/**
* 汉语语言
*/
@JsonProperty("SPARS")
// @JsonProperty("SPARS")
//private String spars;
@JsonProperty("SPARS_ZH")
private String spars;
/**
* 英语品名
*/
......@@ -143,8 +152,9 @@ public class ProdApplyFromSapVO {
*/
@JsonProperty("MEINS")
private String meins;
@JsonProperty("meins_name")
private String meinsName;
// @JsonProperty("meins_name")
// private String meinsName;
/**
* 毛重
......@@ -365,12 +375,26 @@ public class ProdApplyFromSapVO {
@JsonProperty("UMREN_PURCH")
private String umrenPurch;
/**
* 转换分母(采购)
*/
@JsonProperty("UMREN_PUR")
private String umrenPur;
/**
* 转换分子(采购)
*/
@JsonProperty("UMREZ_PURCH")
private String umrezPurch;
/**
* 转换分子(采购)
*/
@JsonProperty("UMREZ_PUR")
private String umrezPur;
/**
* 默认采购组
*/
......@@ -449,6 +473,9 @@ public class ProdApplyFromSapVO {
@JsonProperty("MABST")
private String mabst;
/**
* 设入值
*/
......@@ -472,6 +499,7 @@ public class ProdApplyFromSapVO {
*/
@JsonProperty("LGPRO")
private String lgpro;
@JsonProperty("lgpro_name")
private String lgproName;
......@@ -567,6 +595,7 @@ public class ProdApplyFromSapVO {
*/
@JsonProperty("AUSME")
private String ausme;
@JsonProperty("ausme_name")
private String ausmeName;
......@@ -848,4 +877,82 @@ public class ProdApplyFromSapVO {
@JsonProperty("ekgrp_name")
private String ekgrpName;
//采购组织 ---------
@JsonProperty("EKORG")
private String ekorg;
//最大存储期间 数字 ---------
@JsonProperty("MAXLZ")
private String maxlz;
//最大存储期间 单位 ---------
@JsonProperty("LZEIH")
private String lzeih;
//---最小订购量 ------
@JsonProperty("AUMNG")
private String aumng;
//---最小交货量 ------
@JsonProperty("LFMNG")
private String lfmng;
//---用于出口的国家 ------
@JsonProperty("HERKL")
private String herkl;
//---用于出口的原产地------
@JsonProperty("HERKR")
private String herkr;
//---消耗模式------
@JsonProperty("VRMOD")
private String vrmod;
//---消耗期间 逆向------
@JsonProperty("VINT1")
private String vint1;
//---消耗期间 向前-----
@JsonProperty("VINT2")
private String vint2;
//---消耗期间 向前-----
@JsonProperty("MISKZ")
private String miskz;
/**
* 转换为基本计量单位的分母 -----
*/
@JsonProperty("UMREN_SEND")
private String umrenSend;
/**
* 转换为基本计量单位的分子-----
*/
@JsonProperty("UMREZ_SEND")
private String umrezSend;
/**
* 最大仓位数量-----
*/
@JsonProperty("LPMAX")
private String lpmax;
/**
* 最小仓位数量-----
*/
@JsonProperty("LPMIN")
private String lpmin;
//旧物料号-----
@JsonProperty("BISMT")
private String bismt;
//成交额回扣组 BONUS
//佣金组 PROVG
//期间标识 PERKZ
//生产主管 FEVOR
//过期日期 SLED_BBD
// 关于销售订单库存的评估类别 EKLAS
}
......@@ -122,7 +122,14 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
this.suppliersPayRepository.save(modifyPay);
} else {
pay.setSId(suppliersInfo.getId());
this.suppliersPayRepository.save(pay);
if (StringUtil.isBlank(pay.getId())) {
this.suppliersPayRepository.save(pay);
} else {
SuppliersPay suppliersPay=suppliersPayRepository.findOne(pay.getId());
ClassHelper.copyProperties(pay, suppliersPay);
this.suppliersPayRepository.saveAndFlush(suppliersPay);
}
}
}
......@@ -139,8 +146,14 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
this.suppliersBuyerRepository.save(modifyBuyer);
} else {
buyer.setSId(suppliersInfo.getId());
this.suppliersBuyerRepository.save(buyer);
}
if (StringUtil.isBlank(buyer.getId())) {
this.suppliersBuyerRepository.save(buyer);
} else {
SuppliersBuyer suppliersBuyer=suppliersBuyerRepository.findOne(buyer.getId());
ClassHelper.copyProperties(buyer, suppliersBuyer);
this.suppliersBuyerRepository.saveAndFlush(suppliersBuyer);
}
}
}
for (SuppliersBank bank : suppliersBankList) {
......@@ -155,8 +168,16 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
modifyBank.setSId(suppliersInfo.getId());
this.suppliersBankRepository.save(modifyBank);
} else {
// bank.setSId(suppliersInfo.getId());
// this.suppliersBankRepository.save(bank);
bank.setSId(suppliersInfo.getId());
this.suppliersBankRepository.save(bank);
if (StringUtil.isBlank(bank.getId())) {
this.suppliersBankRepository.save(bank);
} else {
SuppliersBank suppliersBank=suppliersBankRepository.findOne(bank.getId());
ClassHelper.copyProperties(bank, suppliersBank);
this.suppliersBankRepository.saveAndFlush(suppliersBank);
}
}
}
......@@ -226,7 +247,7 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
}
@Transactional
private void updateStatus(String bizId, BizBillStatus status) {
protected void updateStatus(String bizId, BizBillStatus status) {
Assert.hasText(bizId, CommonDomainConstants.ID_NOT_BLANK);
this.commonDomainService.updateStatus(SuppliersInfo.class, bizId, status.getId());
}
......
......@@ -68,6 +68,7 @@ public class SuppliersDataController extends CommonController {
SDO sdo = this.getSDO();
String bizId=sdo.getString("bizId");
SuppliersInfo suppliersInfo = new SuppliersInfo();
suppliersInfo.setApplyType("0");
String isDel=sdo.getString("isDel");
if (StringUtil.isNotBlank(isDel)){ //删除流程
suppliersInfo = suppliersDataApplication.loadSuppliersDataById(bizId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment