Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -1,8 +1,11 @@
|
|||||||
package com.zt.plat.module.contractorder.enums.contract;
|
package com.zt.plat.module.contractorder.enums.contract;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典枚举
|
* 字典枚举
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
public enum DictEnum {
|
public enum DictEnum {
|
||||||
|
|
||||||
/** ERP请求状态 */
|
/** ERP请求状态 */
|
||||||
@@ -60,19 +63,7 @@ public enum DictEnum {
|
|||||||
*/
|
*/
|
||||||
private final String remark;
|
private final String remark;
|
||||||
|
|
||||||
public String getLabel() {
|
public static DictEnum getByCodeAndType(String code, String dictType) {
|
||||||
return label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemark() {
|
|
||||||
return remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static DictEnum getByCode(String code, String dictType) {
|
|
||||||
return DictEnum.valueOf(dictType + "_" +code);
|
return DictEnum.valueOf(dictType + "_" +code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ public class ContractController implements BusinessControllerMarker {
|
|||||||
@PostMapping("/submit/erp")
|
@PostMapping("/submit/erp")
|
||||||
@Operation(summary = "提交ERP")
|
@Operation(summary = "提交ERP")
|
||||||
@PreAuthorize("@ss.hasPermission('base:contract:erp')")
|
@PreAuthorize("@ss.hasPermission('base:contract:erp')")
|
||||||
public CommonResult<Boolean> submitErp(@RequestBody List<Long> ids) {
|
public CommonResult<List<String>> submitErp(@RequestBody List<Long> ids) {
|
||||||
return success(contractService.submitErp(ids));
|
return success(contractService.submitErp(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public interface ContractService {
|
|||||||
* @param ids 合同ID集合
|
* @param ids 合同ID集合
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Boolean submitErp(List<Long> ids);
|
List<String> submitErp(List<Long> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除合同
|
* 删除合同
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -22,11 +22,17 @@ public class ErpSubmitReqDTO {
|
|||||||
* "sign": 签名,uuid+srcsys+密码,MD5 32位小写签名,密码另行约定
|
* "sign": 签名,uuid+srcsys+密码,MD5 32位小写签名,密码另行约定
|
||||||
* "req": {具体参数,参见RFC功能列表}
|
* "req": {具体参数,参见RFC功能列表}
|
||||||
*/
|
*/
|
||||||
|
@Schema(description = "接口编号,必须,参见RFC功能列表,可调用接口编号范围051-900")
|
||||||
private String funcnr;
|
private String funcnr;
|
||||||
|
@Schema(description = "调用系统业务单据编号,必须,在外部系统唯一,用于关联")
|
||||||
private String bskey;
|
private String bskey;
|
||||||
|
@Schema(description = "SAP系统ID, 必须")
|
||||||
private String usrid;
|
private String usrid;
|
||||||
|
@Schema(description = "源调用系统ID,必须")
|
||||||
private String usrnm;
|
private String usrnm;
|
||||||
private String sign;
|
// @Schema(description = "签名,uuid+srcsys+密码,MD5 32位小写签名,密码另行约定")
|
||||||
|
// private String sign;
|
||||||
|
@Schema(description = "具体参数,参见RFC功能列表")
|
||||||
private Map<String, Object> req;
|
private Map<String, Object> req;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,13 +159,13 @@ public class ErpProductiveVersionServiceImpl implements ErpProductiveVersionServ
|
|||||||
JSONObject dataJson = dataArray.getJSONObject(i);
|
JSONObject dataJson = dataArray.getJSONObject(i);
|
||||||
if (dataJson != null) {
|
if (dataJson != null) {
|
||||||
ErpProductiveVersionDO DO = new ErpProductiveVersionDO();
|
ErpProductiveVersionDO DO = new ErpProductiveVersionDO();
|
||||||
DO.setFactoryNumber(dataJson.getString("MATNR") != null ? dataJson.getString("MATNR").trim() : null);
|
DO.setFactoryNumber(dataJson.getString("WERKS") != null ? dataJson.getString("WERKS").trim() : null);
|
||||||
DO.setMaterialNumber(dataJson.getString("WERKS") != null ? dataJson.getString("WERKS").trim() : null);
|
DO.setMaterialNumber(dataJson.getString("MATNR") != null ? dataJson.getString("MATNR").trim() : null);
|
||||||
DO.setProductiveVersionNumber(dataJson.getString("VERID") != null ? dataJson.getString("VERID").trim() : null);
|
DO.setProductiveVersionNumber(dataJson.getString("VERID") != null ? dataJson.getString("VERID").trim() : null);
|
||||||
DO.setProductiveVersionName(dataJson.getString("TEXT1"));
|
DO.setProductiveVersionName(dataJson.getString("TEXT1"));
|
||||||
DO.setBomNumber(dataJson.getString("STLAL"));
|
DO.setBomNumber(dataJson.getString("STLAL"));
|
||||||
DO.setBlineGroup(dataJson.getString("PLNNR"));
|
DO.setBlineGroup(dataJson.getString("ALNAL"));
|
||||||
String alnalValue = dataJson.getString("ALNAL");
|
String alnalValue = dataJson.getString("PLNNR");
|
||||||
// 修复:增加对空字符串的判断
|
// 修复:增加对空字符串的判断
|
||||||
DO.setGroupCount(alnalValue != null && !alnalValue.trim().isEmpty() ? Long.valueOf(alnalValue.trim()) : null);
|
DO.setGroupCount(alnalValue != null && !alnalValue.trim().isEmpty() ? Long.valueOf(alnalValue.trim()) : null);
|
||||||
String number = dataJson.getString("MATNR").trim() + "-" + dataJson.getString("WERKS").trim() + "-" + dataJson.getString("VERID").trim();
|
String number = dataJson.getString("MATNR").trim() + "-" + dataJson.getString("WERKS").trim() + "-" + dataJson.getString("VERID").trim();
|
||||||
|
|||||||
@@ -107,9 +107,6 @@ public class ErpConfig {
|
|||||||
requestBody.put("bskey", reqDTO.getBskey());
|
requestBody.put("bskey", reqDTO.getBskey());
|
||||||
requestBody.put("usrid", reqDTO.getUsrid());
|
requestBody.put("usrid", reqDTO.getUsrid());
|
||||||
requestBody.put("usrnm", reqDTO.getUsrnm());
|
requestBody.put("usrnm", reqDTO.getUsrnm());
|
||||||
if (reqDTO.getSign() != null) {
|
|
||||||
requestBody.put("sign", reqDTO.getSign());
|
|
||||||
}
|
|
||||||
if (reqDTO.getReq() != null) {
|
if (reqDTO.getReq() != null) {
|
||||||
requestBody.put("req", reqDTO.getReq());
|
requestBody.put("req", reqDTO.getReq());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user