no message
							parent
							
								
									29a316b8df
								
							
						
					
					
						commit
						c67b81d243
					
				| 
						 | 
				
			
			@ -27,6 +27,6 @@ public class LocationQueryForm extends PageParam {
 | 
			
		|||
    private String status;
 | 
			
		||||
 | 
			
		||||
    @Schema(description = "是否启用")
 | 
			
		||||
    private String disabledFlag;
 | 
			
		||||
    private Boolean disabledFlag;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,6 +27,6 @@ public class StockQueryForm extends PageParam {
 | 
			
		|||
    private String status;
 | 
			
		||||
 | 
			
		||||
    @Schema(description = "是否启用")
 | 
			
		||||
    private String disabledFlag;
 | 
			
		||||
    private Boolean disabledFlag;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,7 +14,7 @@ public enum AsnOrderStatusEnum implements BaseEnum {
 | 
			
		|||
 | 
			
		||||
    APPROVED("APPROVED", "已审核"),
 | 
			
		||||
 | 
			
		||||
    IN_PROGRESS("IN_PROGRESS", "入库中"),
 | 
			
		||||
    PARTIALLY_IN("PARTIALLY_IN", "部分入库"),
 | 
			
		||||
 | 
			
		||||
    COMPLETED("COMPLETED", "已完成"),
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,4 +20,10 @@ public class AsnQueryForm extends PageParam {
 | 
			
		|||
    @Schema(description = "客户订单号")
 | 
			
		||||
    private String customerNumber;
 | 
			
		||||
 | 
			
		||||
    @Schema(description = "状态")
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    @Schema(description = "单据类型")
 | 
			
		||||
    private String orderType;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,7 @@ import net.lab1024.sa.base.common.domain.PageParam;
 | 
			
		|||
import io.swagger.v3.oas.annotations.media.Schema;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import org.hibernate.validator.constraints.Length;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 入库明细 分页查询表单
 | 
			
		||||
| 
						 | 
				
			
			@ -20,7 +21,8 @@ public class AsnDetailQueryForm extends PageParam {
 | 
			
		|||
    @Schema(description = "入库单")
 | 
			
		||||
    private Long asnId;
 | 
			
		||||
 | 
			
		||||
    @Schema(description = "物料")
 | 
			
		||||
    private Long itemId;
 | 
			
		||||
    @Schema(description = "关键字")
 | 
			
		||||
    @Length(max = 200, message = "关键字最多200字符")
 | 
			
		||||
    private String keywords;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -191,8 +191,8 @@ public class AsnDetailServiceImpl implements AsnDetailService {
 | 
			
		|||
        String status = asn.getStatus();
 | 
			
		||||
        if (orderQuantity.compareTo(BigDecimal.ZERO) >= 0 && receivedQuantity.compareTo(BigDecimal.ZERO) == 0) {
 | 
			
		||||
            status = AsnOrderStatusEnum.CREATED.getValue();
 | 
			
		||||
        } else if (SmartBigDecimalUtil.subtract(orderQuantity, receivedQuantity, 2).compareTo(BigDecimal.ZERO) > 0) {
 | 
			
		||||
            status = AsnOrderStatusEnum.IN_PROGRESS.getValue();
 | 
			
		||||
        } else if (SmartBigDecimalUtil.subtract(orderQuantity, receivedQuantity, 2).compareTo(BigDecimal.ZERO) > 0 && receivedQuantity.compareTo(BigDecimal.ZERO) > 0) {
 | 
			
		||||
            status = AsnOrderStatusEnum.PARTIALLY_IN.getValue();
 | 
			
		||||
        } else if (SmartBigDecimalUtil.subtract(orderQuantity, receivedQuantity, 2).compareTo(BigDecimal.ZERO) == 0 && receivedQuantity.compareTo(BigDecimal.ZERO) > 0) {
 | 
			
		||||
            status = AsnOrderStatusEnum.COMPLETED.getValue();
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,10 +9,7 @@
 | 
			
		|||
        t_address.person,
 | 
			
		||||
        t_address.telephone,
 | 
			
		||||
        t_address.address,
 | 
			
		||||
        t_address.create_time,
 | 
			
		||||
        t_address.create_user_id,
 | 
			
		||||
        t_address.create_user_name,
 | 
			
		||||
        t_address.update_time
 | 
			
		||||
        t_address.create_time
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
    <!-- 分页查询 -->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,10 +9,7 @@
 | 
			
		|||
        t_area.area_name,
 | 
			
		||||
        t_area.remark,
 | 
			
		||||
        t_area.disabled_flag,
 | 
			
		||||
        t_area.create_user_id,
 | 
			
		||||
        t_area.create_user_name,
 | 
			
		||||
        t_area.create_time,
 | 
			
		||||
        t_area.update_time
 | 
			
		||||
        t_area.create_time
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
    <!-- 分页查询 -->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,10 +12,7 @@
 | 
			
		|||
        t_customer.address,
 | 
			
		||||
        t_customer.remark,
 | 
			
		||||
        t_customer.disabled_flag,
 | 
			
		||||
        t_customer.create_time,
 | 
			
		||||
        t_customer.create_user_id,
 | 
			
		||||
        t_customer.create_user_name,
 | 
			
		||||
        t_customer.update_time
 | 
			
		||||
        t_customer.create_time
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
    <!-- 分页查询 -->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,7 +4,7 @@
 | 
			
		|||
 | 
			
		||||
    <!-- 查询结果列 -->
 | 
			
		||||
    <sql id="base_columns">
 | 
			
		||||
        t_item. item_id,
 | 
			
		||||
        t_item.item_id,
 | 
			
		||||
        t_item.item_code,
 | 
			
		||||
        t_item.item_name,
 | 
			
		||||
        t_item.unit,
 | 
			
		||||
| 
						 | 
				
			
			@ -12,10 +12,7 @@
 | 
			
		|||
        t_item.disabled_flag,
 | 
			
		||||
        t_item.item_type,
 | 
			
		||||
        t_item.remark,
 | 
			
		||||
        t_item.create_user_id,
 | 
			
		||||
        t_item.create_user_name,
 | 
			
		||||
        t_item.create_time,
 | 
			
		||||
        t_item.update_time
 | 
			
		||||
        t_item.create_time
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
    <!-- 分页查询 -->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,10 +15,7 @@
 | 
			
		|||
        t_location.location_cow,
 | 
			
		||||
        t_location.location_type,
 | 
			
		||||
        t_location.remark,
 | 
			
		||||
        t_location.create_user_id,
 | 
			
		||||
        t_location.create_user_name,
 | 
			
		||||
        t_location.create_time,
 | 
			
		||||
        t_location.update_time
 | 
			
		||||
        t_location.create_time
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
    <!-- 分页查询 -->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,10 +11,7 @@
 | 
			
		|||
        t_stock.disabled_flag,
 | 
			
		||||
        t_stock.stock_type,
 | 
			
		||||
        t_stock.remark,
 | 
			
		||||
        t_stock.create_user_id,
 | 
			
		||||
        t_stock.create_user_name,
 | 
			
		||||
        t_stock.create_time,
 | 
			
		||||
        t_stock.update_time
 | 
			
		||||
        t_stock.create_time
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
    <!-- 分页查询 -->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,10 +10,7 @@
 | 
			
		|||
        t_inventory.stock_id,
 | 
			
		||||
        t_inventory.quantity,
 | 
			
		||||
        t_inventory.queued_quantity,
 | 
			
		||||
        t_inventory.create_time,
 | 
			
		||||
        t_inventory.create_user_id,
 | 
			
		||||
        t_inventory.create_user_name,
 | 
			
		||||
        t_inventory.update_time
 | 
			
		||||
        t_inventory.create_time
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
    <!-- 分页查询 -->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,10 +15,7 @@
 | 
			
		|||
        t_item_key.prop_c6,
 | 
			
		||||
        t_item_key.prop_d1,
 | 
			
		||||
        t_item_key.prop_d2,
 | 
			
		||||
        t_item_key.create_user_id,
 | 
			
		||||
        t_item_key.create_user_name,
 | 
			
		||||
        t_item_key.create_time,
 | 
			
		||||
        t_item_key.update_time
 | 
			
		||||
        t_item_key.create_time
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
    <!-- 分页查询 -->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,10 +17,7 @@
 | 
			
		|||
        t_asn.order_quantity,
 | 
			
		||||
        t_asn.received_quantity,
 | 
			
		||||
        t_asn.order_date,
 | 
			
		||||
        t_asn.create_time,
 | 
			
		||||
        t_asn.create_user_id,
 | 
			
		||||
        t_asn.create_user_name,
 | 
			
		||||
        t_asn.update_time
 | 
			
		||||
        t_asn.create_time
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
    <!-- 分页查询 -->
 | 
			
		||||
| 
						 | 
				
			
			@ -33,6 +30,14 @@
 | 
			
		|||
            <if test="queryForm.customerNumber != null and queryForm.customerNumber != ''">
 | 
			
		||||
                AND INSTR(t_asn.customer_number,#{queryForm.customerNumber})
 | 
			
		||||
            </if>
 | 
			
		||||
            <!--单据类型-->
 | 
			
		||||
            <if test="queryForm.orderType != null and queryForm.orderType != ''">
 | 
			
		||||
                AND t_asn.order_type=#{queryForm.orderType}
 | 
			
		||||
            </if>
 | 
			
		||||
            <!--状态-->
 | 
			
		||||
            <if test="queryForm.status != null and queryForm.status != ''">
 | 
			
		||||
                AND t_asn.status=#{queryForm.status}
 | 
			
		||||
            </if>
 | 
			
		||||
        </where>
 | 
			
		||||
        ORDER BY t_asn.asn_id DESC
 | 
			
		||||
    </select>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,27 +9,53 @@
 | 
			
		|||
        t_asn_detail.item_id,
 | 
			
		||||
        t_asn_detail.order_quantity,
 | 
			
		||||
        t_asn_detail.received_quantity,
 | 
			
		||||
        t_asn_detail.create_time,
 | 
			
		||||
        t_asn_detail.create_user_id,
 | 
			
		||||
        t_asn_detail.create_user_name,
 | 
			
		||||
        t_asn_detail.update_time
 | 
			
		||||
        t_asn_detail.create_time
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
    <!-- 分页查询 -->
 | 
			
		||||
    <select id="queryPage" resultType="net.lab1024.sa.admin.module.business.wms.receive.asnDetail.domain.vo.AsnDetailVO">
 | 
			
		||||
        SELECT
 | 
			
		||||
        <include refid="base_columns"/>
 | 
			
		||||
        FROM t_asn_detail
 | 
			
		||||
        <where>
 | 
			
		||||
            <!--入库单-->
 | 
			
		||||
            <if test="queryForm.asnId != null ">
 | 
			
		||||
                AND t_asn_detail.asn_id=#{queryForm.asnId}
 | 
			
		||||
            </if>
 | 
			
		||||
            <!--物料-->
 | 
			
		||||
            <if test="queryForm.itemId != null ">
 | 
			
		||||
                AND t_asn_detail.item_id=#{queryForm.itemId}
 | 
			
		||||
            </if>
 | 
			
		||||
        </where>
 | 
			
		||||
    <select id="queryPage"
 | 
			
		||||
            resultType="net.lab1024.sa.admin.module.business.wms.receive.asnDetail.domain.vo.AsnDetailVO">
 | 
			
		||||
        <choose>
 | 
			
		||||
            <when test="queryForm.keywords != null and queryForm.keywords != ''">
 | 
			
		||||
                SELECT
 | 
			
		||||
                <include refid="base_columns"/>
 | 
			
		||||
                FROM t_asn_detail
 | 
			
		||||
                JOIN t_item ON t_asn_detail.item_id = t_item.item_id
 | 
			
		||||
                <where>
 | 
			
		||||
                    t_item.item_code LIKE CONCAT(#{queryForm.keywords}, '%')
 | 
			
		||||
                    <if test="queryForm.asnId != null">
 | 
			
		||||
                        AND t_asn_detail.asn_id = #{queryForm.asnId}
 | 
			
		||||
                    </if>
 | 
			
		||||
                </where>
 | 
			
		||||
                UNION ALL
 | 
			
		||||
                SELECT
 | 
			
		||||
                <include refid="base_columns"/>
 | 
			
		||||
                FROM t_asn_detail
 | 
			
		||||
                JOIN t_item ON t_asn_detail.item_id = t_item.item_id
 | 
			
		||||
                <where>
 | 
			
		||||
                    t_item.item_name LIKE CONCAT(#{queryForm.keywords}, '%')
 | 
			
		||||
                    <if test="queryForm.asnId != null">
 | 
			
		||||
                        AND t_asn_detail.asn_id = #{queryForm.asnId}
 | 
			
		||||
                    </if>
 | 
			
		||||
                    AND NOT EXISTS (
 | 
			
		||||
                    SELECT 1
 | 
			
		||||
                    FROM t_item
 | 
			
		||||
                    WHERE t_item.item_id = t_asn_detail.item_id
 | 
			
		||||
                    AND t_item.item_code LIKE CONCAT(#{queryForm.keywords}, '%')
 | 
			
		||||
                    )
 | 
			
		||||
                </where>
 | 
			
		||||
            </when>
 | 
			
		||||
            <otherwise>
 | 
			
		||||
                SELECT
 | 
			
		||||
                <include refid="base_columns"/>
 | 
			
		||||
                FROM t_asn_detail
 | 
			
		||||
                <where>
 | 
			
		||||
                    <if test="queryForm.asnId != null">
 | 
			
		||||
                        t_asn_detail.asn_id = #{queryForm.asnId}
 | 
			
		||||
                    </if>
 | 
			
		||||
                </where>
 | 
			
		||||
            </otherwise>
 | 
			
		||||
        </choose>
 | 
			
		||||
    </select>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,10 +19,7 @@
 | 
			
		|||
        t_pick.picked_quantity,
 | 
			
		||||
        t_pick.shipped_quantity,
 | 
			
		||||
        t_pick.order_date,
 | 
			
		||||
        t_pick.create_time,
 | 
			
		||||
        t_pick.create_user_id,
 | 
			
		||||
        t_pick.create_user_name,
 | 
			
		||||
        t_pick.update_time
 | 
			
		||||
        t_pick.create_time
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
    <!-- 分页查询 -->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,10 +13,7 @@
 | 
			
		|||
        t_pick_detail.allocated_quantity,
 | 
			
		||||
        t_pick_detail.picked_quantity,
 | 
			
		||||
        t_pick_detail.shipped_quantity,
 | 
			
		||||
        t_pick_detail.create_time,
 | 
			
		||||
        t_pick_detail.create_user_id,
 | 
			
		||||
        t_pick_detail.create_user_name,
 | 
			
		||||
        t_pick_detail.update_time
 | 
			
		||||
        t_pick_detail.create_time
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
    <!-- 分页查询 -->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,11 +24,7 @@
 | 
			
		|||
        t_task.inventory_id,
 | 
			
		||||
        t_task.agv_task_id,
 | 
			
		||||
        t_task.be_skip,
 | 
			
		||||
        t_task.create_time,
 | 
			
		||||
        t_task.end_time,
 | 
			
		||||
        t_task.create_user_id,
 | 
			
		||||
        t_task.create_user_name,
 | 
			
		||||
        t_task.update_time
 | 
			
		||||
        t_task.create_time
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
    <!-- 分页查询 -->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue