Commit 01699892 by ice

修改验收入库接口、验收通过审核人赋值

parent 966562de
......@@ -49,6 +49,7 @@ public class TransferController {
return new Result(false,StatusCode.ERROR,"token失效!");
}
String updateBy = sysUser.getRealname();
String excutorId = sysUser.getId();
//获取当前时间
LocalDateTime updateTime = LocalDateTime.now();
JSONObject data = jsonObject.getJSONObject("data");
......@@ -87,7 +88,7 @@ public class TransferController {
JSONObject json = getJson(warTransferPage,warTransferLine);
transactionController.invItemeTransfer(token,json);
}
int count = transferService.updateTransferStatus("approval",updateBy,updateTime,id);
int count = transferService.updateTransferStatus(excutorId,"approval",updateBy,updateTime,id);
if(count == 0){
return new Result(false,StatusCode.ERROR,"调拨单号为:"+warTransferPage.getOrderNumber()+"的状态修改失败!");
}
......@@ -190,7 +191,7 @@ public class TransferController {
}
}
}
int count = transferService.updateTransferStatus("completed",updateBy,updateTime,id);
int count = transferService.updateTransferStatus(null,"completed",updateBy,updateTime,id);
if(count == 0){
return new Result(false,StatusCode.ERROR,"调拨单号为:"+warTransferPage.getOrderNumber()+"的状态修改失败!");
}
......
......@@ -98,8 +98,11 @@ public List<RcvReceiptHeader> select();
@Update("UPDATE rcv_receipt_header SET inspector = #{inspector} WHERE id = #{headerId}")
void updateHeaderInspectorByHeaderId(@Param("headerId")String headerId,@Param("inspector")String inspector);
@Update("UPDATE rcv_receipt_header SET header_status = #{status},update_by=#{updateBy},update_time=#{updateTime} WHERE id = #{headerId}")
void updateRcvHeaderStatusByHeaderId(@Param("headerId")String headerId, @Param("updateBy")String updateBy, @Param("updateTime") LocalDateTime updateTime, @Param("status")String status);
@Update({"<script>UPDATE rcv_receipt_header SET " +
"<if test = 'inspector != null'>inspector = #{inspector},</if>" +
"header_status = #{status},update_by=#{updateBy},update_time=#{updateTime} " +
"WHERE id = #{headerId}</script>"})
void updateRcvHeaderStatusByHeaderId(@Param("headerId")String headerId, @Param("inspector")String inspector,@Param("updateBy")String updateBy, @Param("updateTime") LocalDateTime updateTime, @Param("status")String status);
@Insert("<script>" +
"INSERT INTO rcv_receipt_header(id,create_by,create_time,update_by,update_time,sys_org_code,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,inv_id,receipt_type,receipt_number,receipt_date,shipment_number,shipment_date,party_id,party_site_id,shipper,receiver,inspector,header_remark,header_status,source_type,source_header_id,source_header_number,source_line_id,source_line_number) VALUES" +
......
......@@ -90,6 +90,8 @@ public interface RcvReceiptLineMapper{
@Update("UPDATE rcv_receipt_line SET line_status = #{status},update_by = #{updateBy},update_time = #{updateTime} WHERE id = #{id}")
void updateRcvRecLineStatusByLineId(@Param("id")String id, @Param("updateBy")String updateBy, @Param("updateTime")LocalDateTime updateTime, @Param("status")String status);
@Update("UPDATE rcv_receipt_line SET line_status = #{status},update_by = #{updateBy},update_time = #{updateTime} WHERE rcv_receipt_header_id = #{id}")
void updateRcvRecLineStatusByheaderId(@Param("id")String id, @Param("updateBy")String updateBy, @Param("updateTime")LocalDateTime updateTime, @Param("status")String status);
@Insert("<script>" +
"INSERT INTO rcv_receipt_line(id,create_by,create_time,update_by,update_time,sys_org_code,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,rcv_receipt_header_id,line_number,subinv_id,locator_id,item_id,shipped_quantity,received_quantity,accept_quantity,reject_quantity,unit_code,line_remark,line_status,source_type,source_header_id,source_header_number,source_line_id,source_line_number,inv_id) VALUES" +
......
......@@ -72,6 +72,9 @@ Integer insert(WarTransfer WarTransfer);
@ResultMap("wartransfer")
WarTransfer selectTransferById(@Param("id") String id);
@Update("update war_transfer set order_status = #{status},update_by = #{updateBy},update_time=#{updateTime} where id = #{id}")
Integer updateTransferStatusById(@Param("status") String status, @Param("updateBy") String updateBy, @Param("updateTime") LocalDateTime updateTime, @Param("id") String id);
@Update({"<script>update war_transfer set " +
"<if test = 'excutorId != null '>excutor_id = #{excutorId},</if>" +
"order_status = #{status},update_by = #{updateBy}," +
"update_time=#{updateTime} where id = #{id}</script>"})
Integer updateTransferStatusById(@Param("excutorId")String excutorId,@Param("status") String status, @Param("updateBy") String updateBy, @Param("updateTime") LocalDateTime updateTime, @Param("id") String id);
}
\ No newline at end of file
......@@ -26,8 +26,12 @@ public class RcvReceiptHeaderService {
return rcvReceiptHeaderMapper.selectRcvRecHeaderById(id);
}
public void updateRcvHeaderStatusByHeaderId(String id, String updateBy, LocalDateTime updateTime,String status){
rcvReceiptHeaderMapper.updateRcvHeaderStatusByHeaderId(id, updateBy, updateTime, status);
public void updateRcvHeaderStatusByHeaderId(String id, String inspector,String updateBy, LocalDateTime updateTime,String status){
if(!"INSPECTED".equals(status)){
inspector = null;
}
rcvReceiptLineMapper.updateRcvRecLineStatusByheaderId(id, updateBy, updateTime, status);
rcvReceiptHeaderMapper.updateRcvHeaderStatusByHeaderId(id,inspector, updateBy, updateTime, status);
}
//生成接收单
......
......@@ -37,9 +37,9 @@ public class TransferService {
return warTransferPage;
}
public int updateTransferStatus(String status, String updateBy, LocalDateTime updateTime,String id){
public int updateTransferStatus(String excutorId,String status, String updateBy, LocalDateTime updateTime,String id){
warTransferLineMapper.updateTransferLineStatusById(status, updateBy, updateTime, id);
return warTransferMapper.updateTransferStatusById(status, updateBy, updateTime, id);
return warTransferMapper.updateTransferStatusById(excutorId,status, updateBy, updateTime, id);
}
public int updateInvTransaction(String headerId,String lineId){
......
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