|
@@ -40,6 +40,8 @@
|
|
|
<result column="production_create_time" property="productionCreateTime" jdbcType="TIMESTAMP" />
|
|
|
<result column="production_update_time" property="productionUpdateTime" jdbcType="TIMESTAMP" />
|
|
|
<result column="contract_name" property="contractName" jdbcType="INTEGER" />
|
|
|
+ <result column="contact_address" property="contactAddress" jdbcType="VARCHAR" />
|
|
|
+ <result column="inspection_time" property="inspectionTime" jdbcType="VARCHAR" />
|
|
|
<collection property="listProductionItem" column="production_id" ofType="ApprovalProductionItem" select="listProductionItem"/>
|
|
|
</resultMap>
|
|
|
|
|
@@ -88,6 +90,7 @@
|
|
|
<result column="item_lack_number" property="itemLackNumber" jdbcType="INTEGER" />
|
|
|
<result column="item_create_time" property="itemCreateTime" jdbcType="TIMESTAMP" />
|
|
|
<result column="item_update_time" property="itemUpdateTime" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="item_external_model" property="itemExternalModel " jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
@@ -141,13 +144,15 @@
|
|
|
production_packing_way,
|
|
|
production_remark,
|
|
|
production_create_time,
|
|
|
- contract_name
|
|
|
+ contract_name,
|
|
|
+ contact_address,
|
|
|
+ inspection_time
|
|
|
)
|
|
|
VALUES
|
|
|
(#{approvalId},#{approvalId},#{applicantOrderNo},#{applicantName},#{applicantId}
|
|
|
,#{orderName},#{companyName},#{contactName},#{contactTel},#{productionDeliveryDate}
|
|
|
,#{productionDeliveryWay},#{productionDeliveryDesc},#{productionState},#{productionPackingWay}
|
|
|
- ,#{productionRemark},NOW(),#{contractName})
|
|
|
+ ,#{productionRemark},NOW(),#{contractName},#{contactAddress},#{inspectionTime})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 批量添加订单项数据-->
|
|
@@ -166,14 +171,15 @@
|
|
|
item_should_storage,
|
|
|
item_actual_storage,
|
|
|
item_lack_number,
|
|
|
- item_create_time
|
|
|
+ item_create_time,
|
|
|
+ item_external_model
|
|
|
)
|
|
|
VALUES
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
(
|
|
|
#{item.productionId},#{item.productId},#{item.itemProductName},#{item.itemColorName},
|
|
|
#{item.itemProductNum},#{item.itemBrandName},#{item.itemProductModel},#{item.itemProductUnit}
|
|
|
- ,#{item.itemProductBoxNumber},#{item.itemShouldStorage},#{item.itemActualStorage},#{item.itemLackNumber},NOW()
|
|
|
+ ,#{item.itemProductBoxNumber},#{item.itemShouldStorage},#{item.itemActualStorage},#{item.itemLackNumber},NOW(),#{item.itemExternalModel}
|
|
|
)
|
|
|
</foreach>
|
|
|
</insert>
|
|
@@ -343,6 +349,18 @@
|
|
|
<if test="approvalCreateTime != null and approvalCreateTime != ''">
|
|
|
AND to_days(#{approvalCreateTime}) = to_days(ai.approval_create_time)
|
|
|
</if>
|
|
|
+ <if test="selectState != null and selectState != '' and selectState == 1">
|
|
|
+ AND ai.approval_status in (1,4)
|
|
|
+ </if>
|
|
|
+ <if test="selectState != null and selectState != '' and selectState == 2">
|
|
|
+ AND ai.approval_status = 2
|
|
|
+ </if>
|
|
|
+ <if test="selectState != null and selectState != '' and selectState == 3">
|
|
|
+ AND ai.approval_status in (2,6)
|
|
|
+ </if>
|
|
|
+ <if test="selectState != null and selectState != '' and selectState == 4">
|
|
|
+ AND ai.approval_status = 7
|
|
|
+ </if>
|
|
|
</where>
|
|
|
group by ai.approval_id
|
|
|
ORDER BY ai.approval_id DESC
|
|
@@ -368,7 +386,9 @@
|
|
|
ap.production_remark,
|
|
|
ap.production_create_time,
|
|
|
ap.production_update_time,
|
|
|
- ap.contract_name
|
|
|
+ ap.contract_name,
|
|
|
+ ap.contact_address,
|
|
|
+ ap.inspection_time
|
|
|
from tb_rst_approval_production ap
|
|
|
where
|
|
|
ap.approval_id = #{approvalId}
|
|
@@ -413,7 +433,8 @@
|
|
|
api.item_actual_storage itemActualStorage,
|
|
|
api.item_lack_number itemLackNumber,
|
|
|
api.item_create_time itemCreateTime,
|
|
|
- api.item_update_time itemUpdateTime
|
|
|
+ api.item_update_time itemUpdateTime,
|
|
|
+ api.item_external_model itemExternalModel
|
|
|
from tb_rst_approval_production_item api
|
|
|
where
|
|
|
api.production_id = #{productionId}
|
|
@@ -434,7 +455,8 @@
|
|
|
aapi.item_product_unit itemProductUnit,
|
|
|
aapi.item_product_box_number itemProductBoxNumber,
|
|
|
aapi.item_create_time itemCreateTime,
|
|
|
- aapi.item_update_time itemUpdateTime
|
|
|
+ aapi.item_update_time itemUpdateTime,
|
|
|
+ aapi.item_external_model itemExternalModel
|
|
|
from tb_rst_approval_apply_pick_item aapi
|
|
|
where
|
|
|
aapi.apply_pick_id = #{applyPickId}
|
|
@@ -556,14 +578,14 @@
|
|
|
brand_name,
|
|
|
product_model,
|
|
|
product_unit,
|
|
|
- product_box_number
|
|
|
-
|
|
|
+ product_box_number,
|
|
|
+ external_model
|
|
|
)
|
|
|
VALUES
|
|
|
(#{approvalId},#{itemId},#{storageState},#{productId}
|
|
|
,#{productName},#{colorName},#{shouldStorage}
|
|
|
,#{actualStorage},#{lackNumber},#{operatingAdminId},NOW(),
|
|
|
- #{brandName},#{productModel},#{productUnit},#{productBoxNumber})
|
|
|
+ #{brandName},#{productModel},#{productUnit},#{productBoxNumber},#{externalModel})
|
|
|
</insert>
|
|
|
|
|
|
<!--查询单个审批产品项信息-->
|
|
@@ -583,7 +605,8 @@
|
|
|
api.item_actual_storage itemActualStorage,
|
|
|
api.item_lack_number itemLackNumber,
|
|
|
api.item_create_time itemCreateTime,
|
|
|
- api.item_update_time itemUpdateTime
|
|
|
+ api.item_update_time itemUpdateTime,
|
|
|
+ api.item_external_model itemExternalModel
|
|
|
from tb_rst_approval_production_item api
|
|
|
where
|
|
|
api.item_id = #{itemId}
|
|
@@ -609,7 +632,9 @@
|
|
|
ap.production_remark,
|
|
|
ap.production_create_time,
|
|
|
ap.production_update_time,
|
|
|
- ap.contract_name
|
|
|
+ ap.contract_name,
|
|
|
+ ap.contact_address,
|
|
|
+ ap.inspection_time
|
|
|
from tb_rst_approval_production ap
|
|
|
where
|
|
|
ap.approval_id = #{approvalId}
|
|
@@ -681,9 +706,31 @@
|
|
|
brand_name brandName,
|
|
|
product_model productModel,
|
|
|
product_unit productUnit,
|
|
|
- product_box_number productBoxNumber
|
|
|
+ product_box_number productBoxNumber,
|
|
|
+ external_model externalModel
|
|
|
from tb_rst_approval_inventory_records
|
|
|
where
|
|
|
approval_id = #{approvalId}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getApprovalAuthority" parameterType="Integer" resultType="AdminApprovalAuthority">
|
|
|
+ select * from tb_rst_sys_admin_approval_authority WHERE admin_id = #{adminId};
|
|
|
+ </select>
|
|
|
+ <select id="listApprovalAuthority" parameterType="AdminApprovalAuthority" resultType="AdminApprovalAuthority">
|
|
|
+ select * from tb_rst_sys_admin_approval_authority
|
|
|
+ <where>
|
|
|
+ <if test="isSales != null and isSales != ''">
|
|
|
+ is_sales = #{isSales}
|
|
|
+ </if>
|
|
|
+ <if test="isPmc != null and isPmc != ''">
|
|
|
+ is_pmc = #{isPmc}
|
|
|
+ </if>
|
|
|
+ <if test="isManagement != null and isManagement != ''">
|
|
|
+ is_management = #{isManagement}
|
|
|
+ </if>
|
|
|
+ <if test="isWarehouse != null and isWarehouse != ''">
|
|
|
+ is_warehouse = #{isWarehouse}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|