Commit 59428efc by 宋祥
parents 30363ac2 d4b28a8a
...@@ -33,5 +33,7 @@ public class HgScSqlConstant { ...@@ -33,5 +33,7 @@ public class HgScSqlConstant {
public static final String GET = "HGSC007.get"; public static final String GET = "HGSC007.get";
//app 查询生产任务 //app 查询生产任务
public static final String QUERY_APP = "HGSC007.queryApp"; public static final String QUERY_APP = "HGSC007.queryApp";
//app 查询生产任务数量
public static final String COUNT_APP = "HGSC007.countApp";
} }
} }
...@@ -130,7 +130,7 @@ public class ServiceHGSC007 extends ServiceEPBase { ...@@ -130,7 +130,7 @@ public class ServiceHGSC007 extends ServiceEPBase {
} }
// 仅查询自己所在组的任务 added by songx at 20240820 // 仅查询自己所在组的任务 added by songx at 20240820
HgScUtils.HgSc007.setOrgCondition(queryMap); HgScUtils.HgSc007.setOrgCondition(queryMap);
count = super.count(HGSC007.COUNT, queryMap); count = super.count(HgScSqlConstant.HgSc007.COUNT_APP, queryMap);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
......
...@@ -494,6 +494,13 @@ ...@@ -494,6 +494,13 @@
<isNotEmpty prepend=" AND " property="ids"> <isNotEmpty prepend=" AND " property="ids">
a.id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate> a.id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty> </isNotEmpty>
<!-- 移动端请求参数 -->
<isEqual prepend=" AND " property="completeStatus" compareValue="0">
ifnull(h2.quantity,0) = 0 AND a.quantity - ifnull(h2.quantity,0) = a.quantity
</isEqual>
<isEqual prepend=" AND " property="completeStatus" compareValue="1">
a.quantity &gt; 0 and ifnull(h2.quantity,0) > 0
</isEqual>
<isEqual prepend=" AND " property="isComplete" compareValue="0"> <isEqual prepend=" AND " property="isComplete" compareValue="0">
ifnull(h2.quantity,0) = 0 AND a.quantity - ifnull(h2.quantity,0) = a.quantity ifnull(h2.quantity,0) = 0 AND a.quantity - ifnull(h2.quantity,0) = a.quantity
</isEqual> </isEqual>
...@@ -514,6 +521,180 @@ ...@@ -514,6 +521,180 @@
</dynamic> </dynamic>
</select> </select>
<select id="countApp" resultClass="java.lang.Integer">
SELECT
count(1)
FROM ${hggpSchema}.HGSC007 a
LEFT JOIN (
select task_id,sum(quantity) as quantity
from ${hggpSchema}.HGSC008
where 1=1
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name like ('%$companyName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
factory_name = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupCode">
group_code = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupName">
group_name like ('%$groupName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="workCode">
work_code like ('%$workCode$%')
</isNotEmpty>
group by task_id
) h2 ON a.id = h2.task_id
WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
a.id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
a.mat_id = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orderId">
a.order_id = #orderId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orderDetailId">
a.order_detail_id = #orderDetailId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowId">
a.tech_flow_id = #techFlowId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowName">
a.tech_flow_name = #techFlowName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventProcessId">
a.invent_process_id = #inventProcessId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processCode">
a.process_code = #processCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processName">
a.process_name = #processName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processOrder">
a.process_order = #processOrder#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
a.company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
a.company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
a.proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
a.proj_name LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taskCode">
a.task_code = #taskCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
a.product_type = #productType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
a.product_code LIKE CONCAT('%', #productCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
a.product_name LIKE CONCAT('%', #productName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planStartDate">
a.plan_start_date = #planStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planEndDate">
a.plan_end_date = #planEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
a.factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
a.factory_name = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupCode">
a.group_code = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupName">
a.group_name LIKE CONCAT('%', #groupName# ,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="completeDate">
a.complete_date = #completeDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
a.quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="finishQuantity">
a.finish_quantity = #finishQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unfinishQuantity">
a.unfinish_quantity = #unfinishQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
a.single_weight = #singleWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWeight">
a.total_weight = #totalWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="finishWeight">
a.finish_weight = #finishWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unfinishWeight">
a.unfinish_weight = #unfinishWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
a.created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
a.created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
a.created_time LIKE CONCAT('%', #createdTime# ,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
a.id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<!-- 移动端请求参数 -->
<isEqual prepend=" AND " property="completeStatus" compareValue="0">
ifnull(h2.quantity,0) = 0 AND a.quantity - ifnull(h2.quantity,0) = a.quantity
</isEqual>
<isEqual prepend=" AND " property="completeStatus" compareValue="1">
a.quantity &gt; 0 and ifnull(h2.quantity,0) > 0
</isEqual>
<isEqual prepend=" AND " property="isComplete" compareValue="0">
ifnull(h2.quantity,0) = 0 AND a.quantity - ifnull(h2.quantity,0) = a.quantity
</isEqual>
<isEqual prepend=" AND " property="isComplete" compareValue="1">
ifnull(h2.quantity,0) > 0 AND a.quantity - ifnull(h2.quantity,0) &gt; 0
</isEqual>
<isEqual prepend=" AND " property="isComplete" compareValue="2">
a.quantity &gt; 0 AND a.quantity - ifnull(h2.quantity,0) &lt;= 0
</isEqual>
<include refid="appCustomCondition"/>
</select>
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGSC007 ( INSERT INTO ${hggpSchema}.HGSC007 (
mat_id, <!-- 物料清单ID --> mat_id, <!-- 物料清单ID -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment