Commit cc8f6fee by wuwenlong

生产订单优化;数据权限优化;

parent 3c08209f
...@@ -19,6 +19,7 @@ import org.apache.commons.collections.MapUtils; ...@@ -19,6 +19,7 @@ import org.apache.commons.collections.MapUtils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -153,7 +154,10 @@ public class UserSessionUtils extends UserSession { ...@@ -153,7 +154,10 @@ public class UserSessionUtils extends UserSession {
.filter(StringUtils::isNotBlank).collect(Collectors.toList()); .filter(StringUtils::isNotBlank).collect(Collectors.toList());
// 查询组织信息 // 查询组织信息
List<Org> orgs = HGXSTools.XsOrg.list(companyCodes); List<Org> orgs = HGXSTools.XsOrg.list(companyCodes);
return orgs.stream().map(item -> new Company(item.getOrgId(), item.getOrgCname())).collect(Collectors.toList()); Optional.ofNullable(companyCodes).orElse(new ArrayList<>()).stream().forEach( code -> {
orgs.addAll(HGXSTools.XsOrg.queryByParent(code,OrgTypeEnum.COMPANY.getCode()));
});
return orgs.stream().filter(o->StringUtils.equals(o.getOrgType(),OrgTypeEnum.COMPANY.getCode())).map(item -> new Company(item.getOrgId(), item.getOrgCname())).collect(Collectors.toList());
} }
/** /**
......
...@@ -8,6 +8,7 @@ import com.baosight.hggp.core.security.UserSessionUtils; ...@@ -8,6 +8,7 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC001A; import com.baosight.hggp.hg.sc.domain.HGSC001A;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Dept; import com.baosight.hggp.hg.xs.domain.Dept;
import com.baosight.hggp.hg.xs.domain.User; import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
...@@ -157,7 +158,17 @@ public class ServiceHGSC001 extends ServiceBase { ...@@ -157,7 +158,17 @@ public class ServiceHGSC001 extends ServiceBase {
} }
public EiInfo roleCompanyComboBox(EiInfo inInfo) {
try {
EiInfoUtils.addBlock(inInfo, "roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return inInfo;
}
/** /**
* 部门下拉框 * 部门下拉框
......
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
id asc id desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
product_type = #productType# product_type = #productType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode"> <isNotEmpty prepend=" AND " property="productCode">
product_code = #productCode# product_code LIKE CONCAT('%', #productCode#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="productName"> <isNotEmpty prepend=" AND " property="productName">
product_name like ('%$productName$%') product_name like ('%$productName$%')
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
product_type = #productType# product_type = #productType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode"> <isNotEmpty prepend=" AND " property="productCode">
product_code = #productCode# product_code LIKE CONCAT('%', #productCode#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="productName"> <isNotEmpty prepend=" AND " property="productName">
product_name LIKE CONCAT('%', #productName#, '%') product_name LIKE CONCAT('%', #productName#, '%')
......
...@@ -14,10 +14,14 @@ ...@@ -14,10 +14,14 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput ename="inqu_status-0-orderCode" cname="订单编码" type="hidden"/> <EF:EFInput ename="inqu_status-0-orderCode" cname="订单编码" type="hidden"/>
<EF:EFInput ename="inqu_status-0-productCode" cname="产品编码" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/> <EF:EFInput ename="inqu_status-0-productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/> <EF:EFInput ename="inqu_status-0-projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFDatePicker cname="生产订单" ename="inqu_status-0-createdTime" colWidth="3" <%-- <EF:EFDatePicker cname="生产订单日期" ename="inqu_status-0-createdTime" colWidth="3"--%>
<%-- format="yyyy-MM-dd" readonly="false"/>--%>
<EF:EFDatePicker cname="计划开工日期" ename="inqu_status-0-planStartDate" colWidth="3"
format="yyyy-MM-dd" readonly="false"/> format="yyyy-MM-dd" readonly="false"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
...@@ -32,6 +36,8 @@ ...@@ -32,6 +36,8 @@
<EF:EFColumn ename="productCode" cname="产品编码" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="productCode" cname="产品编码" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="productName" cname="产品名称" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="productName" cname="产品名称" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="processName" cname="工序" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="processName" cname="工序" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="planStartDate" cname="计划开工日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" />
<EF:EFColumn ename="planEndDate" cname="计划完工日期" width="120" enable="true" align="center" editType="date" <EF:EFColumn ename="planEndDate" cname="计划完工日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" /> dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" />
<EF:EFColumn ename="singleWeight" cname="单重(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="singleWeight" cname="单重(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
<EF:EFPage title="生产任务"> <EF:EFPage title="生产任务">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput ename="inqu_status-0-orderDetailId" cname="订单详情ID" type="hidden"/>
<EF:EFInput ename="inqu_status-0-productCode" cname="产品编码" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="班组名称" placeholder="模糊查询" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="班组名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="createdTime" cname="生产任务日期" role="date" <EF:EFDatePicker blockId="inqu_status" row="0" ename="createdTime" cname="生产任务日期" role="date"
......
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