|
@@ -44,7 +44,7 @@
|
|
SELECT production_type
|
|
SELECT production_type
|
|
FROM assets_production
|
|
FROM assets_production
|
|
WHERE business_id = #{businessId}
|
|
WHERE business_id = #{businessId}
|
|
- AND deleted = 0
|
|
|
|
|
|
+ AND deleted = 0
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!--根据业务id获取已选择产品-->
|
|
<!--根据业务id获取已选择产品-->
|
|
@@ -52,7 +52,8 @@
|
|
SELECT id, production_type, print_count
|
|
SELECT id, production_type, print_count
|
|
FROM assets_production
|
|
FROM assets_production
|
|
WHERE business_id = #{businessId}
|
|
WHERE business_id = #{businessId}
|
|
- AND deleted = 0
|
|
|
|
|
|
+ AND deleted = 0
|
|
|
|
+ AND create_production_date IS NULL
|
|
LIMIT 1
|
|
LIMIT 1
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -61,25 +62,25 @@
|
|
SELECT production_no
|
|
SELECT production_no
|
|
FROM assets_evaluation_target
|
|
FROM assets_evaluation_target
|
|
WHERE assets_id = #{id}
|
|
WHERE assets_id = #{id}
|
|
- AND deleted = 0
|
|
|
|
- AND production_no IS NOT NULL
|
|
|
|
- AND production_no != ''
|
|
|
|
|
|
+ AND deleted = 0
|
|
|
|
+ AND production_no IS NOT NULL
|
|
|
|
+ AND production_no != ''
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <!--跟新产品的产品号信息-->
|
|
|
|
|
|
+ <!--更新产品的产品号信息-->
|
|
<update id="updateProductionNo">
|
|
<update id="updateProductionNo">
|
|
UPDATE assets_production
|
|
UPDATE assets_production
|
|
SET production_no = #{productionNo}
|
|
SET production_no = #{productionNo}
|
|
WHERE deleted = 0
|
|
WHERE deleted = 0
|
|
- AND business_id = #{businessId}
|
|
|
|
- AND production_type = #{productionType}
|
|
|
|
- AND (production_no IS NULL OR production_no = '')
|
|
|
|
|
|
+ AND business_id = #{businessId}
|
|
|
|
+ AND production_type = #{productionType}
|
|
|
|
+ AND (production_no IS NULL OR production_no = '')
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<!--取子号情况下,再复制一份产品信息并添加-->
|
|
<!--取子号情况下,再复制一份产品信息并添加-->
|
|
<insert id="copyProductionInfo">
|
|
<insert id="copyProductionInfo">
|
|
INSERT INTO assets_production(id, business_id, production_type, print_count)
|
|
INSERT INTO assets_production(id, business_id, production_type, print_count)
|
|
- VALUE (NULL, #{businessId}, #{productionType}, #{printCount})
|
|
|
|
|
|
+ VALUE (NULL, #{businessId}, #{productionType}, #{printCount})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<!--撰写产品信息-->
|
|
<!--撰写产品信息-->
|
|
@@ -98,33 +99,33 @@
|
|
comment = #{comment},
|
|
comment = #{comment},
|
|
file_path = #{filePath}
|
|
file_path = #{filePath}
|
|
WHERE production_no = #{productionNo}
|
|
WHERE production_no = #{productionNo}
|
|
- AND business_id = #{businessId}
|
|
|
|
|
|
+ AND business_id = #{businessId}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<!--根据业务id与产品号查询产品信息-->
|
|
<!--根据业务id与产品号查询产品信息-->
|
|
<select id="getProductionList" resultType="com.dayou.entity.AssetsProduction">
|
|
<select id="getProductionList" resultType="com.dayou.entity.AssetsProduction">
|
|
SELECT id,
|
|
SELECT id,
|
|
- business_id,
|
|
|
|
- production_no,
|
|
|
|
- production_type,
|
|
|
|
- signatory,
|
|
|
|
- client_name,
|
|
|
|
- client_tel,
|
|
|
|
- valuation_basis_date,
|
|
|
|
- evaluate_acreage,
|
|
|
|
- evaluate_amount,
|
|
|
|
- evaluate_price,
|
|
|
|
- owner,
|
|
|
|
- print_count,
|
|
|
|
- create_production_date,
|
|
|
|
- comment,
|
|
|
|
- repertory_state,
|
|
|
|
- repertory_in_time,
|
|
|
|
- repertory_out_time,
|
|
|
|
- file_path,
|
|
|
|
- save_file_date,
|
|
|
|
- delivery,
|
|
|
|
- qr_code
|
|
|
|
|
|
+ business_id,
|
|
|
|
+ production_no,
|
|
|
|
+ production_type,
|
|
|
|
+ signatory,
|
|
|
|
+ client_name,
|
|
|
|
+ client_tel,
|
|
|
|
+ valuation_basis_date,
|
|
|
|
+ evaluate_acreage,
|
|
|
|
+ evaluate_amount,
|
|
|
|
+ evaluate_price,
|
|
|
|
+ owner,
|
|
|
|
+ print_count,
|
|
|
|
+ create_production_date,
|
|
|
|
+ comment,
|
|
|
|
+ repertory_state,
|
|
|
|
+ repertory_in_time,
|
|
|
|
+ repertory_out_time,
|
|
|
|
+ file_path,
|
|
|
|
+ save_file_date,
|
|
|
|
+ delivery,
|
|
|
|
+ qr_code
|
|
FROM assets_production
|
|
FROM assets_production
|
|
WHERE business_id = #{businessId}
|
|
WHERE business_id = #{businessId}
|
|
<if test="(statementNo != null and statementNo != '') or (reportNo != null and reportNo != '') ">
|
|
<if test="(statementNo != null and statementNo != '') or (reportNo != null and reportNo != '') ">
|
|
@@ -139,8 +140,17 @@
|
|
SELECT COUNT(id)
|
|
SELECT COUNT(id)
|
|
FROM work_flow_node_instance
|
|
FROM work_flow_node_instance
|
|
WHERE deleted = 0
|
|
WHERE deleted = 0
|
|
- AND business_id = #{businessId}
|
|
|
|
- AND (business_sub_id = #{statementNo} OR business_min_id = #{reportNo})
|
|
|
|
|
|
+ AND business_id = #{businessId}
|
|
|
|
+ AND (business_sub_id = #{productionNo} OR business_min_id = #{productionNo})
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <!--根据业务id与产品号集合获取每个产品是否有提交过的流程实例信息-->
|
|
|
|
+ <select id="getInatanceCountByIdAndProNo" resultType="java.lang.Integer">
|
|
|
|
+ SELECT COUNT(id)
|
|
|
|
+ FROM work_flow_node_instance
|
|
|
|
+ WHERE deleted = 0
|
|
|
|
+ AND business_id = #{businessId}
|
|
|
|
+ AND (business_sub_id = #{productionNo} OR business_min_id = #{productionNo})
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!--根据id获取产品出入库状态-->
|
|
<!--根据id获取产品出入库状态-->
|
|
@@ -148,7 +158,7 @@
|
|
SELECT repertory_state
|
|
SELECT repertory_state
|
|
FROM assets_production
|
|
FROM assets_production
|
|
WHERE deleted = 0
|
|
WHERE deleted = 0
|
|
- AND id = #{id}
|
|
|
|
|
|
+ AND id = #{id}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|