|
@@ -514,20 +514,20 @@ public class YongyouServiceImpl implements YongyouService {
|
|
|
puAppMain.setCdefine11(vo.getRemark());
|
|
|
puAppMain.setCmaker(vo.getCreatedUserName());
|
|
|
puAppMain.setDdate(DateUtils.dateToString(vo.getCreatedTime()));
|
|
|
- puAppMain.setCptcode(DictCache.getLabelByValue("LONG_YAN_PURCHASE_TYPE",vo.getType()));
|
|
|
+ puAppMain.setCptcode(vo.getCptcode());
|
|
|
List<PuAppDetail> puAppDetails = new ArrayList<>();
|
|
|
for (LongYanPurchaseDetailVO orderVO:detailVOS){
|
|
|
PuAppDetail detail = new PuAppDetail();
|
|
|
detail.setCinvcode(orderVO.getNo());
|
|
|
- detail.setIpertaxrate("0");
|
|
|
+// detail.setIpertaxrate("0");
|
|
|
detail.setFquantity(orderVO.getNum().intValue());
|
|
|
- detail.setDrequirdate(DateUtils.dateToString(LocalDateTime.now()));
|
|
|
-// detail.setDrequirdate("需求日期");
|
|
|
- detail.setDarrivedate(DateUtils.dateToString(LocalDateTime.now()));
|
|
|
-// detail.setDarrivedate("计划到货日期");
|
|
|
- detail.setCexch_name("人名币");
|
|
|
- detail.setIexchrate("1");
|
|
|
- detail.setIvouchrowno("行号");
|
|
|
+// detail.setDrequirdate(DateUtils.dateToString(LocalDateTime.now()));
|
|
|
+// detail.setDarrivedate(DateUtils.dateToString(LocalDateTime.now()));
|
|
|
+ detail.setDrequirdate(vo.getNeedDate().toString());
|
|
|
+ detail.setDarrivedate(vo.getPlanGetDate().toString());
|
|
|
+// detail.setCexch_name("人名币");
|
|
|
+// detail.setIexchrate("1");
|
|
|
+// detail.setIvouchrowno("136345431");
|
|
|
puAppDetails.add(detail);
|
|
|
}
|
|
|
PuAppVouch puAppVouch = new PuAppVouch();
|
|
@@ -545,11 +545,11 @@ public class YongyouServiceImpl implements YongyouService {
|
|
|
PushPurchaseOrderResponse response = JsonUtils.jsonToModel(responseStr,PushPurchaseOrderResponse.class);
|
|
|
LongYanPurchaseOrder order = new LongYanPurchaseOrder();
|
|
|
order.setId(id);
|
|
|
- if (response.getErrcode()){
|
|
|
+ if (response.getResult()){
|
|
|
order.setStatus(3);
|
|
|
+ order.setYongYouId(response.getData());
|
|
|
longYanPurchaseOrderMapper.updateByPrimaryKeySelective(order);
|
|
|
- order.setYongYouId(response.getId());
|
|
|
- return response.getErrmsg();
|
|
|
+ return response.getMsg();
|
|
|
}
|
|
|
order.setStatus(8);
|
|
|
longYanPurchaseOrderMapper.updateByPrimaryKeySelective(order);
|
|
@@ -616,7 +616,14 @@ public class YongyouServiceImpl implements YongyouService {
|
|
|
Inventory.setCComUnitCode(inventoryTest.getCestComUnitCode());
|
|
|
Inventory.setCInvName(inventoryTest.getCestInvName());
|
|
|
Inventory.setCInvStd(inventoryTest.getCestInvStd());
|
|
|
- Inventory.setCInvCCode("01");
|
|
|
+ Inventory.setCInvCCode(inventoryTest.getCestInvCode());
|
|
|
+
|
|
|
+ Inventory.setCInvCode(IdGeneratorUtils.getObjectId());
|
|
|
+ Inventory.setCGroupCode("1");
|
|
|
+ Inventory.setCCAComUnitCode(inventoryTest.getCestComUnitCode());
|
|
|
+ Inventory.setCPlanMethod(inventoryTest.getCestPlanMethod());
|
|
|
+ Inventory.setCSRPolicy(inventoryTest.getCestSrpolicy());
|
|
|
+ Inventory.setFConvertRate(1);
|
|
|
AddSpareRequest request = new AddSpareRequest();
|
|
|
|
|
|
UserInfo userInfo = SecurityUtils.getUserInfo();
|
|
@@ -642,13 +649,12 @@ public class YongyouServiceImpl implements YongyouService {
|
|
|
longYanSpareAdd.setStatus(LongYanSpareAddStatusEnum.PUSHED.getValue());
|
|
|
longYanSpareAddMapper.updateByPrimaryKeySelective(longYanSpareAdd);
|
|
|
return response.getMsg();
|
|
|
- } else {
|
|
|
- throw new BusinessException("新增失败!");
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
longYanSpareAdd.setStatus(LongYanSpareAddStatusEnum.FAIL_PUSH.getValue());
|
|
|
longYanSpareAddMapper.updateByPrimaryKeySelective(longYanSpareAdd);
|
|
|
e.printStackTrace();
|
|
|
+ throw new BusinessException("新增失败!");
|
|
|
}
|
|
|
return null;
|
|
|
}
|