加入belong_work_order概念

highway
zhaoxiaolin 1 year ago
parent c1b6bfd2bb
commit 709af8c4a0

@ -57,15 +57,15 @@ public class MesReportWorkController extends BaseController {
@GetMapping("/list")
public TableDataInfo list(MesReportWork mesReportWork) {
startPage();
//默认时间范围T 00:00:00~T+1 00:00:00
if(StringUtils.isEmpty(mesReportWork.getCreateTimeStart())){
mesReportWork.setCreateTimeStart(DateUtils.getDate()+" 00:00:00");//start
LocalDate date = LocalDate.now();
LocalDate dateEnd = date.plusDays(1);
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
mesReportWork.setCreateTimeEnd(dateEndStr);//end
}
// //默认时间范围T 00:00:00~T+1 00:00:00
// if(StringUtils.isEmpty(mesReportWork.getCreateTimeStart())){
// mesReportWork.setCreateTimeStart(DateUtils.getDate()+" 00:00:00");//start
// LocalDate date = LocalDate.now();
// LocalDate dateEnd = date.plusDays(1);
// DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
// String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
// mesReportWork.setCreateTimeEnd(dateEndStr);//end
// }
List<MesReportWork> list = mesReportWorkService.selectMesReportWorkList(mesReportWork);
return getDataTable(list);
}
@ -77,15 +77,15 @@ public class MesReportWorkController extends BaseController {
//@Log(title = "报工报表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MesReportWork mesReportWork) {
//默认时间范围T 00:00:00~T+1 00:00:00
if(StringUtils.isEmpty(mesReportWork.getCreateTimeStart())){
mesReportWork.setCreateTimeStart(DateUtils.getDate()+" 00:00:00");//start
LocalDate date = LocalDate.now();
LocalDate dateEnd = date.plusDays(1);
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
mesReportWork.setCreateTimeEnd(dateEndStr);//end
}
// //默认时间范围T 00:00:00~T+1 00:00:00
// if(StringUtils.isEmpty(mesReportWork.getCreateTimeStart())){
// mesReportWork.setCreateTimeStart(DateUtils.getDate()+" 00:00:00");//start
// LocalDate date = LocalDate.now();
// LocalDate dateEnd = date.plusDays(1);
// DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
// String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
// mesReportWork.setCreateTimeEnd(dateEndStr);//end
// }
List<MesReportWork> list = mesReportWorkService.selectMesReportWorkList(mesReportWork);
ExcelUtil<MesReportWork> util = new ExcelUtil<MesReportWork>(MesReportWork.class);
util.exportExcel(response, list, "报工报表数据");

@ -334,12 +334,15 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
||
"1".equals(work.getEndReport())//最终报工标识
){
logger.info("工单请求关闭调用remoteSapService.sapCloseOrder,参数:"+work.getWorkorderCodeSap());
//工单完成,关闭工单
remoteSapService.sapCloseOrder(work.getWorkorderCodeSap());
R r2= remoteSapService.sapCloseOrder(work.getWorkorderCodeSap());
logger.info("工单"+work.getWorkorderCodeSap()+"sap关闭"+r2.getCode()+",返回信息:"+r2.getMsg());
work.setStatus("w3");
work.setUpdateTime(DateUtils.getNowDate());
//pro_work_order status->w4报工
//pro_work_order status->w3报工--belong_work_order
mesReportWorkMapper.updateWorkOrderStatus(work);
logger.info("工单"+work.getWorkorderCodeSap()+"关闭成功");
}
return R.ok();
}

@ -203,12 +203,15 @@ public class OpenServiceImpl implements OpenService {
||
"1".equals(work.getEndReport())//最终报工标识
){
logger.info("工单请求关闭调用remoteSapService.sapCloseOrder,参数:"+work.getWorkorderCodeSap());
//工单完成,关闭工单
remoteSapService.sapCloseOrder(work.getWorkorderCodeSap());
R rclose = remoteSapService.sapCloseOrder(work.getWorkorderCodeSap());
logger.info("工单"+work.getWorkorderCodeSap()+"sap关闭"+r.getCode()+",返回信息:"+r.getMsg());
work.setStatus("w3");
work.setUpdateTime(DateUtils.getNowDate());
//pro_work_order status->w3报工
//pro_work_order status->w3报工--belong_work_order
openMapper.updateWorkOrderStatus(work);
logger.info("工单"+work.getWorkorderCodeSap()+"关闭成功");
}
return R.ok();
}

@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
</update>
<update id="updateWorkOrderStatus">
update pro_order_workorder set status = #{status} where workorder_code = #{workorderCode}
update pro_order_workorder set status = #{status} where belong_work_order = #{workorderCode}
</update>
<!--获取在邦rfid 工单的信息-->

@ -85,6 +85,15 @@ public class ProOrderWorkorder extends TreeEntity {
// TODO 暂时存放线体编码
private String prodLineName;
private String belongWorkOrder;
public String getBelongWorkOrder() {
return belongWorkOrder;
}
public void setBelongWorkOrder(String belongWorkOrder) {
this.belongWorkOrder = belongWorkOrder;
}
public String getProdLineName() {
return prodLineName;

@ -265,6 +265,7 @@ public class ProOrderServiceImpl implements IProOrderService {
// 获取单位换算值
Long conver = 1L;
String belongWorkOrder = "0";
while (run) {
// 先进行当前订单拆分操作
// 1.设置工单信息,并更新订单信息至数据库
@ -275,6 +276,11 @@ public class ProOrderServiceImpl implements IProOrderService {
workOrder.setParentOrder(parentOrder.toString());
workOrder.setSortNo(splitOrderDTO.getSortNo());
if("0".equals(workOrder.getParentOrder())){
//20231127,加入belongWorkOrder概念
belongWorkOrder = workOrder.getWorkorderCode();
}
workOrder.setBelongWorkOrder(belongWorkOrder);
// 将工单信息更新至数据库
proOrderWorkorderMapper.insertProOrderWorkorder(workOrder);

@ -203,6 +203,7 @@
<if test="endFlag != null">end_flag,</if>
<if test="carNum != null">car_num,</if>
<if test="sortNo != null">sort_no,</if>
<if test="belongWorkOrder != null">belong_work_order,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="workorderId != null">#{workorderId},</if>
@ -238,6 +239,7 @@
<if test="endFlag != null">#{endFlag},</if>
<if test="carNum != null">#{carNum},</if>
<if test="sortNo != null">#{sortNo},</if>
<if test="belongWorkOrder != null">#{belongWorkOrder},</if>
</trim>
</insert>
<insert id="createPrepare">

Loading…
Cancel
Save