Commit 5392ff01 authored by 温志超's avatar 温志超

更新打印

parent 1a31ae75
package com.ximai.mes.pro.domain.task;
import com.ximai.mes.pro.domain.proWorkOrder.ProWorkorder;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class TaskProWorkorderPrintData extends ProWorkorder {
private int size;
private String date;
private BigDecimal quantity;
}
...@@ -270,6 +270,8 @@ public class ProWorkorderServiceImpl implements IProWorkorderService { ...@@ -270,6 +270,8 @@ public class ProWorkorderServiceImpl implements IProWorkorderService {
} else { } else {
Long workorderId = proWorkorderVo.getWorkorderId(); Long workorderId = proWorkorderVo.getWorkorderId();
ProWorkorderVo workorder = proWorkorderService.selectProWorkorderByWorkorderId(workorderId); ProWorkorderVo workorder = proWorkorderService.selectProWorkorderByWorkorderId(workorderId);
ExceptionUtil.checkTrueThrowException(workorder.getStatus().equals(WorkorderStatusEnum.PUBLISHED.getValue()), MessageUtils.message("pro.workOrder.status.published.error"));
int ret = proWorkorderService.updateProWorkorderWithBomAndProcess(proWorkorderVo); int ret = proWorkorderService.updateProWorkorderWithBomAndProcess(proWorkorderVo);
//判断bom和工序是否有主键id,有则修改,无则新增 //判断bom和工序是否有主键id,有则修改,无则新增
......
...@@ -429,8 +429,8 @@ public class ProTaskWorkunitServiceImpl implements IProTaskWorkunitService { ...@@ -429,8 +429,8 @@ public class ProTaskWorkunitServiceImpl implements IProTaskWorkunitService {
query.le(proTaskWorkunit.getScheduleEndDateTo() != null, "ptw.schedule_start_date", proTaskWorkunit.getScheduleEndDateTo()); query.le(proTaskWorkunit.getScheduleEndDateTo() != null, "ptw.schedule_start_date", proTaskWorkunit.getScheduleEndDateTo());
query.eq(StringUtils.isNotEmpty(proTaskWorkunit.getArrangeCode()), "t.arrange_code", proTaskWorkunit.getArrangeCode()); query.eq(StringUtils.isNotEmpty(proTaskWorkunit.getArrangeCode()), "t.arrange_code", proTaskWorkunit.getArrangeCode());
query.eq(proTaskWorkunit.getOutsourced()!=null, "ptw.outsourced", proTaskWorkunit.getOutsourced()); query.eq(proTaskWorkunit.getOutsourced()!=null, "ptw.outsourced", proTaskWorkunit.getOutsourced());
query.eq(proTaskWorkunit.getCustomerProjectNo()!=null, "wo.customer_project_no", proTaskWorkunit.getCustomerProjectNo()); query.eq(StringUtils.isNotEmpty(proTaskWorkunit.getCustomerProjectNo()), "wo.customer_project_no", proTaskWorkunit.getCustomerProjectNo());
query.eq(proTaskWorkunit.getOrderCode()!=null, "wo.order_code", proTaskWorkunit.getOrderCode()); query.eq(StringUtils.isNotEmpty(proTaskWorkunit.getOrderCode()), "wo.order_code", proTaskWorkunit.getOrderCode());
query.gt("ptw.quantity",0); query.gt("ptw.quantity",0);
query.orderByAsc("schedule_start_date"); query.orderByAsc("schedule_start_date");
List<ProTaskWorkunit> list = proTaskWorkunitService.selectTaskWorkUnitJoinTask(query); List<ProTaskWorkunit> list = proTaskWorkunitService.selectTaskWorkUnitJoinTask(query);
...@@ -538,9 +538,9 @@ public class ProTaskWorkunitServiceImpl implements IProTaskWorkunitService { ...@@ -538,9 +538,9 @@ public class ProTaskWorkunitServiceImpl implements IProTaskWorkunitService {
public void outsourceConfirm(List<Long> taskWorkunitIds) { public void outsourceConfirm(List<Long> taskWorkunitIds) {
taskWorkunitIds.forEach(id->{ taskWorkunitIds.forEach(id->{
ProTaskWorkunit taskWorkunit = this.selectProTaskWorkunitByTaskWorkunitId(id); ProTaskWorkunit taskWorkunit = this.selectProTaskWorkunitByTaskWorkunitId(id);
if(taskWorkunit.getVendorId()==null){ // if(taskWorkunit.getVendorId()==null){
throw new ServiceException(MessageUtils.message("pro.schedule.error.not.null.vendor")); // throw new ServiceException(MessageUtils.message("pro.schedule.error.not.null.vendor"));
} // }
if(ObjectUtil.equal(taskWorkunit.getOutsourced(), 1)){ if(ObjectUtil.equal(taskWorkunit.getOutsourced(), 1)){
throw new ServiceException(MessageUtils.message("basic.error.repeat.confirm")); throw new ServiceException(MessageUtils.message("basic.error.repeat.confirm"));
} }
...@@ -576,13 +576,13 @@ public class ProTaskWorkunitServiceImpl implements IProTaskWorkunitService { ...@@ -576,13 +576,13 @@ public class ProTaskWorkunitServiceImpl implements IProTaskWorkunitService {
Map<String,Object> value = new HashMap<>(); Map<String,Object> value = new HashMap<>();
valueList.add( value); valueList.add( value);
ProWorkorder proWorkorder = proWorkorderMapper.selectProWorkorderWorderCode(taskBatchTasks.get(0).getArrangeCode()); ProWorkorder proWorkorder = proWorkorderMapper.selectProWorkorderWorderCode(taskBatchTasks.get(0).getArrangeCode());
value.put("header",proWorkorder); TaskProWorkorderPrintData taskProWorkorderPrintData = new TaskProWorkorderPrintData();
BeanUtil.copyProperties(proWorkorder,taskProWorkorderPrintData);
value.put("header",taskProWorkorderPrintData);
value.put("detail",taskBatchTasks); value.put("detail",taskBatchTasks);
Map<String,Object> value1 = new HashMap<>(); taskProWorkorderPrintData.setSize(i++);
value.put("additional",value1); taskProWorkorderPrintData.setDate(simpleDateFormat.format(new Date()));
value1.put("size",i++); taskProWorkorderPrintData.setQuantity(taskBatchTasks.get(0).getQuantity());
value1.put("date",simpleDateFormat.format(new Date()));
value1.put("quantity",taskBatchTasks.get(0).getQuantity());
} }
} }
return printData; return printData;
......
...@@ -192,6 +192,7 @@ ...@@ -192,6 +192,7 @@
t.create_time, t.create_time,
t.update_by, t.update_by,
t.update_time, t.update_time,
t.idx,
ptw.task_workunit_id, ptw.task_workunit_id,
ptw.quantity, ptw.quantity,
ptw.quantity_produced, ptw.quantity_produced,
......
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 to comment