Commit f753bcb6 authored by 刘学辉's avatar 刘学辉

下列选择框显示优化,物料主数据时间格式

parent 650fc79f
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
<x:hidden name="positionId"/> <x:hidden name="positionId"/>
<x:hidden name="positionName"/> <x:hidden name="positionName"/>
<x:hidden name="personMemberId"/> <x:hidden name="personMemberId"/>
<x:hidden name="createdDate"/>
<%-- <x:hidden name="personMemberName"/>--%> <%-- <x:hidden name="personMemberName"/>--%>
<x:title title="申请人填写区域" name="group"/> <x:title title="申请人填写区域" name="group"/>
<div class="hg-form-cols"> <div class="hg-form-cols">
...@@ -44,7 +45,7 @@ ...@@ -44,7 +45,7 @@
<x:inputC name="billCode" label="申请单编号" labelCol="1" readonly="true" fieldCol="2"/> <x:inputC name="billCode" label="申请单编号" labelCol="1" readonly="true" fieldCol="2"/>
<x:inputC name="personMemberName" label="申请人" readonly="true" labelCol="1" fieldCol="2"/> <x:inputC name="personMemberName" label="申请人" readonly="true" labelCol="1" fieldCol="2"/>
<x:inputC name="deptName" label="申请部门" readonly="true" labelCol="1" fieldCol="2"/> <x:inputC name="deptName" label="申请部门" readonly="true" labelCol="1" fieldCol="2"/>
<x:inputC name="createdDate" label="申请日期" readonly="true" wrapper="dateTime" labelCol="1" fieldCol="2"/> <x:inputC name="fillinDate" label="申请日期" readonly="true" wrapper="dateTime" maxLength="20" labelCol="1" fieldCol="2"/>
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
......
...@@ -245,38 +245,11 @@ public class ResourceSearchController { ...@@ -245,38 +245,11 @@ public class ResourceSearchController {
if (!CollectionUtils.isEmpty(mapList)){ if (!CollectionUtils.isEmpty(mapList)){
Map<String, String> map = mapList.get(0); Map<String, String> map = mapList.get(0);
String []widths=new String[map.size()]; String []widths=getWidths(mapList);
for (int i=0;i<mapList.size();i++){
Map<String, String> mapp = mapList.get(i);
int u=0;
for (String key : mapp.keySet()) {
if (widths[u]==null){
widths[u] = "40";
}
String tmpWidth=widths[u];
String value=(String) mapp.get(key);
if (value.trim().length()>10){
if (Integer.parseInt(tmpWidth)<150){
widths[u]="120";
}
}
u++;
}
}
for (int y=0;y<widths.length;y++){ for (int y=0;y<widths.length;y++){
totalWidths+=Long.valueOf(widths[y]); totalWidths+=Long.valueOf(widths[y]);
} }
// map.keySet().forEach((index,key)->{
/* String widths="30";
String value=(String) map.get(key);
if (value.trim().length()>10){
widths="100";
}*/
// QuerySchemeField querySchemeField = new QuerySchemeField(key,key,"string",Long.valueOf(widths[0]));
// fields.add(querySchemeField);
//});
int x=0; int x=0;
for (String key : map.keySet()) { for (String key : map.keySet()) {
QuerySchemeField querySchemeField = new QuerySchemeField(key,key,"string",Long.valueOf(widths[x])); QuerySchemeField querySchemeField = new QuerySchemeField(key,key,"string",Long.valueOf(widths[x]));
...@@ -299,6 +272,36 @@ public class ResourceSearchController { ...@@ -299,6 +272,36 @@ public class ResourceSearchController {
return model; return model;
} }
public String[] getWidths(List<Map<String, String>> mapList){
Map<String, String> map = mapList.get(0);
String []widths=new String[map.size()];
for (int i=0;i<mapList.size();i++){
Map<String, String> mapp = mapList.get(i);
int u=0;
for (String key : mapp.keySet()) {
if (widths[u]==null){
widths[u] = "40";
}
String tmpWidth=widths[u];
String value=(String) mapp.get(key);
if (value.trim().length()>10){
if (Integer.parseInt(tmpWidth)<130){
widths[u]="130";
}
} else {
if (value.trim().length()>6){
if (Integer.parseInt(tmpWidth)<80){
widths[u]=String.valueOf(value.trim().length()*10);
}
}
}
u++;
}
}
return widths;
}
@EasySearch(queryName = "getCusAndSuppliers") @EasySearch(queryName = "getCusAndSuppliers")
public Map<String, Object> getCusAndSuppliers(SDO sdo) throws IOException { public Map<String, Object> getCusAndSuppliers(SDO sdo) throws IOException {
String param = sdo.getString("paramValue"); String param = sdo.getString("paramValue");
...@@ -380,6 +383,7 @@ public class ResourceSearchController { ...@@ -380,6 +383,7 @@ public class ResourceSearchController {
public Map<String,Object> initEasySearchModel(List<Map<String, String>> mapList,String param,SDO sdo){ public Map<String,Object> initEasySearchModel(List<Map<String, String>> mapList,String param,SDO sdo){
List<QuerySchemeField> fields = new ArrayList<>(); List<QuerySchemeField> fields = new ArrayList<>();
Long totalWidths=200L;
if (CollectionUtil.isNotEmpty(mapList)){ if (CollectionUtil.isNotEmpty(mapList)){
if (StringUtil.isNotBlank(param)){//输入查询条件过滤 if (StringUtil.isNotBlank(param)){//输入查询条件过滤
mapList = mapList mapList = mapList
...@@ -389,10 +393,21 @@ public class ResourceSearchController { ...@@ -389,10 +393,21 @@ public class ResourceSearchController {
} }
if (!CollectionUtils.isEmpty(mapList)){ if (!CollectionUtils.isEmpty(mapList)){
Map<String, String> map = mapList.get(0); Map<String, String> map = mapList.get(0);
map.keySet().forEach(key->{ String []widths=getWidths(mapList);
for (int y=0;y<widths.length;y++){
totalWidths+=Long.valueOf(widths[y]);
}
int x=0;
for (String key : map.keySet()) {
QuerySchemeField querySchemeField = new QuerySchemeField(key,key,"string",Long.valueOf(widths[x]));
fields.add(querySchemeField);
x++;
}
/* map.keySet().forEach(key->{
QuerySchemeField querySchemeField = new QuerySchemeField(key,key,"string",200L); QuerySchemeField querySchemeField = new QuerySchemeField(key,key,"string",200L);
fields.add(querySchemeField); fields.add(querySchemeField);
}); });*/
} }
} }
Integer intPage = sdo.getInteger("intPage", 1); Integer intPage = sdo.getInteger("intPage", 1);
...@@ -400,7 +415,7 @@ public class ResourceSearchController { ...@@ -400,7 +415,7 @@ public class ResourceSearchController {
PageRequest pageRequest = new PageRequest(intPage - 1, pageSize); PageRequest pageRequest = new PageRequest(intPage - 1, pageSize);
EasySearchParse easySearchParse = new EasySearchParse(); EasySearchParse easySearchParse = new EasySearchParse();
easySearchParse.setFields(fields); easySearchParse.setFields(fields);
easySearchParse.setWidth(450L); easySearchParse.setWidth(totalWidths);
MemEasySearcher<Map<String, String>> memEasySearcher = new MemEasySearcherImpl<>(); MemEasySearcher<Map<String, String>> memEasySearcher = new MemEasySearcherImpl<>();
Map<String, Object> model = memEasySearcher.search(mapList, easySearchParse, pageRequest, null); Map<String, Object> model = memEasySearcher.search(mapList, easySearchParse, pageRequest, null);
return model; return model;
......
...@@ -82,6 +82,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA ...@@ -82,6 +82,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
if (nonProdApplyBaseInfo.isNew()) { if (nonProdApplyBaseInfo.isNew()) {
nonProdApplyBaseInfo.setStatusId(BizBillStatus.APPLYING.getId()); nonProdApplyBaseInfo.setStatusId(BizBillStatus.APPLYING.getId());
nonProdApplyBaseInfo.setDistribute(0); nonProdApplyBaseInfo.setDistribute(0);
nonProdApplyBaseInfo.setCreatedDate(new Date());
if (StringUtil.isNotBlank(nonProdApplyBaseInfo.getSourceId())){ //有数据来源ID的 表示是变更或扩展的 if (StringUtil.isNotBlank(nonProdApplyBaseInfo.getSourceId())){ //有数据来源ID的 表示是变更或扩展的
sapNonProdApplyDept=nonProdApplyDeptApplication.getNonProdApplyDeptByBaseInfoId(nonProdApplyBaseInfo.getSourceId()); sapNonProdApplyDept=nonProdApplyDeptApplication.getNonProdApplyDeptByBaseInfoId(nonProdApplyBaseInfo.getSourceId());
} }
...@@ -314,6 +315,9 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA ...@@ -314,6 +315,9 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
public NonProdApplyBaseInfo loadNonProdApplyBaseInfoById(String id) { public NonProdApplyBaseInfo loadNonProdApplyBaseInfoById(String id) {
NonProdApplyBaseInfo nonProdApplyBaseInfo=nonProdApplyBaseInfoRepository.findOne(id); NonProdApplyBaseInfo nonProdApplyBaseInfo=nonProdApplyBaseInfoRepository.findOne(id);
if (nonProdApplyBaseInfo==null){
throw new RuntimeException("数据已经不存在!");
}
SapNonProdApplyDept applyDept=nonProdApplyDeptApplication.getNonProdApplyDeptByBaseInfoId(nonProdApplyBaseInfo.getId()); SapNonProdApplyDept applyDept=nonProdApplyDeptApplication.getNonProdApplyDeptByBaseInfoId(nonProdApplyBaseInfo.getId());
if (applyDept!=null){ if (applyDept!=null){
nonProdApplyBaseInfo.setApplyDeptId(applyDept.getApplyDeptId()); nonProdApplyBaseInfo.setApplyDeptId(applyDept.getApplyDeptId());
...@@ -381,8 +385,12 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA ...@@ -381,8 +385,12 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
ids.forEach(this::deleteNonProdApplyBaseInfoById); ids.forEach(this::deleteNonProdApplyBaseInfoById);
for (String id:ids) { for (String id:ids) {
nonProdApplyDeptApplication.deleteSapNonProdApplyDept(nonProdApplyDeptApplication.getNonProdApplyDeptByBaseInfoId(id)); nonProdApplyDeptApplication.deleteSapNonProdApplyDept(nonProdApplyDeptApplication.getNonProdApplyDeptByBaseInfoId(id));
}
//更新流程任务的状态
String sql = "update act_ru_task_extension set STATUS_ID_='completed',STATUS_NAME_='已完成' where ";
sql += " BUSINESS_KEY_='" + id + "'";
sqlExecutorDao.executeUpdate(sql);
}
} }
@Override @Override
......
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