|
@@ -131,42 +131,42 @@
|
|
|
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');
|
|
|
+ AND date_format( create_time, '%Y-%m-%d' ) between date_format(#{sy.createTimeB},'%Y-%m-%d') and date_format(#{sy.createTimeE},'%Y-%m-%d')
|
|
|
</if>
|
|
|
<if test="sy.approvalMan != null and sy.approvalMan !=''">
|
|
|
- AND first_approve_by = #{sy.approvalMan}
|
|
|
+ AND first_approve_by LIKE CONCAT('%',#{sy.approvalMan},'%')
|
|
|
</if>
|
|
|
<if test="sy.approvalDate != null and sy.approvalDate !=''">
|
|
|
- AND first_approve_date = #{sy.approvalDate}
|
|
|
+ AND first_approve_date between #{sy.approvalDateB} and #{sy.approvalDateE}
|
|
|
</if>
|
|
|
<if test="sy.cCode != null and sy.cCode !=''">
|
|
|
- AND plan_code = #{sy.cCode}
|
|
|
+ AND plan_code LIKE CONCAT('%',#{sy.cCode},'%')
|
|
|
</if>
|
|
|
<if test="sy.cDefine22 != null and sy.cDefine22 !=''">
|
|
|
- AND JSON_EXTRACT( content, '$.cDefine22' ) = #{sy.cDefine22}
|
|
|
+ AND JSON_EXTRACT( content, '$.cDefine22' ) LIKE CONCAT('%',#{sy.cDefine22},'%')
|
|
|
</if>
|
|
|
<if test="sy.planner != null and sy.planner !=''">
|
|
|
- AND JSON_EXTRACT( content, '$.planner' ) = #{sy.planner}
|
|
|
+ AND JSON_EXTRACT( content, '$.planner' ) LIKE CONCAT('%',#{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}
|
|
|
+ AND JSON_EXTRACT( content, '$.contractNo' ) LIKE CONCAT('%',#{sy.contractNo},'%')
|
|
|
</if>
|
|
|
<if test="sy.cPersonName != null and sy.cPersonName !=''">
|
|
|
- AND JSON_EXTRACT( content, '$.cPersonName' ) = #{sy.cPersonName}
|
|
|
+ AND JSON_EXTRACT( content, '$.cPersonName' ) LIKE CONCAT('%',#{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}
|
|
|
+ AND JSON_EXTRACT( content, '$.makingPeople' ) LIKE CONCAT('%',#{sy.makingPeople},'%')
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
<select id="queryCostAllocation" resultType="org.jeecg.modules.documents.costLossReview.entity.CostAllocationReview">
|
|
|
- select plan_num as planNum,first_approve_date as approvalDate,first_approve_by as approvalMan,add_date as addDate,
|
|
|
+ select plan_num as planNum,first_approve_date as approvalDate,first_approve_by as approvalMan,create_time as createTime,
|
|
|
cost_info ->> '$.poStyleNum' AS poStyleNum,
|
|
|
cost_info ->> '$.exportSales' AS exportSales,
|
|
|
cost_info ->> '$.garmentContractno' AS garmentContractno,
|
|
@@ -182,26 +182,26 @@
|
|
|
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 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 first_approve_by = #{sy.approvalMan}
|
|
|
+ AND first_approve_by LIKE CONCAT('%',#{sy.approvalMan},'%')
|
|
|
</if>
|
|
|
<if test="sy.approvalDate != null and sy.approvalDate !=''">
|
|
|
- AND first_approve_date = #{sy.approvalDate}
|
|
|
+ AND first_approve_date LIKE CONCAT('%',#{sy.approvalDate},'%')
|
|
|
</if>
|
|
|
<if test="sy.planNum != null and sy.planNum !=''">
|
|
|
- AND plan_num = #{sy.planNum}
|
|
|
+ AND plan_num LIKE CONCAT('%',#{sy.planNum},'%')
|
|
|
</if>
|
|
|
<if test="sy.poStyleNum != null and sy.poStyleNum !=''">
|
|
|
AND JSON_EXTRACT( cost_info, '$.poStyleNum' ) = #{sy.poStyleNum}
|
|
|
</if>
|
|
|
<if test="sy.exportSales != null and sy.exportSales !=''">
|
|
|
- AND JSON_EXTRACT( cost_info, '$.exportSales' ) = #{sy.exportSales}
|
|
|
+ AND JSON_EXTRACT( cost_info, '$.exportSales' ) LIKE CONCAT('%',#{sy.exportSales},'%')
|
|
|
</if>
|
|
|
<if test="sy.garmentContractno != null and sy.garmentContractno !=''">
|
|
|
- AND JSON_EXTRACT( cost_info, '$.garmentContractno' ) = #{sy.garmentContractno}
|
|
|
+ AND JSON_EXTRACT( cost_info, '$.garmentContractno' ) LIKE CONCAT('%',#{sy.garmentContractno},'%')
|
|
|
</if>
|
|
|
<if test="sy.department != null and sy.department !=''">
|
|
|
AND JSON_EXTRACT( cost_info, '$.department' ) = #{sy.department}
|
|
@@ -232,7 +232,7 @@
|
|
|
AND JSON_EXTRACT( cost_info, '$.fabricshortcost' ) = #{sy.fabricshortcost}
|
|
|
</if>
|
|
|
<if test="sy.preparedBy != null and sy.preparedBy !=''">
|
|
|
- AND JSON_EXTRACT( cost_info, '$.preparedBy' ) = #{sy.preparedBy}
|
|
|
+ AND JSON_EXTRACT( cost_info, '$.preparedBy' ) LIKE CONCAT('%',#{sy.preparedBy},'%')
|
|
|
</if>
|
|
|
|
|
|
|