Commit 9b7ff3d0 by ice

1、修改验收入库生成差异处理单的组织字段对应问题

2、增加验收入库的入库时间,可供采购单据执行报表查询
parent 7e2cbf53
......@@ -13,11 +13,10 @@ import orthopedics.util.StatusCode;
import orthopedics.util.UuidUtil;
import orthopedics.vo.RcvReceiptHeaderPage;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.time.ZoneId;
import java.util.*;
/*接收单处理模块*/
@RestController
......@@ -44,6 +43,8 @@ public class RcvReceiptController {
private WarDifferentService warDifferentService;
@Autowired
private OrganzitionServer organzitionServer;
@Autowired
private ParameterService parameterService;
/*
*描述:验收入库前需先进行审核
......@@ -164,6 +165,10 @@ public class RcvReceiptController {
transactionController.invItemInOut(token, json);
}
lineStatus = "ACCEPTED";
//更新入库时间
Date date = new Date();
SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
rcvReceiptHeaderService.updateInStockTimeById(rcvRecHeaderPage.getId(),dateFormat.format(date));
}
//更新接收单头的状态
rcvReceiptHeaderService.updateRcvHeaderStatusByHeaderId(rcvRecHeaderPage.getId(),inspector,updateBy,updateTime,lineStatus);
......@@ -232,11 +237,15 @@ public class RcvReceiptController {
warDifferent.setSourceLineNumber(rcvReceiptLine.getLineNumber());
warDifferent.setSourceLineId(rcvReceiptLine.getId());
warDifferent.setSourceType("RCV_RECEIPT");
HrOrganization hrOrganization = organzitionServer.selectByOrgCode(rcvReceiptHeader.getSysOrgCode());
if(hrOrganization != null){
warDifferent.setOrgId(hrOrganization.getId());
RcvParameter rcvParameter = parameterService.findByInvId(rcvReceiptHeader.getInvId());
if(rcvParameter == null){
throw ErrorEnum.Error.createException("请维护该库存的收货参数!");
}
warDifferent.setOrgId("");
HrOrganization hrOrganization = organzitionServer.selectByOrgCode(rcvParameter.getOrgId());
if(hrOrganization == null){
throw ErrorEnum.Error.createException("请维护该库存的收货参数组织信息!");
}
warDifferent.setOrgId(hrOrganization.getId());
warDifferent.setDifferentType(type);
String headerId = "";
if(null != rcvReceiptHeader.getSourceHeaderId() && !"".equals(rcvReceiptHeader.getSourceHeaderId())) {
......
......@@ -127,4 +127,8 @@ Integer insert(RcvReceiptHeader RcvReceiptHeader);
@Select("select * from rcv_receipt_header where source_header_id = #{id}")
@ResultMap("rcvreceiptheader")
List<RcvReceiptHeader> selectBySourceHeaderId(@Param("id")String id);
//填充入库时间
@Update("update rcv_receipt_header set attribute1 = #{time} where id = #{id}")
int updateInStockTimeById(@Param("id") String id,@Param("time") String time);
}
\ No newline at end of file
......@@ -28,4 +28,9 @@ public class ParameterService {
public List<WshParameter> findWshParamByOrg(String orgId){
return wshParameterMapper.selectWshParamByOrg(orgId);
}
public RcvParameter findByInvId(String invId){
List<RcvParameter> rcvParameterList = rcvParameterMapper.selectByInvIdByupdateTime(invId);
return CollectionUtils.isEmpty(rcvParameterList)?null:rcvParameterList.get(0);
}
}
......@@ -65,4 +65,9 @@ public class RcvReceiptHeaderService {
rcvReceiptHeaderPage.setRcvReceiptLineList(rcvReceiptLineList);
return rcvReceiptHeaderPage;
}
//填充入库时间
public int updateInStockTimeById(String id,String time){
return rcvReceiptHeaderMapper.updateInStockTimeById(id, time);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment