From a5e08addf5745b587d54c7536996259d5505261a Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期四, 23 四月 2026 09:33:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_天津_阳光彩印' into dev_天津_阳光彩印
---
src/main/java/com/ruoyi/production/service/ProductionPrintOrderService.java | 21 ++
src/main/java/com/ruoyi/production/dto/MaterialInfoDto.java | 27 +++
src/main/java/com/ruoyi/production/dto/SaveProductionPrintOrderDto.java | 23 ++
src/main/java/com/ruoyi/production/service/impl/ProductOrderServiceImpl.java | 18 ++
src/main/java/com/ruoyi/production/dto/ProductOrderDto.java | 2
src/main/java/com/ruoyi/production/pojo/ProductWorkOrder.java | 11 +
src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java | 13
src/main/java/com/ruoyi/production/service/ProductOrderService.java | 7
src/main/java/com/ruoyi/production/dto/PlateMakingDto.java | 26 ++
src/main/java/com/ruoyi/production/dto/ProcessContentDto.java | 25 ++
src/main/resources/mapper/production/ProductOrderMapper.xml | 1
src/main/resources/mapper/production/ProductionPrintOrderMapper.xml | 7
src/main/java/com/ruoyi/production/controller/ProductOrderController.java | 6
src/main/java/com/ruoyi/production/service/impl/ProductionPrintOrderServiceImpl.java | 49 +++++
src/main/java/com/ruoyi/production/pojo/ProductionPrintOrder.java | 219 ++++++++++++++++++++++++
src/main/java/com/ruoyi/production/mapper/ProductionPrintOrderMapper.java | 18 ++
src/main/java/com/ruoyi/production/dto/ProductionPrintOrderDto.java | 23 ++
17 files changed, 491 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/ruoyi/production/controller/ProductOrderController.java b/src/main/java/com/ruoyi/production/controller/ProductOrderController.java
index e1c22d1..665fe29 100644
--- a/src/main/java/com/ruoyi/production/controller/ProductOrderController.java
+++ b/src/main/java/com/ruoyi/production/controller/ProductOrderController.java
@@ -75,4 +75,10 @@
public R delete(@PathVariable("ids") Long[] ids) {
return R.ok(productOrderService.delete(ids));
}
+
+ @ApiOperation("寮�濮嬫姤宸�")
+ @PostMapping("/startProduction/{id}")
+ public R startProduction(@PathVariable("id") Long id) {
+ return R.ok(productOrderService.startProduction(id));
+ }
}
diff --git a/src/main/java/com/ruoyi/production/dto/MaterialInfoDto.java b/src/main/java/com/ruoyi/production/dto/MaterialInfoDto.java
new file mode 100644
index 0000000..070f7e4
--- /dev/null
+++ b/src/main/java/com/ruoyi/production/dto/MaterialInfoDto.java
@@ -0,0 +1,27 @@
+package com.ruoyi.production.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @author buhuazhen
+ * @date 2026/4/22
+ * @email 3038525872@qq.com
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class MaterialInfoDto implements Serializable {
+ private Long id;
+ private String name;
+ private String model;
+ private String num;
+ private String numSuffix = "寮�";
+ private String unit;
+ private String unitSuffix = "鍏�/kg";
+ private String price;
+ private String totalAmount;
+}
diff --git a/src/main/java/com/ruoyi/production/dto/PlateMakingDto.java b/src/main/java/com/ruoyi/production/dto/PlateMakingDto.java
new file mode 100644
index 0000000..18879e0
--- /dev/null
+++ b/src/main/java/com/ruoyi/production/dto/PlateMakingDto.java
@@ -0,0 +1,26 @@
+package com.ruoyi.production.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * 鍒剁増DTO
+ * @author buhuazhen
+ * @date 2026/4/22
+ * @email 3038525872@qq.com
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class PlateMakingDto implements Serializable {
+ private String designProductionFee; // 璁捐鍒朵綔璐�
+ private String impositionFee; // 鎷肩増璐�
+ private String filmOutputFee; // 鍑虹墖璐�
+ private String proofingFee; // 鎵撴牱璐�
+ private String doctorBladePlateFee; // 鍒垁鐗堣垂
+ private String hotEmbossingPlateFee; // 鐑�/鍑哥増璐�
+ private String subtotalFee; // 灏忚
+}
diff --git a/src/main/java/com/ruoyi/production/dto/ProcessContentDto.java b/src/main/java/com/ruoyi/production/dto/ProcessContentDto.java
new file mode 100644
index 0000000..29affdf
--- /dev/null
+++ b/src/main/java/com/ruoyi/production/dto/ProcessContentDto.java
@@ -0,0 +1,25 @@
+package com.ruoyi.production.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * 宸ュ簭鍔犲伐鍐呭Dto
+ * @author buhuazhen
+ * @date 2026/4/22
+ * @email 3038525872@qq.com
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class ProcessContentDto implements Serializable {
+ private String id;
+ private Long processId; // 宸ュ簭id
+ private String processContent; // 宸ヨ壓鍔犲伐鍐呭
+ private String openCount; // 寮�鏁�
+ private String processPositive; // 宸ヨ壓姝f暟
+ private String allowanceQty; // 鍔犳斁鏁�
+}
diff --git a/src/main/java/com/ruoyi/production/dto/ProductOrderDto.java b/src/main/java/com/ruoyi/production/dto/ProductOrderDto.java
index dc2185a..d5dd777 100644
--- a/src/main/java/com/ruoyi/production/dto/ProductOrderDto.java
+++ b/src/main/java/com/ruoyi/production/dto/ProductOrderDto.java
@@ -57,4 +57,6 @@
//鏄惁鍙戣揣(鍙拌处椤甸潰棰滆壊鎺у埗)
private Boolean isFh;
+
+ private Long saleLedgerId;
}
diff --git a/src/main/java/com/ruoyi/production/dto/ProductionPrintOrderDto.java b/src/main/java/com/ruoyi/production/dto/ProductionPrintOrderDto.java
new file mode 100644
index 0000000..b4eaff1
--- /dev/null
+++ b/src/main/java/com/ruoyi/production/dto/ProductionPrintOrderDto.java
@@ -0,0 +1,23 @@
+package com.ruoyi.production.dto;
+
+import com.ruoyi.production.pojo.ProductionPrintOrder;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @author buhuazhen
+ * @date 2026/4/22
+ * @email 3038525872@qq.com
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class ProductionPrintOrderDto extends ProductionPrintOrder implements Serializable {
+
+
+}
diff --git a/src/main/java/com/ruoyi/production/dto/SaveProductionPrintOrderDto.java b/src/main/java/com/ruoyi/production/dto/SaveProductionPrintOrderDto.java
new file mode 100644
index 0000000..9351dc3
--- /dev/null
+++ b/src/main/java/com/ruoyi/production/dto/SaveProductionPrintOrderDto.java
@@ -0,0 +1,23 @@
+package com.ruoyi.production.dto;
+
+import com.ruoyi.production.pojo.ProductionPrintOrder;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * 鐢ㄤ簬淇濆瓨鐨刣to
+ * @author buhuazhen
+ * @date 2026/4/22
+ * @email 3038525872@qq.com
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class SaveProductionPrintOrderDto extends ProductionPrintOrder implements Serializable {
+ private String notNeed;
+}
diff --git a/src/main/java/com/ruoyi/production/mapper/ProductionPrintOrderMapper.java b/src/main/java/com/ruoyi/production/mapper/ProductionPrintOrderMapper.java
new file mode 100644
index 0000000..caf81bb
--- /dev/null
+++ b/src/main/java/com/ruoyi/production/mapper/ProductionPrintOrderMapper.java
@@ -0,0 +1,18 @@
+package com.ruoyi.production.mapper;
+
+import com.ruoyi.production.pojo.ProductionPrintOrder;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author buhuazhen
+* @description 閽堝琛ㄣ�恜roduction_print_order(鍗板埛瀹氬嵃鍗�)銆戠殑鏁版嵁搴撴搷浣淢apper
+* @createDate 2026-04-22 15:14:51
+* @Entity com.ruoyi.production.pojo.ProductionPrintOrder
+*/
+public interface ProductionPrintOrderMapper extends BaseMapper<ProductionPrintOrder> {
+
+}
+
+
+
+
diff --git a/src/main/java/com/ruoyi/production/pojo/ProductWorkOrder.java b/src/main/java/com/ruoyi/production/pojo/ProductWorkOrder.java
index bbfb332..dd8fe11 100644
--- a/src/main/java/com/ruoyi/production/pojo/ProductWorkOrder.java
+++ b/src/main/java/com/ruoyi/production/pojo/ProductWorkOrder.java
@@ -129,4 +129,15 @@
@TableField(fill = FieldFill.INSERT)
private Long deptId;
+ // 寮�濮嬫姤宸�
+ @TableField(value = "start_product_time")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private LocalDateTime startProductTime;
+
+ // 缁撴潫鎶ュ伐
+ @TableField(value = "end_product_time")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private LocalDateTime endProductTime;
}
diff --git a/src/main/java/com/ruoyi/production/pojo/ProductionPrintOrder.java b/src/main/java/com/ruoyi/production/pojo/ProductionPrintOrder.java
new file mode 100644
index 0000000..25b0cfd
--- /dev/null
+++ b/src/main/java/com/ruoyi/production/pojo/ProductionPrintOrder.java
@@ -0,0 +1,219 @@
+package com.ruoyi.production.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.List;
+
+import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
+import com.ruoyi.production.dto.MaterialInfoDto;
+import com.ruoyi.production.dto.PlateMakingDto;
+import com.ruoyi.production.dto.ProcessContentDto;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 鍗板埛瀹氬嵃鍗�
+ * @TableName production_print_order
+ */
+@TableName(value ="production_print_order",autoResultMap = true)
+@Data
+public class ProductionPrintOrder implements Serializable {
+ /**
+ *
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 瀵瑰簲鐨勯攢鍞鍗�
+ */
+ @TableField(value = "sales_ledger_id")
+ private Long salesLedgerId;
+
+ /**
+ * 瀵瑰簲鐨勭敓浜у伐鍗�
+ */
+ @TableField(value = "product_order")
+ private Long productOrder;
+
+ /**
+ * 鍒跺崟鏃ユ湡
+ */
+ @TableField(value = "print_order_time")
+ private LocalDateTime printOrderTime;
+
+ /**
+ * 瀹屾垚鏃ユ湡
+ */
+ @TableField(value = "finish_time")
+ private LocalDateTime finishTime;
+
+ /**
+ * 缂栧彿 搴旇涓簊ale鐨勫悎鍚屽彿
+ */
+ @TableField(value = "no")
+ private String no;
+
+ /**
+ * 鎴愬搧灏哄
+ */
+ @TableField(value = "finished_size")
+ private String finishedSize;
+
+ /**
+ * 浠嬬粛淇� 瀛樺湪 , 琛ㄧず澶氫釜
+ */
+ @TableField(value = "introduction_letter")
+ private String introductionLetter;
+
+ /**
+ * 浜у搧鍚嶇О
+ */
+ @TableField(value = "product_name")
+ private String productName;
+
+ /**
+ * 浜у搧璇存槑
+ */
+ @TableField(value = "product_description")
+ private String productDescription;
+
+ /**
+ * 鍒囨枡灏哄
+ */
+ @TableField(value = "cut_size")
+ private String cutSize;
+
+ /**
+ * 鍒囨枡灏哄鏁伴噺
+ */
+ @TableField(value = "cut_num")
+ private String cutNum;
+
+ /**
+ * 姝f暟
+ */
+ @TableField(value = "positive_qty")
+ private String positiveQty;
+
+ /**
+ * 鍔犳斁鏁�
+ */
+ @TableField(value = "allowance_qty")
+ private String allowanceQty;
+
+ /**
+ * 鍒剁増
+ */
+ @TableField(value = "plate_making",typeHandler = JacksonTypeHandler.class)
+ private List<PlateMakingDto> plateMaking;
+
+ /**
+ * 宸ュ簭鍔犲伐鍐呭
+ */
+ @TableField(value = "process_content",typeHandler = JacksonTypeHandler.class)
+ private List<ProcessContentDto> processContent;
+
+ /**
+ * 鏉愭枡淇℃伅
+ */
+ @TableField(value = "material_info",typeHandler = JacksonTypeHandler.class)
+ private List<MaterialInfoDto> materialInfo;
+
+ /**
+ * 宸ヨ壓瑕佹眰
+ */
+ @TableField(value = "process_requirement")
+ private String processRequirement;
+
+ /**
+ * 閫佽揣鍦扮偣
+ */
+ @TableField(value = "delivery_address")
+ private String deliveryAddress;
+
+ /**
+ * 鑱旂郴浜�
+ */
+ @TableField(value = "contact_name")
+ private String contactName;
+
+ /**
+ * 鍖呰瑕佹眰
+ */
+ @TableField(value = "packaging_requirement")
+ private String packagingRequirement;
+
+ /**
+ * 鍔犲伐鍚庡昂瀵�
+ */
+ @TableField(value = "post_process_size")
+ private String postProcessSize;
+
+ /**
+ * 璁㈣揣鏁伴噺
+ */
+ @TableField(value = "order_qty")
+ private String orderQty;
+
+ /**
+ * 瀹為檯浜や粯鏁伴噺
+ */
+ @TableField(value = "actual_delivery_qty")
+ private String actualDeliveryQty;
+
+ /**
+ * 鐢熶骇閮ㄩ棬
+ */
+ @TableField(value = "production_dept")
+ private String productionDept;
+
+ /**
+ * 鎶�鏈儴
+ */
+ @TableField(value = "technical_dept")
+ private String technicalDept;
+
+ /**
+ * 搴撴埧
+ */
+ @TableField(value = "warehouse_dept")
+ private String warehouseDept;
+
+ /**
+ *
+ */
+ @TableField(value = "create_time")
+ private LocalDateTime createTime;
+
+ /**
+ *
+ */
+ @TableField(value = "update_time")
+ private LocalDateTime updateTime;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ /**
+ *
+ */
+ @TableField(value = "create_user",fill = FieldFill.INSERT)
+ @ApiModelProperty(value="鍒涘缓浜�")
+ private Integer createUser;
+
+ /**
+ *
+ */
+ @TableField(value = "update_user",fill = FieldFill.INSERT_UPDATE)
+ @ApiModelProperty(value="鏇存柊浜�")
+ private Integer updateUser;
+
+ @TableField(value = "create_user_name", fill = FieldFill.INSERT)
+ private String createUserName;
+
+ @TableField(value = "update_user_name", fill = FieldFill.INSERT_UPDATE)
+ private String updateUserName;
+}
\ No newline at end of file
diff --git a/src/main/java/com/ruoyi/production/service/ProductOrderService.java b/src/main/java/com/ruoyi/production/service/ProductOrderService.java
index 5a714a6..869247c 100644
--- a/src/main/java/com/ruoyi/production/service/ProductOrderService.java
+++ b/src/main/java/com/ruoyi/production/service/ProductOrderService.java
@@ -8,6 +8,7 @@
import com.ruoyi.production.dto.ProductStructureDto;
import com.ruoyi.production.pojo.ProcessRoute;
import com.ruoyi.production.pojo.ProductOrder;
+import com.ruoyi.production.pojo.ProductWorkOrder;
import java.util.List;
@@ -25,4 +26,10 @@
Boolean addProductOrder(ProductOrder productOrder);
Boolean delete(Long[] id);
+
+ /**
+ * 寮�濮嬫姤宸�
+ * @param id
+ */
+ ProductWorkOrder startProduction(Long id);
}
diff --git a/src/main/java/com/ruoyi/production/service/ProductionPrintOrderService.java b/src/main/java/com/ruoyi/production/service/ProductionPrintOrderService.java
new file mode 100644
index 0000000..c4fd1b8
--- /dev/null
+++ b/src/main/java/com/ruoyi/production/service/ProductionPrintOrderService.java
@@ -0,0 +1,21 @@
+package com.ruoyi.production.service;
+
+import com.ruoyi.production.dto.SaveProductionPrintOrderDto;
+import com.ruoyi.production.pojo.ProductionPrintOrder;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author buhuazhen
+* @description 閽堝琛ㄣ�恜roduction_print_order(鍗板埛瀹氬嵃鍗�)銆戠殑鏁版嵁搴撴搷浣淪ervice
+* @createDate 2026-04-22 15:14:51
+*/
+public interface ProductionPrintOrderService extends IService<ProductionPrintOrder> {
+
+ /**
+ * 淇濆瓨
+ * @param dto
+ */
+ void save(SaveProductionPrintOrderDto dto);
+
+
+}
diff --git a/src/main/java/com/ruoyi/production/service/impl/ProductOrderServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/ProductOrderServiceImpl.java
index 06a0782..343f790 100644
--- a/src/main/java/com/ruoyi/production/service/impl/ProductOrderServiceImpl.java
+++ b/src/main/java/com/ruoyi/production/service/impl/ProductOrderServiceImpl.java
@@ -1,6 +1,7 @@
package com.ruoyi.production.service.impl;
import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.lang.Assert;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -23,6 +24,7 @@
import java.math.BigDecimal;
import java.time.LocalDate;
+import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.List;
@@ -157,6 +159,22 @@
return true;
}
+ @Override
+ public ProductWorkOrder startProduction(Long id) {
+ LocalDateTime now = LocalDateTime.now();
+ ProductWorkOrder productWorkOrder = productWorkOrderMapper.selectById(id);
+ productWorkOrder.setStartProductTime(now);
+ Assert.notNull(productWorkOrder, "宸ュ崟涓嶅瓨鍦�");
+
+
+ ProductWorkOrder needUpdate = new ProductWorkOrder();
+ needUpdate.setId(id);
+ needUpdate.setStartProductTime(now);
+ productWorkOrderMapper.updateById(needUpdate);
+
+ return productWorkOrder;
+ }
+
//鑾峰彇褰撳墠鐢熶骇璁㈠崟鍙�
public String getMaxOrderNoByDate(String datePrefix) {
QueryWrapper<ProductOrder> queryWrapper = new QueryWrapper<>();
diff --git a/src/main/java/com/ruoyi/production/service/impl/ProductionPrintOrderServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/ProductionPrintOrderServiceImpl.java
new file mode 100644
index 0000000..47dea54
--- /dev/null
+++ b/src/main/java/com/ruoyi/production/service/impl/ProductionPrintOrderServiceImpl.java
@@ -0,0 +1,49 @@
+package com.ruoyi.production.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.IdUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.production.dto.ProcessContentDto;
+import com.ruoyi.production.dto.SaveProductionPrintOrderDto;
+import com.ruoyi.production.pojo.ProductionPrintOrder;
+import com.ruoyi.production.service.ProductionPrintOrderService;
+import com.ruoyi.production.mapper.ProductionPrintOrderMapper;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+* @author buhuazhen
+* @description 閽堝琛ㄣ�恜roduction_print_order(鍗板埛瀹氬嵃鍗�)銆戠殑鏁版嵁搴撴搷浣淪ervice瀹炵幇
+* @createDate 2026-04-22 15:14:51
+*/
+@Service
+@RequiredArgsConstructor
+public class ProductionPrintOrderServiceImpl extends ServiceImpl<ProductionPrintOrderMapper, ProductionPrintOrder>
+ implements ProductionPrintOrderService{
+
+ private final ProductionPrintOrderMapper productionPrintOrderMapper;
+
+ @Override
+ @Transactional
+ public void save(SaveProductionPrintOrderDto dto) {
+ ProductionPrintOrder productionPrintOrder = BeanUtil.copyProperties(dto, ProductionPrintOrder.class);
+
+ List<ProcessContentDto> processContentDtoList = productionPrintOrder.getProcessContent();
+ // 缁欐病鏈塱d鐨勪俊鎭缃畊uid
+ processContentDtoList.forEach(processContentDto -> {
+ if (StrUtil.isBlank(processContentDto.getId())) {
+ processContentDto.setId(IdUtil.simpleUUID());
+ }
+ });
+
+ int i = dto.getId() == null ? productionPrintOrderMapper.insert(productionPrintOrder) : productionPrintOrderMapper.updateById(productionPrintOrder);
+ }
+}
+
+
+
+
diff --git a/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
index 62a13ef..798baa0 100644
--- a/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
+++ b/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
@@ -101,6 +101,9 @@
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean addProductMain(ProductionProductMainDto dto) {
+ LocalDateTime now = LocalDateTime.now();
+ ProductWorkOrder productWorkOrder = productWorkOrderMapper.selectById(dto.getWorkOrderId());
+
SysUser user = userMapper.selectUserById(dto.getUserId());
ProductionProductMain productionProductMain = new ProductionProductMain();
//褰撳墠宸ヨ壓璺嚎瀵瑰簲鐨勫伐搴忚鎯�
@@ -159,8 +162,8 @@
productionProductMain.setAuditUserId(dto.getAuditUserId());
productionProductMain.setAuditUserName(dto.getAuditUserName());
productionProductMain.setStatus(0);
- productionProductMain.setStartTime(dto.getStartTime());
- productionProductMain.setEndTime(dto.getEndTime());
+ productionProductMain.setStartTime(productWorkOrder.getStartProductTime());
+ productionProductMain.setEndTime(now);
productionProductMain.setDeviceId(productProcess.getDeviceId());
productionProductMain.setDeviceName(productProcess.getDeviceName());
productionProductMainMapper.insert(productionProductMain);
@@ -197,7 +200,6 @@
if (productQty.compareTo(BigDecimal.ZERO) > 0) {
List<ProductProcessRouteItem> productProcessRouteItems = productProcessRouteItemMapper.selectList(Wrappers.<ProductProcessRouteItem>lambdaQuery().eq(ProductProcessRouteItem::getProductRouteId, productProcessRouteItem.getProductRouteId()));
/*鏇存柊宸ュ崟鍜岀敓浜ц鍗�*/
- ProductWorkOrder productWorkOrder = productWorkOrderMapper.selectById(dto.getWorkOrderId());
productWorkOrder.setCompleteQuantity(productWorkOrder.getCompleteQuantity().add(productQty));
if (ObjectUtils.isNull(productWorkOrder.getActualStartTime())) {
productWorkOrder.setActualStartTime(LocalDate.now());//瀹為檯寮�濮嬫椂闂�
@@ -205,17 +207,18 @@
if (productWorkOrder.getCompleteQuantity().compareTo(productWorkOrder.getPlanQuantity()) == 0) {
productWorkOrder.setActualEndTime(LocalDate.now());//瀹為檯缁撴潫鏃堕棿
}
+ productWorkOrder.setEndProductTime(now);
productWorkOrderMapper.updateById(productWorkOrder);
//鐢熶骇璁㈠崟
ProductOrder productOrder = productOrderMapper.selectById(productWorkOrder.getProductOrderId());
if (ObjectUtils.isNull(productOrder.getStartTime())) {
- productOrder.setStartTime(LocalDateTime.now());//寮�濮嬫椂闂�
+ productOrder.setStartTime(now);//寮�濮嬫椂闂�
}
if (productProcessRouteItem.getDragSort() == productProcessRouteItems.size()) {
//濡傛灉鏄渶鍚庝竴閬撳伐搴忔姤宸ヤ箣鍚庣敓浜ц鍗曞畬鎴愭暟閲�+
productOrder.setCompleteQuantity(productOrder.getCompleteQuantity().add(productQty));
if (productOrder.getCompleteQuantity().compareTo(productOrder.getQuantity()) == 0) {
- productOrder.setEndTime(LocalDateTime.now());//缁撴潫鏃堕棿
+ productOrder.setEndTime(now);//缁撴潫鏃堕棿
}
}
productOrderMapper.updateById(productOrder);
diff --git a/src/main/resources/mapper/production/ProductOrderMapper.xml b/src/main/resources/mapper/production/ProductOrderMapper.xml
index 6b993bf..6f99253 100644
--- a/src/main/resources/mapper/production/ProductOrderMapper.xml
+++ b/src/main/resources/mapper/production/ProductOrderMapper.xml
@@ -22,6 +22,7 @@
pm.unit,
ppr.process_route_code,
pb.bom_no,
+ sl.id as sales_ledger_id,
ROUND(po.complete_quantity / po.quantity * 100, 2) AS completionStatus,
DATEDIFF(sl.delivery_date, CURDATE()) AS delivery_days_diff,
sl.delivery_date,
diff --git a/src/main/resources/mapper/production/ProductionPrintOrderMapper.xml b/src/main/resources/mapper/production/ProductionPrintOrderMapper.xml
new file mode 100644
index 0000000..2f3d49b
--- /dev/null
+++ b/src/main/resources/mapper/production/ProductionPrintOrderMapper.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.production.mapper.ProductionPrintOrderMapper">
+
+</mapper>
--
Gitblit v1.9.3