|
@@ -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);
|
|
|
}
|