|
@@ -116,4 +116,119 @@
|
|
|
where planNo =#{planNo}
|
|
|
group by planNo,maker
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="querySyFabricLossReport" resultType="org.jeecg.modules.documents.costLossReview.entity.FabricLossReview">
|
|
|
+ select plan_code as cCode,create_time as createTime,approval_date as approvalDate,approval_man as approvalMan,
|
|
|
+ content ->> '$.cDefine22' AS cDefine22, content ->> '$.planner' as planner,
|
|
|
+ content ->> '$.number' as number, content ->> '$.contractNo' as contractNo,
|
|
|
+ content ->> '$.cPersonName' as cPersonName,
|
|
|
+ content ->> '$.outboundNumber' as outboundNumber,
|
|
|
+ content ->> '$.makingPeople' as makingPeople
|
|
|
+ from sy_fabric_loss_report
|
|
|
+ where 1=1
|
|
|
+ <if test="sy.createTime != null and sy.createTime !=''">
|
|
|
+ AND date_format( create_time, '%Y-%m-%d' )= date_format(#{sy.createTime},'%Y-%m-%d');
|
|
|
+ </if>
|
|
|
+ <if test="sy.approvalMan != null and sy.approvalMan !=''">
|
|
|
+ AND approval_man = #{sy.approvalMan}
|
|
|
+ </if>
|
|
|
+ <if test="sy.approvalDate != null and sy.approvalDate !=''">
|
|
|
+ AND approval_date = #{sy.approvalDate}
|
|
|
+ </if>
|
|
|
+ <if test="sy.cCode != null and sy.cCode !=''">
|
|
|
+ AND plan_code = #{sy.cCode}
|
|
|
+ </if>
|
|
|
+ <if test="sy.cDefine22 != null and sy.cDefine22 !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.cDefine22' ) = #{sy.cDefine22}
|
|
|
+ </if>
|
|
|
+ <if test="sy.planner != null and sy.planner !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.planner' ) = #{sy.planner}
|
|
|
+ </if>
|
|
|
+ <if test="sy.number != null and sy.number !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.number' ) = #{sy.number}
|
|
|
+ </if>
|
|
|
+ <if test="sy.contractNo != null and sy.contractNo !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.contractNo' ) = #{sy.contractNo}
|
|
|
+ </if>
|
|
|
+ <if test="sy.cPersonName != null and sy.cPersonName !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.cPersonName' ) = #{sy.cPersonName}
|
|
|
+ </if>
|
|
|
+ <if test="sy.outboundNumber != null and sy.outboundNumber !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.outboundNumber') = #{sy.outboundNumber}
|
|
|
+ </if>
|
|
|
+ <if test="sy.makingPeople != null and sy.makingPeople !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.makingPeople' ) = #{sy.makingPeople}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="queryCostAllocation" resultType="org.jeecg.modules.documents.costLossReview.entity.CostAllocationReview">
|
|
|
+ select plan_num as planNum,approval_date as approvalDate,approval_man as approvalMan,add_date as addDate,
|
|
|
+ cost_info ->> '$.poStyleNum' AS poStyleNum,
|
|
|
+ cost_info ->> '$.exportSales' AS exportSales,
|
|
|
+ cost_info ->> '$.garmentContractno' AS garmentContractno,
|
|
|
+ cost_info ->> '$.department' AS department,
|
|
|
+ cost_info ->> '$.customerShortame' AS customerShortame,
|
|
|
+ cost_info ->> '$.processUnit' AS processUnit,
|
|
|
+ cost_info ->> '$.outdata' AS outdata,
|
|
|
+ cost_info ->> '$.planQuantity' AS planQuantity,
|
|
|
+ cost_info ->> '$.actualShipquantity' AS actualShipquantity,
|
|
|
+ cost_info ->> '$.shortseveral' AS shortseveral,
|
|
|
+ cost_info ->> '$.shortvalue' AS shortvalue,
|
|
|
+ cost_info ->> '$.fabricshortcost' AS fabricshortcost,
|
|
|
+ cost_info ->> '$.preparedBy' AS preparedBy
|
|
|
+ from sy_cost_json
|
|
|
+ where 1=1
|
|
|
+ <if test="sy.addDate != null and sy.addDate !=''">
|
|
|
+ AND date_format( add_date, '%Y-%m-%d' )= date_format(#{sy.addDate},'%Y-%m-%d');
|
|
|
+ </if>
|
|
|
+ <if test="sy.approvalMan != null and sy.approvalMan !=''">
|
|
|
+ AND approval_man = #{sy.approvalMan}
|
|
|
+ </if>
|
|
|
+ <if test="sy.approvalDate != null and sy.approvalDate !=''">
|
|
|
+ AND approval_date = #{sy.approvalDate}
|
|
|
+ </if>
|
|
|
+ <if test="sy.planNum != null and sy.planNum !=''">
|
|
|
+ AND plan_num = #{sy.planNum}
|
|
|
+ </if>
|
|
|
+ <if test="sy.poStyleNum != null and sy.poStyleNum !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.poStyleNum' ) = #{sy.poStyleNum}
|
|
|
+ </if>
|
|
|
+ <if test="sy.exportSales != null and sy.exportSales !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.exportSales' ) = #{sy.exportSales}
|
|
|
+ </if>
|
|
|
+ <if test="sy.garmentContractno != null and sy.garmentContractno !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.garmentContractno' ) = #{sy.garmentContractno}
|
|
|
+ </if>
|
|
|
+ <if test="sy.department != null and sy.department !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.department' ) = #{sy.department}
|
|
|
+ </if>
|
|
|
+ <if test="sy.customerShortame != null and sy.customerShortame !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.customerShortame' ) = #{sy.customerShortame}
|
|
|
+ </if>
|
|
|
+ <if test="sy.processUnit != null and sy.processUnit !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.processUnit') = #{sy.processUnit}
|
|
|
+ </if>
|
|
|
+ <if test="sy.outdata != null and sy.outdata !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.outdata' ) = #{sy.outdata}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="sy.planQuantity != null and sy.planQuantity !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.planQuantity' ) = #{sy.planQuantity}
|
|
|
+ </if>
|
|
|
+ <if test="sy.actualShipquantity != null and sy.actualShipquantity !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.actualShipquantity' ) = #{sy.actualShipquantity}
|
|
|
+ </if>
|
|
|
+ <if test="sy.shortseveral != null and sy.shortseveral !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.shortseveral' ) = #{sy.shortseveral}
|
|
|
+ </if>
|
|
|
+ <if test="sy.shortvalue != null and sy.shortvalue !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.shortvalue') = #{sy.shortvalue}
|
|
|
+ </if>
|
|
|
+ <if test="sy.fabricshortcost != null and sy.fabricshortcost !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.fabricshortcost' ) = #{sy.fabricshortcost}
|
|
|
+ </if>
|
|
|
+ <if test="sy.preparedBy != null and sy.preparedBy !=''">
|
|
|
+ AND JSON_EXTRACT( content, '$.preparedBy' ) = #{sy.preparedBy}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|