Ver Fonte

用友出库

hfxc226 há 2 anos atrás
pai
commit
98460629ce

+ 2 - 1
platform-service/src/main/java/com/platform/service/store/impl/OutStoreFormServiceImpl.java

@@ -252,6 +252,7 @@ public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper,
             detail.setOutId(outStoreForm.getId());
             detail.setRealNum(detail.getNum());
             detail.setOutNo(outStoreForm.getOutNo());
+            detail.setIsOut(outStoreForm.getIsOut());
             OutStoreDetail storeDetail = new OutStoreDetail();
             BeanConverterUtil.copyObjectProperties(detail, storeDetail);
             storeDetail.setId(IdGeneratorUtils.getObjectId());
@@ -780,7 +781,7 @@ public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper,
         OutStoreForm outStoreForm = new OutStoreForm();
         outStoreForm.setId(id);
         outStoreForm.setYyId(yyId);
-        outStoreForm.setStatus(OutStoreStatusEnum.FINISH.getValue());
+        outStoreForm.setStatus(OutStoreStatusEnum.EXECUTING.getValue());
         outStoreForm.setUpdateTime(LocalDateTime.now());
         outStoreForm.setUpdateUserId(SecurityUtils.getUserInfo().getUserId());
         outStoreForm.setUpdateUserName(SecurityUtils.getUserInfo().getRealName());

+ 10 - 9
platform-service/src/main/java/com/platform/service/yongyou/impl/YongyouServiceImpl.java

@@ -22,6 +22,7 @@ import com.platform.dao.dto.store.SpareRestoreFormDTO;
 import com.platform.dao.dto.store.SpareStoreDTO;
 import com.platform.dao.entity.sqarepartmanage.SparePartInfo;
 import com.platform.dao.entity.store.*;
+import com.platform.dao.enums.OutStoreStatusEnum;
 import com.platform.dao.enums.SparePickFormStatusEnum;
 import com.platform.dao.mapper.sqarepartmanage.SparePartInfoMapper;
 import com.platform.dao.mapper.store.SparePickDetailMapper;
@@ -239,8 +240,7 @@ public class YongyouServiceImpl implements YongyouService {
         otherOutMain.setCcode("0000000006");
         otherOutMain.setCrdcode("202"); // 材料出库
         otherOutMain.setCsource("库存");
-
-        otherOutMain.setCdefine1(outStoreFormVO.getId());// 保存设备系统的id
+        otherOutMain.setCdefine14(outStoreFormVO.getId());// 保存设备系统的单据id
         otherOutMain.setCmaker(outStoreFormVO.getCreatedUserName());// 申请人名称
         List<OutStoreDetailVO> detailVOS = outStoreFormVO.getDetailList();
         for (OutStoreDetailVO vo : detailVOS) {
@@ -252,9 +252,10 @@ public class YongyouServiceImpl implements YongyouService {
             }else{// 负数为退库
                 detail.setIquantity(vo.getNum().negate());
             }
-            detail.setIunitcost(vo.getPrice());
-            detail.setIprice(vo.getTotalPrice());
+            // detail.setIunitcost(vo.getPrice());
+            // detail.setIprice(vo.getTotalPrice());
             detail.setCbatch(vo.getCBatch());
+            detail.setCdefine28(vo.getId());// 保存设备系统的单据明细id
             otherOutDetail.add(detail);
         }
 
@@ -294,18 +295,18 @@ public class YongyouServiceImpl implements YongyouService {
 
         for (Iterator<Object> iterator = detailList.iterator(); iterator.hasNext(); ) {
             JSONObject next = (JSONObject) iterator.next();
-            String spareId = next.getString("spareId");
+            // spareId = next.getString("spareId");
             String spareNum = next.getString("spareNum");
             String detailId = next.getString("detailId");
-            String spareGGXH = next.getString("spareGGXH");
+            // String spareGGXH = next.getString("spareGGXH");
             OutStoreDetail sparePickDetail = new OutStoreDetail();
             sparePickDetail.setId(detailId);
-            sparePickDetail.setNum(new BigDecimal(spareNum));
-            sparePickDetail.setGgxh(spareGGXH);
+            sparePickDetail.setRealNum(new BigDecimal(spareNum));
+            // sparePickDetail.setGgxh(spareGGXH);
             outStoreDetailService.modModelByPrimaryKey(sparePickDetail);
         }
         OutStoreForm sparePickForm = new OutStoreForm();
-        sparePickForm.setStatus(2);
+        sparePickForm.setStatus(OutStoreStatusEnum.FINISH.getValue());
         sparePickForm.setId(id);
         outStoreFormService.modModelByPrimaryKey(sparePickForm);
     }