|
@@ -25,6 +25,7 @@ import com.platform.dao.entity.sb.SbModelSpareBom;
|
|
|
import com.platform.dao.entity.spareAdd.LongYanSpareAdd;
|
|
|
import com.platform.dao.entity.store.OutStoreDetail;
|
|
|
import com.platform.dao.entity.store.OutStoreForm;
|
|
|
+import com.platform.dao.enums.LongYanPurchaseOrderStatusEnum;
|
|
|
import com.platform.dao.enums.LongYanSpareAddStatusEnum;
|
|
|
import com.platform.dao.enums.OutStoreStatusEnum;
|
|
|
import com.platform.dao.enums.YesNoEnum;
|
|
@@ -506,6 +507,41 @@ public class YongyouServiceImpl implements YongyouService {
|
|
|
GetPurchaseDetailListResponse response = JsonUtils.jsonToModel(responseStr,GetPurchaseDetailListResponse.class);
|
|
|
if (response.getResult()) {
|
|
|
List<LongYanPurchaseDetailListVO> data = response.getData();
|
|
|
+ if (data!=null&&data.size()>0){
|
|
|
+ String yongYouId = data.get(0).getCCode();
|
|
|
+ LongYanPurchaseOrder order = new LongYanPurchaseOrder();
|
|
|
+ order.setYongYouId(yongYouId);
|
|
|
+ LongYanPurchaseOrder udpOrder = longYanPurchaseOrderMapper.selectOne(order);
|
|
|
+// udpOrder.setStatus(data.get(0).getIStatus());
|
|
|
+ if ("锁定".equals(data.get(0).getIStatus())){
|
|
|
+ udpOrder.setStatus(LongYanPurchaseOrderStatusEnum.locked.getValue());
|
|
|
+ }else if ("开立".equals(data.get(0).getIStatus())){
|
|
|
+ udpOrder.setStatus(LongYanPurchaseOrderStatusEnum.stand.getValue());
|
|
|
+ }else if ("审核".equals(data.get(0).getIStatus())){
|
|
|
+ udpOrder.setStatus(LongYanPurchaseOrderStatusEnum.check.getValue());
|
|
|
+ }else if ("取消关闭".equals(data.get(0).getIStatus())){
|
|
|
+ udpOrder.setStatus(LongYanPurchaseOrderStatusEnum.cancel_close.getValue());
|
|
|
+ }
|
|
|
+ else if ("正常关闭".equals(data.get(0).getIStatus())){
|
|
|
+ udpOrder.setStatus(LongYanPurchaseOrderStatusEnum.normal_close.getValue());
|
|
|
+ }
|
|
|
+ else if ("未知状态".equals(data.get(0).getIStatus())){
|
|
|
+ udpOrder.setStatus(LongYanPurchaseOrderStatusEnum.unknowing_status.getValue());
|
|
|
+ }
|
|
|
+ longYanPurchaseOrderMapper.updateByPrimaryKeySelective(udpOrder);
|
|
|
+ List<LongYanPurchaseDetailDTO> list = new ArrayList<>();
|
|
|
+ for (LongYanPurchaseDetailListVO vo:data){
|
|
|
+ LongYanPurchaseDetailDTO detail = new LongYanPurchaseDetailDTO();
|
|
|
+ detail.setNo(vo.getCInvCCode());
|
|
|
+ detail.setYongYouId(vo.getCTrackNo());
|
|
|
+ detail.setPurchasedNum(vo.getIPOSum());
|
|
|
+ detail.setInStoreNum(vo.getIRDSum());
|
|
|
+ list.add(detail);
|
|
|
+ }
|
|
|
+ if (list.size()>0){
|
|
|
+ longYanPurchaseDetailMapper.updateBatchPurchaseDetails(list);
|
|
|
+ }
|
|
|
+ }
|
|
|
AbstractPageResultBean<LongYanPurchaseDetailListVO> voMyPage = getPageInfo(pageNum,pageSize,data);
|
|
|
return voMyPage;
|
|
|
}
|
|
@@ -588,7 +624,8 @@ public class YongyouServiceImpl implements YongyouService {
|
|
|
puAppMain.setCdepcode(vo.getCdepcode());
|
|
|
puAppMain.setCcode(vo.getPurchaseNo());
|
|
|
puAppMain.setCdefine1(DictCache.getLabelByValue("LONG_YAN_PURCHASE_TYPE",vo.getType()));
|
|
|
- puAppMain.setCdefine2(vo.getSbName());
|
|
|
+ SbInfo sbInfo = sbInfoMapper.selectByPrimaryKey(vo.getSbId());
|
|
|
+ puAppMain.setCdefine2(sbInfo.getPositionNo()+"-"+sbInfo.getName());
|
|
|
puAppMain.setCdefine11(vo.getRemark());
|
|
|
puAppMain.setCmaker(vo.getCreatedUserName());
|
|
|
puAppMain.setDdate(DateUtils.dateToString(vo.getCreatedTime()));
|
|
@@ -603,6 +640,10 @@ public class YongyouServiceImpl implements YongyouService {
|
|
|
// detail.setDarrivedate(DateUtils.dateToString(LocalDateTime.now()));
|
|
|
detail.setDrequirdate(vo.getNeedDate().toString());
|
|
|
detail.setDarrivedate(vo.getPlanGetDate().toString());
|
|
|
+ detail.setCitem_class(orderVO.getProjectNo());
|
|
|
+ detail.setCitemname(orderVO.getProjectName());
|
|
|
+ detail.setCitem_name(orderVO.getProjectSecondName());
|
|
|
+ detail.setCitemcode(orderVO.getProjectSecondNo());
|
|
|
// detail.setCexch_name("人名币");
|
|
|
// detail.setIexchrate("1");
|
|
|
// detail.setIvouchrowno("136345431");
|