igds-inout/src/main/java/com/ld/igds/inout/view/InoutHand.view.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
igds-inout/src/main/java/com/ld/igds/m/dto/NoticeDto.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
igds-inout/src/main/java/com/ld/igds/m/service/HInoutNoticeService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
igds-inout/src/main/java/com/ld/igds/m/view/ContractManage.view.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
igds-inout/src/main/java/com/ld/igds/m/view/InoutCustomerPR.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
igds-inout/src/main/java/models/inout.model.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
igds-inout/src/main/java/com/ld/igds/inout/view/InoutHand.view.xml
@@ -862,7 +862,7 @@ <CustomDropDown id="ddNotice"> <Property name="minHeight">400</Property> <Property name="assignmentMap">noticeId=id,customerName=customerName</Property> <Property name="minWidth">500</Property> <Property name="minWidth">1000</Property> <Property name="autoOpen">true</Property> <Container layout="regionPadding:5"> <DataSet id="dsNotice"> @@ -902,13 +902,34 @@ }</ClientEvent> <Property name="dataSet">dsNotice</Property> <Property name="readOnly">true</Property> <DataColumn name="name"> <Property name="property">name</Property> <Property name="align">center</Property> <Property name="width">100</Property> </DataColumn> <DataColumn> <Property name="property">customerName</Property> <Property name="align">center</Property> <Property name="name">customerName</Property> <Property name="width">240</Property> </DataColumn> <DataColumn name="name"> <Property name="property">name</Property> <DataColumn name="foodVariety"> <Property name="property">foodVariety</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="year"> <Property name="property">year</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="depotId"> <Property name="property">depotId</Property> <Property name="align">center</Property> <Property name="width">180</Property> </DataColumn> <DataColumn name="contractName"> <Property name="property">contractName</Property> <Property name="align">center</Property> <Property name="width">300</Property> </DataColumn> </DataGrid> </Container> igds-inout/src/main/java/com/ld/igds/m/dto/NoticeDto.java
@@ -1,6 +1,7 @@ package com.ld.igds.m.dto; import lombok.Data; import java.util.Date; /** @@ -9,77 +10,82 @@ * @author chen */ @Data public class NoticeDto{ public class NoticeDto { /** * 通知单id */ private String id; /** * 通知单id */ private String id; private String name; /** * 组织编码 */ private String companyId; /** * 库区编码 */ private String deptId; /** * 仓库编码 */ private String depotId; /** * 客户编码 */ private String customerId; /** * 客户名称 */ private String customerName; /** * 单位名称 */ private String unitName; /** * 粮食品种 */ private String foodVariety; /** * 粮食性质 */ private String foodType; /** * 年份 */ private String year; /** * 目标数量 */ private double targetNumber = 0.0; /** * 完成数量 */ private double completeNumber = 0.0; /** * 完成时间 */ private Date completeTime; private String name; /** * 组织编码 */ private String companyId; /** * 库区编码 */ private String deptId; /** * 仓库编码 */ private String depotId; /** * 客户编码 */ private String customerId; /** * 客户名称 */ private String customerName; /** * 单位名称 */ private String unitName; /** * 粮食品种 */ private String foodVariety; /** * 粮食性质 */ private String foodType; /** * 年份 */ private String year; /** * 目标数量 */ private double targetNumber = 0.0; /** * 完成数量 */ private double completeNumber = 0.0; /** * 完成时间 */ private Date completeTime; /** * 所属合同 */ private String contractName; } igds-inout/src/main/java/com/ld/igds/m/service/HInoutNoticeService.java
@@ -15,6 +15,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import java.util.*; @Repository @@ -96,11 +97,11 @@ param.setFoodVariety(data.getFoodVariety()); param.setYear(data.getYear()); //若有合同信息,添加合同信息 if(StringUtils.isNotEmpty(data.getContractId())){ if (StringUtils.isNotEmpty(data.getContractId())) { param.setContractId(data.getContractId()); } //若有计划信息,添加计划信息 if(StringUtils.isNotEmpty(data.getPlanId())){ if (StringUtils.isNotEmpty(data.getPlanId())) { param.setPlanId(data.getPlanId()); } param.setCompleteStatus(InoutConstant.COMPLETE_STATUS_NONE); @@ -213,11 +214,11 @@ param.setFoodVariety(data.getFoodVariety()); param.setYear(data.getYear()); //若有合同信息,添加合同信息 if(StringUtils.isNotEmpty(data.getContractId())){ if (StringUtils.isNotEmpty(data.getContractId())) { param.setContractId(data.getContractId()); } //若有计划信息,添加计划信息 if(StringUtils.isNotEmpty(data.getPlanId())){ if (StringUtils.isNotEmpty(data.getPlanId())) { param.setPlanId(data.getPlanId()); } param.setCompleteStatus(InoutConstant.COMPLETE_STATUS_NONE); @@ -257,6 +258,7 @@ /** * 根据参数查询出入库通知单 * * @param parameter * @return */ @@ -271,15 +273,15 @@ String hql = " from "; if (InoutConstant.TYPE_IN.equals(type)) { hql += InoutNoticeIn.class.getName(); }else { } else { hql += InoutNoticeOut.class.getName(); } hql += " where companyId =:companyId and deptId =:deptId"; hql += " where companyId =:companyId and deptId =:deptId and completeStatus =:completeStatus"; Map<String, Object> args = new HashMap<>(); args.put("companyId", ContextUtil.getCompanyId()); args.put("deptId", ContextUtil.subDeptId(null)); args.put("completeStatus", "NONE"); String str = (String) parameter.get("customerId"); if (StringUtils.isNotEmpty(str)) { hql += " and customerId =:customerId"; @@ -292,7 +294,7 @@ args.put("foodVariety", str); } if(InoutConstant.TYPE_OUT.equals(type)){ if (InoutConstant.TYPE_OUT.equals(type)) { str = (String) parameter.get("depotId"); if (StringUtils.isNotEmpty(str)) { hql += " and depotId =:depotId"; @@ -311,13 +313,13 @@ List<Object> list1 = this.query(hql, args); List<NoticeDto> list = new ArrayList<>(); if(list1 == null || list1.isEmpty()){ if (list1 == null || list1.isEmpty()) { return null; } NoticeDto dto; for (Object o : list1) { dto = new NoticeDto(); BeanUtils.copyProperties(o,dto); BeanUtils.copyProperties(o, dto); list.add(dto); } return list; @@ -325,19 +327,20 @@ /** * 根据id获取通知单信息 * * @param id * @param type * @return */ public NoticeDto queryNoticeById(String id, String type) { if(StringUtils.isEmpty(id) || StringUtils.isEmpty(type)){ if (StringUtils.isEmpty(id) || StringUtils.isEmpty(type)) { return null; } String hql = " from "; if (InoutConstant.TYPE_IN.equals(type)) { hql += InoutNoticeIn.class.getName(); }else { } else { hql += InoutNoticeOut.class.getName(); } hql += " where companyId =:companyId and deptId =:deptId and id =:id"; @@ -350,7 +353,7 @@ hql += " order by id "; List<Object> list = this.query(hql, args); if(list == null || list.isEmpty()){ if (list == null || list.isEmpty()) { return null; } NoticeDto dto = new NoticeDto(); igds-inout/src/main/java/com/ld/igds/m/view/ContractManage.view.xml
@@ -39,6 +39,9 @@ </PropertyDef> </DataType> <DataType name="dtMain"> <ClientEvent name="onDataChange">if(arg.property =="customerId"){
 autoByCustomer(arg.newValue);
 }</ClientEvent> <Property name="creationType">com.ld.igds.models.InoutContract</Property> <PropertyDef name="id"> <Property></Property> @@ -371,7 +374,18 @@ </Model> <View layout="regionPadding:10"> <ClientEvent name="onReady">var deptId = window.parent.deptId;//父页面中的分库编码
 
 //根据客户自动回填客户类型,客户开户行,客户开户行账号,客户签约人
 autoByCustomer = function(id){
 view.get("#ajaxGetCustomer").set("parameter",id).execute(function(result){
 if(result){
 var data = view.get("#dsMain.data:#");
 data.set("customerType",result.khlx);
 data.set("customerBank",result.bank);
 data.set("customerBankAccount",result.bankNum);
 data.set("customerSignUser",result.fddbr);
 }
 });
 };
 addMain = function(){
 view.get("#dsMain").insert({});
 view.get("#dialogMain").show();
 @@ -760,6 +774,9 @@ <Property name="confirmMessage">确定要删除吗?</Property> <Property name="service">contractManagePR#delContract</Property> </AjaxAction> <AjaxAction id="ajaxGetCustomer"> <Property name="service">inoutCustomerPR#queryListByParam</Property> </AjaxAction> <CustomDropDown id="ddCustomer"> <Property name="minHeight">400</Property> <Property name="assignmentMap">customerId=id,customerName=name</Property> igds-inout/src/main/java/com/ld/igds/m/view/InoutCustomerPR.java
@@ -2,6 +2,7 @@ import java.text.Collator; import java.util.*; import com.ld.igds.m.service.HInoutCustomerService; import com.ld.igds.models.InoutCustomer; import org.springframework.beans.factory.annotation.Autowired; @@ -11,71 +12,87 @@ /** * 出入库-往来单位管理 * * * @author: andy.jia * @description: * @version: * @data:2020年3月12日 * */ @Component("inoutCustomerPR") public class InoutCustomerPR { @Autowired private HInoutCustomerService customerService; @Autowired private HInoutCustomerService customerService; /** * inoutCustomerPR#queryList 获取所有信息 * * @param parameter * @return */ @DataProvider public List<InoutCustomer> queryList(Map<String, Object> parameter) { /** * inoutCustomerPR#queryList 获取所有信息 * * @param parameter * @return */ @DataProvider public List<InoutCustomer> queryList(Map<String, Object> parameter) { List<InoutCustomer> list = customerService.queryList(parameter); Collections.sort(list, new Comparator<InoutCustomer>() { @Override public int compare(InoutCustomer a1, InoutCustomer a2) { return Collator.getInstance(Locale.CHINESE).compare(a1.getName(),a2.getName()); } }); return list; List<InoutCustomer> list = customerService.queryList(parameter); Collections.sort(list, new Comparator<InoutCustomer>() { @Override public int compare(InoutCustomer a1, InoutCustomer a2) { return Collator.getInstance(Locale.CHINESE).compare(a1.getName(), a2.getName()); } }); return list; } } /** * inoutCustomerPR#queryListByKey * 根据关键字查询,可能是ID可能是名称 * * @param * @return */ @DataProvider public List<InoutCustomer> queryListByKey(Map<String, Object> param) { List<InoutCustomer> list = customerService.queryList(param); Collections.sort(list, new Comparator<InoutCustomer>() { @Override public int compare(InoutCustomer a1, InoutCustomer a2) { return Collator.getInstance(Locale.CHINESE).compare(a1.getName(),a2.getName()); } }); return list; } /** * inoutCustomerPR#queryListByKey * 根据关键字查询,可能是ID可能是名称 * * @param * @return */ @DataProvider public List<InoutCustomer> queryListByKey(Map<String, Object> param) { List<InoutCustomer> list = customerService.queryList(param); Collections.sort(list, new Comparator<InoutCustomer>() { @Override public int compare(InoutCustomer a1, InoutCustomer a2) { return Collator.getInstance(Locale.CHINESE).compare(a1.getName(), a2.getName()); } }); return list; } /** * inoutCustomerPR#saveData */ @Expose public String saveData(InoutCustomer data) { return customerService.saveOrUpdateData(data); } /** * inoutCustomerPR#saveData */ @Expose public String saveData(InoutCustomer data) { return customerService.saveOrUpdateData(data); } /** * inoutCustomerPR#delData */ @Expose public String delData(InoutCustomer data) { return customerService.delData(data); } /** * inoutCustomerPR#delData */ @Expose public String delData(InoutCustomer data) { return customerService.delData(data); } /** * inoutCustomerPR#queryListByParam * 根据关键字查询,ID * * @param * @return */ @Expose public InoutCustomer queryListByParam(String id) { Map<String, Object> param = new HashMap<>(); param.put("id", id); List<InoutCustomer> list = customerService.queryList(param); return list.get(0); } } igds-inout/src/main/java/models/inout.model.xml
@@ -554,6 +554,12 @@ </PropertyDef> <PropertyDef name="depotId"> <Property></Property> <Property name="label">所涉仓库</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("depotPR#getAllCache").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="customerId"> <Property></Property> @@ -564,12 +570,19 @@ </PropertyDef> <PropertyDef name="foodVariety"> <Property></Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicTriggerPR#dicTrigger").getResult("FOOD_VARIETY_")}</Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> <Property name="label">粮食品种</Property> </PropertyDef> <PropertyDef name="foodType"> <Property></Property> </PropertyDef> <PropertyDef name="year"> <Property></Property> <Property name="label">年份</Property> </PropertyDef> <PropertyDef name="targetNumber"> <Property name="dataType">double</Property> @@ -580,5 +593,12 @@ <PropertyDef name="completeTime"> <Property name="dataType">Date</Property> </PropertyDef> <PropertyDef name="unitName"> <Property/> </PropertyDef> <PropertyDef name="contractName"> <Property/> <Property name="label">所属合同</Property> </PropertyDef> </DataType> </Model>