瀏覽代碼

手动模式

laoyao 3 年之前
父節點
當前提交
e889af7b5a

+ 16 - 0
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/operationManagementCenter/OrderProductMapper.xml

@@ -54,4 +54,20 @@
         ) s ${ew.customSqlSegment}
     </select>
 
+
+    <select id="getList" parameterType="com.github.zuihou.business.operationManagementCenter.entity.OrderProduct" resultType="com.github.zuihou.business.operationManagementCenter.entity.OrderProduct">
+        select a.*,b.name,b.no as bomNo,b.specifications as specifications,b.model,b.brand,ifnull(c.planNum,0) as planNum,
+        b.parts_no partsNo,b.parts_alias partsAlias,b.bom_alias bomAlias,
+        (ifnull(a.bom_num,0)-ifnull(c.planNum,0)) as stayPlanNum,d.delivery_time as orderDeliveryTime from imcs_o_order_product a
+        left join imcs_b_bom b on a.bom_id = b.id
+        left join (
+        select order_product_id,count(1) as planNum from imcs_p_plan_product where 1=1 group by order_product_id
+        )c on a.id= c.order_product_id
+        left join imcs_o_order d on a.order_id = d.id
+        where 1=1
+        <if test="orderId != '' and orderId != null " >
+            and a.order_id = #{orderId}
+        </if>
+    </select>
+
 </mapper>

+ 22 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/operationManagementCenter/entity/OrderProduct.java

@@ -184,6 +184,28 @@ public class OrderProduct extends Entity<Long> {
     private String deliveryTime_ed;
 
 
+    @ApiModelProperty(value = "零件编号")
+    @Length(max = 128, message = "零件编号长度不能超过128")
+    @TableField(exist = false)
+    @Excel(name = "零件编号")
+    private String partsNo;
+
+
+    @ApiModelProperty(value = "零件代号")
+    @Length(max = 128, message = "零件代号长度不能超过128")
+    @TableField(exist = false)
+    @Excel(name = "零件代号")
+    private String partsAlias;
+
+
+
+    @ApiModelProperty(value = "产品代号")
+    @Length(max = 128, message = "产品代号长度不能超过128")
+    @TableField(exist = false)
+    @Excel(name = "产品代号")
+    private String bomAlias;
+
+
 
     @Builder
     public OrderProduct(Long id, LocalDateTime createTime, LocalDateTime updateTime,