diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/domain/Order.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/domain/Order.java index 94e696f..23c029b 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/domain/Order.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/domain/Order.java @@ -52,4 +52,14 @@ public class Order extends BaseEntity @Excel(name = "订单状态", readConverterExp = "1=拟定,2=已发布,3=完工") @ApiModelProperty("订单状态") private String status; + + @DateTimeFormat(pattern = "yyyy-MM-dd") + @Excel(name = "订单日期", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty("订单日期") + private LocalDate orderDate; + + @Excel(name = "用料") + @ApiModelProperty("用料") + @Size(max = 200, message = "用料长度不能超过200个字符") + private String material; } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/domain/OrderQuery.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/domain/OrderQuery.java index a4d2836..8087cf9 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/domain/OrderQuery.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/domain/OrderQuery.java @@ -2,7 +2,9 @@ package com.ruoyi.bst.order.domain; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDate; import java.util.List; /** @@ -15,4 +17,11 @@ public class OrderQuery extends OrderVO{ @ApiModelProperty("状态列表") private List statusList; + @DateTimeFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty("订单日期范围") + private List orderDateRange; + + @DateTimeFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty("交货日期范围") + private List deliveryDateRange; } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/domain/enums/OrderStatus.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/domain/enums/OrderStatus.java index 9d40318..af2c7df 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/domain/enums/OrderStatus.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/domain/enums/OrderStatus.java @@ -23,7 +23,7 @@ public enum OrderStatus { // 允许修改的列表 public static List canEdit() { - return asList(PROPOSED); + return asList(PROPOSED, RELEASED); } // 允许发布的列表 diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/mapper/OrderMapper.xml b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/mapper/OrderMapper.xml index 18102bb..f2531d3 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/mapper/OrderMapper.xml +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/mapper/OrderMapper.xml @@ -18,7 +18,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bo.create_by, bo.create_time, bo.deleted, - bo.status + bo.status, + bo.order_date, + bo.material from bst_order bo @@ -31,12 +33,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bo.deleted = #{query.deleted} and bo.deleted = false and bo.status = #{query.status} + and bo.material like concat('%', #{query.material}, '%') and bo.status in #{item} + + and bo.order_date >= #{query.orderDateRange[0]} and bo.order_date <= #{query.orderDateRange[1]} + + + and bo.delivery_date >= #{query.deliveryDateRange[0]} and bo.delivery_date <= #{query.deliveryDateRange[1]} + ${query.params.dataScope} @@ -65,6 +74,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_time, deleted, `status`, + order_date, + material, #{orderNo}, @@ -77,6 +88,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{createTime}, #{deleted}, #{status}, + #{orderDate}, + #{material}, @@ -109,6 +122,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_time = #{data.createTime}, deleted = #{data.deleted}, `status` = #{data.status}, + order_date = #{data.orderDate}, + material = #{data.material}, diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/service/impl/OrderConverterImpl.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/service/impl/OrderConverterImpl.java index 55056dd..d01ded9 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/service/impl/OrderConverterImpl.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/service/impl/OrderConverterImpl.java @@ -44,6 +44,9 @@ public class OrderConverterImpl implements OrderConverter { bo.setCustomer(data.getCustomer()); bo.setCreateBy(user.getNickName()); bo.setRemark(data.getRemark()); + bo.setOrderNo(data.getOrderNo()); + bo.setOrderDate(data.getOrderDate()); + bo.setMaterial(data.getMaterial()); if (submit) { bo.setStatus(OrderStatus.RELEASED.getStatus()); } else { @@ -67,6 +70,9 @@ public class OrderConverterImpl implements OrderConverter { bo.setNum(data.getNum()); bo.setCustomer(data.getCustomer()); bo.setRemark(data.getRemark()); + bo.setOrderNo(data.getOrderNo()); + bo.setOrderDate(data.getOrderDate()); + bo.setMaterial(data.getMaterial()); if (submit) { bo.setStatus(OrderStatus.RELEASED.getStatus()); } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/service/impl/OrderServiceImpl.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/service/impl/OrderServiceImpl.java index 21cde18..4c1dbf3 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/service/impl/OrderServiceImpl.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/order/service/impl/OrderServiceImpl.java @@ -19,7 +19,6 @@ import com.ruoyi.bst.prodProcess.domain.ProdProcessVO; import com.ruoyi.bst.prodProcess.service.IProdProcessService; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ServiceUtil; -import com.ruoyi.common.utils.SnowFlakeUtil; import com.ruoyi.common.utils.collection.CollectionUtils; import com.ruoyi.common.utils.collection.DiffListVO; import org.springframework.beans.factory.annotation.Autowired; @@ -94,7 +93,6 @@ public class OrderServiceImpl implements OrderService @Override public int insertOrder(Order order) { - order.setOrderNo(String.valueOf(SnowFlakeUtil.newId())); order.setCreateTime(DateUtils.getNowDate()); return orderMapper.insertOrder(order); } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/domain/OrderProd.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/domain/OrderProd.java index d5e6b3c..1f50f94 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/domain/OrderProd.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/domain/OrderProd.java @@ -72,4 +72,23 @@ public class OrderProd extends BaseEntity @ApiModelProperty("排序") private Integer sort; + @Excel(name = "处理方式") + @ApiModelProperty("处理方式") + @Size(max = 50, message = "处理方式长度不能超过50个字符") + private String handleWay; + + @Excel(name = "效果") + @ApiModelProperty("效果") + @Size(max = 50, message = "效果长度不能超过50个字符") + private String effect; + + @Excel(name = "颜色") + @ApiModelProperty("颜色") + @Size(max = 50, message = "颜色长度不能超过50个字符") + private String color; + + @Excel(name = "盖子颜色") + @ApiModelProperty("盖子颜色") + @Size(max = 50, message = "盖子颜色长度不能超过50个字符") + private String coverColor; } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/domain/OrderProdQuery.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/domain/OrderProdQuery.java index c98ca2b..69e15d8 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/domain/OrderProdQuery.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/domain/OrderProdQuery.java @@ -17,5 +17,4 @@ public class OrderProdQuery extends OrderProdVO{ @ApiModelProperty("是否拼接明细") private Boolean assembleProcessList; - } diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/mapper/OrderProdMapper.xml b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/mapper/OrderProdMapper.xml index bc8128d..96a45a6 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/mapper/OrderProdMapper.xml +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/mapper/OrderProdMapper.xml @@ -21,6 +21,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bop.deleted, bop.create_time, bop.sort, + bop.handle_way, + bop.effect, + bop.color, + bop.cover_color, bo.order_no as order_no from bst_order_prod bop left join bst_order bo on bo.id = bop.order_id @@ -38,6 +42,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bop.deleted = #{query.deleted} and bop.deleted = false and bo.order_no like concat('%', #{query.orderNo}, '%') + and bop.handle_way like concat('%', #{query.handleWay}, '%') + and bop.effect like concat('%', #{query.effect}, '%') + and bop.color like concat('%', #{query.color}, '%') + and bop.cover_color like concat('%', #{query.coverColor}, '%') and bop.order_id in @@ -74,6 +82,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" deleted, create_time, sort, + handle_way, + effect, + color, + cover_color, #{orderId}, @@ -88,6 +100,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{deleted}, #{createTime}, #{sort}, + #{handleWay}, + #{effect}, + #{color}, + #{coverColor}, @@ -106,6 +122,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" deleted, create_time, sort, + handle_way, + effect, + color, + cover_color, values @@ -134,6 +154,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" default, #{i.sort}, default, + #{i.handleWay}, + default, + #{i.effect}, + default, + #{i.color}, + default, + #{i.coverColor}, + default, @@ -261,6 +289,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + WHEN #{item.id} THEN #{item.handleWay} + + + WHEN #{item.id} THEN `handle_way` + + + + + + + WHEN #{item.id} THEN #{item.effect} + + + WHEN #{item.id} THEN `effect` + + + + + + + WHEN #{item.id} THEN #{item.color} + + + WHEN #{item.id} THEN `color` + + + + + + + WHEN #{item.id} THEN #{item.coverColor} + + + WHEN #{item.id} THEN `cover_color` + + + where id in @@ -305,6 +373,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" deleted = #{data.deleted}, create_time = #{data.createTime}, sort = #{data.sort}, + handle_way = #{data.handleWay}, + effect = #{data.effect}, + color = #{data.color}, + cover_color = #{data.coverColor}, diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/service/impl/OrderProdConverterImpl.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/service/impl/OrderProdConverterImpl.java index bf88753..22ae372 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/service/impl/OrderProdConverterImpl.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/orderProd/service/impl/OrderProdConverterImpl.java @@ -49,6 +49,10 @@ public class OrderProdConverterImpl implements OrderProdConverter { bo.setNum(prod.getNum()); bo.setRemark(prod.getRemark()); bo.setSort(prod.getSort()); + bo.setHandleWay(prod.getHandleWay()); + bo.setEffect(prod.getEffect()); + bo.setColor(prod.getColor()); + bo.setCoverColor(prod.getCoverColor()); bo.setProcessList(prodProcessConverter.toBOListByCreate(prod.getProcessList())); boList.add(bo); @@ -79,6 +83,10 @@ public class OrderProdConverterImpl implements OrderProdConverter { bo.setNum(prod.getNum()); bo.setRemark(prod.getRemark()); bo.setSort(prod.getSort()); + bo.setHandleWay(prod.getHandleWay()); + bo.setEffect(prod.getEffect()); + bo.setColor(prod.getColor()); + bo.setCoverColor(prod.getCoverColor()); bo.setProcessList(prodProcessConverter.toBOListByUpdate(prod.getProcessList())); boList.add(bo); diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/domain/ProdProcess.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/domain/ProdProcess.java index 4752a40..2996724 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/domain/ProdProcess.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/domain/ProdProcess.java @@ -8,7 +8,6 @@ import lombok.Data; import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; import java.math.BigDecimal; /** @@ -44,26 +43,6 @@ public class ProdProcess extends BaseEntity @NotNull(message = "是否最终工序不能为空", groups = {ValidGroup.Create.class}) private Boolean isEnd; - @Excel(name = "处理方式") - @ApiModelProperty("处理方式") - @Size(max = 50, message = "处理方式长度不能超过50个字符") - private String handleWay; - - @Excel(name = "效果") - @ApiModelProperty("效果") - @Size(max = 50, message = "效果长度不能超过50个字符") - private String effect; - - @Excel(name = "颜色") - @ApiModelProperty("颜色") - @Size(max = 50, message = "颜色长度不能超过50个字符") - private String color; - - @Excel(name = "盖子颜色") - @ApiModelProperty("盖子颜色") - @Size(max = 50, message = "盖子颜色长度不能超过50个字符") - private String coverColor; - @Excel(name = "排序") @ApiModelProperty("排序") private Integer sort; diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/domain/ProdProcessVO.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/domain/ProdProcessVO.java index 558f5a6..75ce7fd 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/domain/ProdProcessVO.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/domain/ProdProcessVO.java @@ -1,5 +1,6 @@ package com.ruoyi.bst.prodProcess.domain; +import com.ruoyi.common.annotation.Excel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -22,18 +23,40 @@ public class ProdProcessVO extends ProdProcess{ @ApiModelProperty("订单状态") private String orderStatus; + @ApiModelProperty("订单图片") + private String orderPicture; + @ApiModelProperty("生产车间名称") private String deptName; @ApiModelProperty("订单产品名称") private String orderProdName; + @ApiModelProperty("产品图片") + private String orderProdPicture; + @ApiModelProperty("总上报数") private BigDecimal reportNum; @ApiModelProperty("有效清点数") private BigDecimal storeNum; + @Excel(name = "处理方式") + @ApiModelProperty("处理方式") + private String handleWay; + + @Excel(name = "效果") + @ApiModelProperty("效果") + private String effect; + + @Excel(name = "颜色") + @ApiModelProperty("颜色") + private String color; + + @Excel(name = "盖子颜色") + @ApiModelProperty("盖子颜色") + private String coverColor; + @ApiModelProperty("进度") public BigDecimal getProgress() { if (this.storeNum == null || this.getNum() == null) { diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/mapper/ProdProcessMapper.xml b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/mapper/ProdProcessMapper.xml index cf030ad..ac995bd 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/mapper/ProdProcessMapper.xml +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/mapper/ProdProcessMapper.xml @@ -13,10 +13,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bpp.dept_id, bpp.num, bpp.is_end, - bpp.handle_way, - bpp.effect, - bpp.color, - bpp.cover_color, bpp.remark, bpp.create_time, bpp.deleted, @@ -24,7 +20,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bpp.dept_process, bop.name as order_prod_name, bop.order_id as order_id, + bop.handle_way, + bop.effect, + bop.color, + bop.cover_color, + bop.picture as order_prod_picture, bo.order_no as order_no, + bo.picture as order_picture, bo.status as order_status, sd.dept_name as dept_name from bst_prod_process bpp @@ -38,10 +40,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bpp.order_prod_id = #{query.orderProdId} and bpp.dept_id = #{query.deptId} and bpp.is_end = #{query.isEnd} - and bpp.handle_way like concat('%', #{query.handleWay}, '%') - and bpp.effect like concat('%', #{query.effect}, '%') - and bpp.color like concat('%', #{query.color}, '%') - and bpp.cover_color like concat('%', #{query.coverColor}, '%') + and bop.handle_way like concat('%', #{query.handleWay}, '%') + and bop.effect like concat('%', #{query.effect}, '%') + and bop.color like concat('%', #{query.color}, '%') + and bop.cover_color like concat('%', #{query.coverColor}, '%') and bpp.remark like concat('%', #{query.remark}, '%') and bpp.deleted = #{query.deleted} and bpp.deleted = false @@ -97,10 +99,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" dept_id, num, is_end, - handle_way, - effect, - color, - cover_color, remark, create_time, deleted, @@ -112,10 +110,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{deptId}, #{num}, #{isEnd}, - #{handleWay}, - #{effect}, - #{color}, - #{coverColor}, #{remark}, #{createTime}, #{deleted}, @@ -131,10 +125,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" dept_id, num, is_end, - handle_way, - effect, - color, - cover_color, remark, create_time, deleted, @@ -152,14 +142,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" default, #{i.isEnd}, default, - #{i.handleWay}, - default, - #{i.effect}, - default, - #{i.color}, - default, - #{i.coverColor}, - default, #{i.remark}, default, #{i.createTime}, @@ -217,46 +199,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - - - WHEN #{item.id} THEN #{item.handleWay} - - - WHEN #{item.id} THEN `handle_way` - - - - - - - WHEN #{item.id} THEN #{item.effect} - - - WHEN #{item.id} THEN `effect` - - - - - - - WHEN #{item.id} THEN #{item.color} - - - WHEN #{item.id} THEN `color` - - - - - - - WHEN #{item.id} THEN #{item.coverColor} - - - WHEN #{item.id} THEN `cover_color` - - - @@ -344,10 +286,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" dept_id = #{data.deptId}, num = #{data.num}, is_end = #{data.isEnd}, - handle_way = #{data.handleWay}, - effect = #{data.effect}, - color = #{data.color}, - cover_color = #{data.coverColor}, remark = #{data.remark}, create_time = #{data.createTime}, deleted = #{data.deleted}, diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/service/impl/ProdProcessConverterImpl.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/service/impl/ProdProcessConverterImpl.java index 4c12294..45d36af 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/service/impl/ProdProcessConverterImpl.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/bst/prodProcess/service/impl/ProdProcessConverterImpl.java @@ -28,12 +28,9 @@ public class ProdProcessConverterImpl implements ProdProcessConverter { bo.setDeptId(process.getDeptId()); bo.setNum(process.getNum()); bo.setIsEnd(process.getIsEnd()); - bo.setHandleWay(process.getHandleWay()); - bo.setEffect(process.getEffect()); - bo.setColor(process.getColor()); - bo.setCoverColor(process.getCoverColor()); bo.setSort(process.getSort()); bo.setDeptProcess(process.getDeptProcess()); + bo.setRemark(process.getRemark()); boList.add(bo); } @@ -54,12 +51,9 @@ public class ProdProcessConverterImpl implements ProdProcessConverter { bo.setDeptId(process.getDeptId()); bo.setNum(process.getNum()); bo.setIsEnd(process.getIsEnd()); - bo.setHandleWay(process.getHandleWay()); - bo.setEffect(process.getEffect()); - bo.setColor(process.getColor()); - bo.setCoverColor(process.getCoverColor()); bo.setSort(process.getSort()); bo.setDeptProcess(process.getDeptProcess()); + bo.setRemark(process.getRemark()); boList.add(bo); }