Commit 46554f36 by liuyang

2024-05-08 优化工序单价

parent 1e915792
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -89,6 +90,26 @@ ...@@ -89,6 +90,26 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sj.domain.HGSJ002"> resultClass="com.baosight.hggp.hg.sj.domain.HGSJ002">
SELECT SELECT
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -133,6 +134,26 @@ ...@@ -133,6 +134,26 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql id="customCondition"> <sql id="customCondition">
<isNotEmpty prepend=" AND " property="ids"> <isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate> ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
......
...@@ -37,8 +37,8 @@ $(function (){ ...@@ -37,8 +37,8 @@ $(function (){
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < processCodes.length; i++) { for (let i = 0; i < processCodes.length; i++) {
if (processCodes[i]['valueField'] === dataItem['processCode']) { if (processCodes[i]['valueField'] === dataItem['processCode']) {
dataItem['processName'] = processCodes[i]['textField']; dataItem['processName'] = processCodes[i]['textField'].split("]")[1];
return processCodes[i]['textField']; return processCodes[i]['textField'].split("]")[1];
} }
} }
return dataItem['processCode']; return dataItem['processCode'];
......
...@@ -66,8 +66,8 @@ $(function (){ ...@@ -66,8 +66,8 @@ $(function (){
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < processCodes.length; i++) { for (let i = 0; i < processCodes.length; i++) {
if (processCodes[i]['valueField'] === dataItem['processCode']) { if (processCodes[i]['valueField'] === dataItem['processCode']) {
dataItem['processName'] = processCodes[i]['textField']; dataItem['processName'] = processCodes[i]['textField'].split("]")[1];
return processCodes[i]['textField']; return processCodes[i]['textField'].split("]")[1];
} }
} }
return dataItem['processCode']; return dataItem['processCode'];
...@@ -217,7 +217,7 @@ $(function (){ ...@@ -217,7 +217,7 @@ $(function (){
} }
//工厂类型下拉联动 //工厂类型下拉联动
$('input[name="inqu_status-0-factoryCode"]').change(function () { /*$('input[name="inqu_status-0-factoryCode"]').change(function () {
let dataEdition= processCodes; let dataEdition= processCodes;
var factoryCode=$("#inqu_status-0-factoryCode").val(); var factoryCode=$("#inqu_status-0-factoryCode").val();
if (factoryCode){ if (factoryCode){
...@@ -234,7 +234,7 @@ $(function (){ ...@@ -234,7 +234,7 @@ $(function (){
dataSource: dataEdition, dataSource: dataEdition,
template: "#=textField#" template: "#=textField#"
}); });
}); });*/
//grush.downloadFile(`${ctx}\\DC\\BB\\template\\DCAMIN02_附加费用管理.xls`); //grush.downloadFile(`${ctx}\\DC\\BB\\template\\DCAMIN02_附加费用管理.xls`);
}) })
......
...@@ -19,10 +19,11 @@ ...@@ -19,10 +19,11 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="processCode" cname="工序名称" colWidth="3" filter="contains"> <%--<EF:EFSelect blockId="inqu_status" row="0" ename="processCode" cname="工序名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="processCode_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="processCode_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>--%>
<EF:EFInput blockId="inqu_status" row="0" ename="processName" cname="工序名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
......
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