fzzy-igdss-core/src/main/java/com/fzzy/igds/constant/Constant.java
@@ -119,6 +119,14 @@ // æµç¨-夿¡ï¼è¡¨ç¤ºæµç¨æ´ä½å®æå夿¡ï¼ public static final String PROGRESS_RECORD = "RECORD"; // æ°æ®ç¶æ-æ£å¸¸ public static final String RECORD_STATUS_NORMAL = "NORMAL"; // æ°æ®ç¶æ-è¡¥å½ public static final String RECORD_STATUS_ADD = "ADD"; // æ°æ®ç¶æ-å·²å é¤ public static final String RECORD_STATUS_DEL = "DEL"; /** * åºå ¥åºé ç½®çç±»å 10 = 车çè¯å« */ fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeDto.java
@@ -86,6 +86,6 @@ /** * æå±åå */ private String contractName; private String contract; } fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeParam.java
@@ -19,6 +19,8 @@ private String depotId; private String key; private String deptId;// æå±ååº private String customerName;// 客æ·åç§° fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/FileInfo.java
@@ -30,7 +30,7 @@ @Id @Column(name = "id", columnDefinition = "varchar(40) COMMENT 'éä»¶ID'") @TableField("id") private String fileId; private String id; @Column(name = "dept_id", columnDefinition = "varchar(40) COMMENT 'æå±åºåº'") @TableField("dept_id") @@ -48,4 +48,8 @@ @TableField("file_name") private String fileName; @Column(name = "file_path", columnDefinition = "varchar(200) COMMENT 'æä»¶å ¨è·¯å¾'") @TableField("file_path") private String filePath; } fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutRecord.java
@@ -196,10 +196,6 @@ @TableField("settle_money") private Double settleMoney = 0.00; @Column(name = "settle_id", columnDefinition = "varchar(40) COMMENT 'ç»ç®åå·'") @TableField("settle_id") private String settleId; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @Column(name = "settle_time", columnDefinition = "datetime COMMENT 'ç»ç®æ¶é´'") @TableField("settle_time") fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/FileMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,14 @@ package com.fzzy.igds.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fzzy.igds.domain.FileInfo; import org.apache.ibatis.annotations.Mapper; /** * @Description * @Author CZT * @Date 2025/12/05 15:48 */ @Mapper public interface FileMapper extends BaseMapper<FileInfo> { } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/FileService.java
@@ -1,12 +1,22 @@ package com.fzzy.igds.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.fzzy.igds.domain.FileInfo; import com.fzzy.igds.mapper.FileMapper; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.config.FrameworkConfig; import org.apache.commons.lang3.time.DateFormatUtils; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import com.ruoyi.common.utils.StringUtils; import javax.annotation.Resource; import javax.imageio.ImageIO; import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.Date; import java.util.List; /** * @Description @@ -16,14 +26,120 @@ @Service public class FileService { @Resource private FileMapper fileMapper; /** * è·ååºå ¥åºæä»¶è·¯å¾ * @param date * 弿¥æ§è¡éä»¶ä¿å * @param files éä»¶ä¿¡æ¯ * @param bizId ä¸å¡id * @param bizTag æ ç¾ * @param pathTag æä»¶è·¯å¾æ è¯ */ @Async public void saveInoutFiles(List<FileInfo> files, String bizId, String bizTag, String pathTag) { if (null == files || files.isEmpty()) { return; } for (FileInfo data : files) { // å¦ææ²¡æéä»¶åç§°ï¼åä¸ä¿åéä»¶ä¿¡æ¯ if (StringUtils.isBlank(data.getFileName())) { continue; } data.setId(ContextUtil.generateId()); data.setCompanyId(ContextUtil.getCompanyId()); //æä»¶å ¨è·¯å¾ String filePath = getFileSavePath(pathTag) + data.getFileName(); filePath = filePath.replace(FrameworkConfig.getProfile(), "/profile/"); data.setFilePath(filePath); if (StringUtils.isNotEmpty(bizId)) { data.setBizId(bizId); } if (StringUtils.isNotEmpty(bizTag)) { data.setBizTag(bizTag); } data.setCreateTime(new Date()); data.setCreateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); data.setUpdateBy(ContextUtil.getLoginUserName()); fileMapper.insert(data); } } /** * æ ¹æ®æ¡ä»¶æ¥è¯¢æ°æ® * @param companyId * @param deptId * @param bizId * @return */ public String getInoutFilePath(Date date) { if (null == date) date = new Date(); String basePath = FrameworkConfig.getProfile() + "INOUT/" + DateFormatUtils.format(date, "yyyyMM") + "/"; public List<FileInfo> listFile(String companyId, String deptId, String bizId, String bizTag) { QueryWrapper<FileInfo> queryWrapper = new QueryWrapper<>(); if (StringUtils.isNotBlank(companyId)) { queryWrapper.eq("company_id", companyId); } if (StringUtils.isNotBlank(deptId)) { queryWrapper.eq("dept_id", deptId); } if (StringUtils.isNotBlank(bizId)) { queryWrapper.eq("biz_id", bizId); } if (StringUtils.isNotBlank(bizTag)) { queryWrapper.eq("biz_tag", bizTag); } return fileMapper.selectList(queryWrapper); } /** * * @param id */ public void delFile(String id) { fileMapper.deleteById(id); } /** * è·ååºå ¥åºæä»¶è·¯å¾ * @param pathTag * @return */ public String getFileSavePath(String pathTag) { if(StringUtils.isBlank(pathTag)){ pathTag = "COMMON"; } if("INOUT".equals(pathTag)) return getInoutFilePath(); if("PATROL".equals(pathTag)) return getPatrolFilePath(); if("DEPT".equals(pathTag)) return getDeptFilePath(); return getCommonFilePath(); } /** * è·ååºå ¥åºæä»¶è·¯å¾ * @return */ public String getPatrolFilePath() { String basePath = FrameworkConfig.getProfile() + "INOUT/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/"; File file = new File(basePath); if (!file.exists()) { file.mkdirs(); } return basePath; } /** * è·ååºå ¥åºæä»¶è·¯å¾ * @return */ public String getInoutFilePath() { String basePath = FrameworkConfig.getProfile() + "INOUT/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/"; File file = new File(basePath); if (!file.exists()) { file.mkdirs(); @@ -33,15 +149,11 @@ /** * è·ååºåºè·¯å¾ä¸æä»¶ * @param companyId * @return */ public String getDeptFilePath(String companyId) { if (StringUtils.isEmpty(companyId)){ companyId = FrameworkConfig.getCompanyId(); } public String getDeptFilePath() { String basePath = FrameworkConfig.getProfile() + "IMG/"+ companyId + "/SECURITY/"; String basePath = FrameworkConfig.getProfile() + "IMG/"+ FrameworkConfig.getCompanyId() + "/SECURITY/"; File file = new File(basePath); if (!file.exists()) { @@ -49,4 +161,44 @@ } return basePath; } /** * è·åå ¬å ±è·¯å¾ * @return */ public String getCommonFilePath() { String basePath = FrameworkConfig.getProfile() + "COMMON/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/"; File file = new File(basePath); if (!file.exists()) { file.mkdirs(); } return basePath; } /** * å缩å¾ç * * @param filePath å缩åè·¯å¾ * @param scale å缩æ¯ä¾ * @param outputPath å缩åè·¯å¾ * @throws IOException */ public void compressedImage(String filePath, double scale, String outputPath) throws IOException { BufferedImage bufferedImage = ImageIO.read(new File(filePath)); int newWidth = (int) (bufferedImage.getWidth() * scale); int newHeight = (int) (bufferedImage.getHeight() * scale); //å建å缩åçå¾ç BufferedImage compressedImage = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_RGB); Graphics2D graphics2D = compressedImage.createGraphics(); //ç»å¶åå§å¾çå°å缩åçå¾çä¸ graphics2D.drawImage(bufferedImage, 0, 0, newWidth, newHeight, null); graphics2D.dispose(); ImageIO.write(compressedImage, "jpg", new File(outputPath)); } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java
@@ -62,22 +62,22 @@ /** * æ ¹æ®æ¡ä»¶æ¥è¯¢ * @param companyId * @param deptId * @param completeStatus * @return */ public List<InoutNoticeIn> getNoticeIn(String companyId, String deptId, String completeStatus) { public List<InoutNoticeIn> getNoticeIn(NoticeParam param) { QueryWrapper<InoutNoticeIn> queryWrapper = new QueryWrapper<>(); if(StringUtils.isNotBlank(companyId)){ queryWrapper.eq("company_id", companyId); if(StringUtils.isNotBlank(param.getCompanyId())){ queryWrapper.eq("company_id", param.getCompanyId()); } if(StringUtils.isNotBlank(deptId)){ queryWrapper.eq("dept_id", deptId); if(StringUtils.isNotBlank(param.getDeptId())){ queryWrapper.eq("dept_id", param.getDeptId()); } if(StringUtils.isNotBlank(completeStatus)){ queryWrapper.eq("complete_status", completeStatus); if(StringUtils.isNotBlank(param.getCompleteStatus())){ queryWrapper.eq("complete_status", param.getCompleteStatus()); } if(StringUtils.isNotBlank(param.getKey())){ queryWrapper.like("name", param.getKey()); } queryWrapper.orderByDesc("create_time"); @@ -97,16 +97,6 @@ } /** * æ¥è¯¢æ°æ® * @param companyId * @param deptId * @return */ public List<InoutNoticeIn> listNoticeIn(String companyId, String deptId) { return this.getNoticeIn(companyId, deptId, Constant.COMPLETE_STATUS_NONE); } /** * æ¥è¯¢æ°æ® * @param companyId * @return @@ -115,7 +105,10 @@ if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } return this.getNoticeIn(companyId, null, Constant.COMPLETE_STATUS_NONE); NoticeParam param = new NoticeParam(); param.setCompanyId(companyId); param.setCompleteStatus(Constant.COMPLETE_STATUS_NONE); return this.getNoticeIn(param); } /** @@ -183,22 +176,21 @@ /** * æ ¹æ®æ¡ä»¶æ¥è¯¢ * @param companyId * @param deptId * @param completeStatus * @return */ public List<InoutNoticeOut> getNoticeOut(String companyId, String deptId, String completeStatus) { public List<InoutNoticeOut> getNoticeOut(NoticeParam param) { QueryWrapper<InoutNoticeOut> queryWrapper = new QueryWrapper<>(); if(StringUtils.isNotBlank(companyId)){ queryWrapper.eq("company_id", companyId); if(StringUtils.isNotBlank(param.getCompanyId())){ queryWrapper.eq("company_id", param.getCompanyId()); } if(StringUtils.isNotBlank(deptId)){ queryWrapper.eq("dept_id", deptId); if(StringUtils.isNotBlank(param.getDeptId())){ queryWrapper.eq("dept_id", param.getDeptId()); } if(StringUtils.isNotBlank(completeStatus)){ queryWrapper.eq("complete_status", completeStatus); if(StringUtils.isNotBlank(param.getCompleteStatus())){ queryWrapper.eq("complete_status", param.getCompleteStatus()); } if(StringUtils.isNotBlank(param.getKey())){ queryWrapper.like("name", param.getKey()); } queryWrapper.orderByDesc("create_time"); @@ -218,16 +210,6 @@ } /** * æ¥è¯¢æ°æ® * @param companyId * @param deptId * @return */ public List<InoutNoticeOut> listNoticeOut(String companyId, String deptId) { return this.getNoticeOut(companyId, deptId, Constant.COMPLETE_STATUS_NONE); } /** * Mybatis-plus è·åä¿¡æ¯ * @param companyId * @return @@ -236,7 +218,10 @@ if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } return this.getNoticeOut(companyId, null,Constant.COMPLETE_STATUS_NONE); NoticeParam param = new NoticeParam(); param.setCompanyId(companyId); param.setCompleteStatus(Constant.COMPLETE_STATUS_NONE); return this.getNoticeOut(param); } /** fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutRecordService.java
@@ -2,19 +2,28 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fzzy.igds.bill.InoutBill; import com.fzzy.igds.constant.Constant; import com.fzzy.igds.constant.FoodVariety; import com.fzzy.igds.constant.RedisConst; import com.fzzy.igds.data.InoutData; import com.fzzy.igds.data.InoutParam; import com.fzzy.igds.data.InoutPrintBill; import com.fzzy.igds.domain.Depot; import com.fzzy.igds.domain.InoutRecord; import com.fzzy.igds.mapper.InoutRecordMapper; import com.fzzy.igds.utils.ContextUtil; import com.fzzy.igds.utils.DateUtil; import com.fzzy.igds.utils.NumberUtil; import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.time.DateFormatUtils; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.text.DecimalFormat; import java.util.Date; import java.util.List; @@ -29,6 +38,12 @@ @Resource private InoutRecordMapper inoutRecordMapper; @Resource private FileService fileService; @Resource private SysDeptService sysDeptService; @Resource private DepotService depotService; @Resource private RedisCache redisCache; @@ -84,7 +99,7 @@ queryWrapper.eq("id", param.getId()); } if (StringUtils.isNotBlank(param.getPlateNum())) { queryWrapper.eq("plate_num", param.getPlateNum()); queryWrapper.like("plate_num", param.getPlateNum()); } if (StringUtils.isNotBlank(param.getWeightTag())) { //æ¥è¯¢å¾ ç§°éç @@ -115,7 +130,9 @@ if (null != param.getEnd()) { queryWrapper.le("create_time", DateUtil.getNextZero(param.getEnd())); } queryWrapper.eq("record_status", "NORMAL"); //æ£å¸¸ç¶æçåå queryWrapper.eq("record_status", Constant.RECORD_STATUS_NORMAL); //æ£å¸¸ç¶æçåå queryWrapper.or(); queryWrapper.eq("record_status", Constant.RECORD_STATUS_ADD); //è¡¥å½ååçåå queryWrapper.orderByDesc("create_time"); return queryWrapper; @@ -152,8 +169,59 @@ queryWrapper.eq("plate_num", plateNum); queryWrapper.ne("progress", Constant.PROGRESS_RECORD); queryWrapper.eq("record_status", "NORMAL"); queryWrapper.or(); queryWrapper.eq("record_status", Constant.RECORD_STATUS_ADD); //è¡¥å½ååçåå return inoutRecordMapper.selectCount(queryWrapper); } /** * æå¨è¡¥å * @param data * @return */ public String handAddInoutRecord(InoutData data) { //è¡¥åæ°æ®ç´æ¥å°ç»æç¶æ data.setRecordStatus(Constant.RECORD_STATUS_ADD); data.setProgress(Constant.PROGRESS_RECORD); if(null != data.getPerWet() && data.getPerWet() > 0){ data.setCheckStatus(Constant.STATUS_CHECK); } String loginUser = ContextUtil.getLoginUserName(); if (StringUtils.isEmpty(data.getRegisterUser())) { data.setRegisterUser(loginUser); } if (StringUtils.isEmpty(data.getFullWeightUser())) { data.setFullWeightUser(loginUser); } if (StringUtils.isEmpty(data.getEmptyWeightUser())) { data.setEmptyWeightUser(loginUser); } if (StringUtils.isEmpty(data.getHandleUser())) { data.setHandleUser(loginUser); } if (StringUtils.isEmpty(data.getCompleteUser())) { data.setCompleteUser(loginUser); } if (null == data.getCompleteTime()) { data.setCompleteTime(new Date()); } InoutRecord record = new InoutRecord(); BeanUtils.copyProperties(data, record); //ä¿å int num = this.addInoutRecord(record); //éä»¶å¤ç fileService.saveInoutFiles(data.getFiles(), record.getId(), null, "INOUT"); if (num > 0) { return null; } else { return "ä¿å失败ï¼"; } } /** @@ -202,6 +270,38 @@ //updateInoutCache(data); return num; } /** * å¼å¸¸ç»æ¢ * @param data * @return */ public String errorInoutData(InoutRecord data) { InoutParam param = new InoutParam(); param.setId(data.getId()); data = this.selectOne(param); if (Constant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) { return "å½åä¿¡æ¯å·²åå¼å¸¸å¤çï¼ä¸æ¯æé夿§è¡ï¼"; } String msg = " äº" + DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm") + " 被 " + ContextUtil.getLoginUserName() + " æ§è¡ç»æ¢ï¼åå ï¼" + data.getRemarks(); data.setRemarks(msg); data.setProgress(Constant.PROGRESS_RECORD); data.setRecordStatus(Constant.RECORD_STATUS_DEL); data.setCompleteTime(new Date()); int i = this.updateInoutRecord(data); //TODO å é¤ç¼å if(i > 0){ return null; }else { return "æä½å¤±è´¥ï¼"; } } /** @@ -292,4 +392,261 @@ } } /** * è·åå ¥åºè¿ç£ åæ°æ®ä¿¡æ¯ * * @param data * @return */ public String inWeightBill(InoutRecord data) { // è·åè¡¨åæ°æ® InoutPrintBill bill = this.createBillData(data, "å ¥åºåç å"); // è°æ´æ¨¡çæ°æ®å¹¶è¿å String htmlStr = InoutBill.IN_WEIGHT_DEFAULT; htmlStr = htmlStr.replace("billTitle", bill.getBillTitle()); htmlStr = htmlStr.replace("registerTime", bill.getRegisterTime()); htmlStr = htmlStr.replace("completeTime", bill.getCompleteTime()); htmlStr = htmlStr.replace("fullTime", bill.getFullTime()); htmlStr = htmlStr.replace("emptyTime", bill.getEmptyTime()); htmlStr = htmlStr.replace("serId", bill.getSerId()); htmlStr = htmlStr.replace("customerName", bill.getCustomerName()); htmlStr = htmlStr.replace("deptName", bill.getUnitName()); htmlStr = htmlStr.replace("driverName", bill.getDriverName()); htmlStr = htmlStr.replace("userNumberId", bill.getUserId()); htmlStr = htmlStr.replace("userContact", bill.getUserContact()); htmlStr = htmlStr.replace("userAddress", bill.getUserAddress()); htmlStr = htmlStr.replace("foodVariety", bill.getFoodVariety()); htmlStr = htmlStr.replace("depotName", bill.getDepotName()); htmlStr = htmlStr.replace("foodLocation", bill.getFoodLocation()); htmlStr = htmlStr.replace("plateNum", bill.getPlateNum()); htmlStr = htmlStr.replace("fullWeight", new DecimalFormat("0.00").format(bill.getFullWeight())); htmlStr = htmlStr.replace("emptyWeight", new DecimalFormat("0.00").format(bill.getEmptyWeight())); htmlStr = htmlStr.replace("netWeight", new DecimalFormat("0.00").format(bill.getNetWeight())); htmlStr = htmlStr.replace("deImpurity", bill.getDeImpurity() + ""); htmlStr = htmlStr.replace("deWet", bill.getDeWet() + ""); htmlStr = htmlStr.replace("recordWeight", new DecimalFormat("0.00").format(bill.getRecordWeight())); htmlStr = htmlStr.replace("deCheck", bill.getDeCheck() + ""); htmlStr = htmlStr.replace("addCheck", bill.getAddCheck() + ""); htmlStr = htmlStr.replace("deSum", bill.getDeSum() + ""); htmlStr = htmlStr.replace("settleWeight", new DecimalFormat("0.00").format(bill.getSettleWeight())); htmlStr = htmlStr.replace("dePackage", bill.getDePackage() + ""); htmlStr = htmlStr.replace("deHandle", bill.getDeHandle() + ""); htmlStr = htmlStr.replace("deOther", bill.getDeOther() + ""); htmlStr = htmlStr.replace("price", bill.getPrice()); htmlStr = htmlStr.replace("settleMoney", bill.getSettleMoney() + ""); htmlStr = htmlStr.replace("wet", bill.getWet() + ""); htmlStr = htmlStr.replace("impurity", bill.getImpurity() + ""); htmlStr = htmlStr.replace("checkStatus", bill.getCheckStatus()); htmlStr = htmlStr.replace("remark", bill.getRemark()); htmlStr = htmlStr.replace("moneyName", bill.getMoneyName()); htmlStr = htmlStr.replace("unitName", bill.getUnitName()); htmlStr = htmlStr.replace("time", bill.getRegisterTime()); htmlStr = htmlStr.replace("handleStart", ""); htmlStr = htmlStr.replace("handleEnd", ""); htmlStr = htmlStr.replace("noticeId", bill.getNoticeId() == null ? "" : bill.getNoticeId()); htmlStr = htmlStr.replace("phone", data.getUserContact() == null ? "" : data.getUserContact() + ""); htmlStr = htmlStr.replace("printTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm")); htmlStr = htmlStr.replaceAll("weightUser", bill.getWeightUser() == null ? "" : bill.getWeightUser()); htmlStr = htmlStr.replaceAll("handleUser", bill.getHandleUser() == null ? "" : bill.getHandleUser()); htmlStr = htmlStr.replaceAll("keeperName", bill.getKeeperUser() == null ? "" : bill.getKeeperUser()); return htmlStr; } /** * è·ååºåºè¿ç£ å * * @param data * @return */ public String outWeightBill(InoutRecord data) { // è·åè¡¨åæ°æ® InoutPrintBill bill = this.createBillData(data, "åºåºåç å"); //é»è®¤æ¨¡ç String htmlStr = InoutBill.OUT_WEIGHT_DEFAULT; htmlStr = htmlStr.replace("billTitle", bill.getBillTitle()); htmlStr = htmlStr.replace("registerTime", bill.getRegisterTime()); htmlStr = htmlStr.replace("completeTime", bill.getCompleteTime()); htmlStr = htmlStr.replace("fullTime", bill.getFullTime()); htmlStr = htmlStr.replace("emptyTime", bill.getEmptyTime()); htmlStr = htmlStr.replace("serId", bill.getSerId()); htmlStr = htmlStr.replace("customerName", bill.getCustomerName()); htmlStr = htmlStr.replace("deptName", bill.getUnitName()); htmlStr = htmlStr.replace("driverName", bill.getDriverName()); htmlStr = htmlStr.replace("userNumberId", bill.getUserId()); htmlStr = htmlStr.replace("userContact", bill.getUserContact()); htmlStr = htmlStr.replace("userAddress", bill.getUserAddress()); htmlStr = htmlStr.replace("foodVariety", bill.getFoodVariety()); htmlStr = htmlStr.replace("depotName", bill.getDepotName()); htmlStr = htmlStr.replace("foodLocation", bill.getFoodLocation()); htmlStr = htmlStr.replace("plateNum", bill.getPlateNum()); htmlStr = htmlStr.replace("fullWeight", new DecimalFormat("0.00").format(bill.getFullWeight())); htmlStr = htmlStr.replace("emptyWeight", new DecimalFormat("0.00").format(bill.getEmptyWeight())); htmlStr = htmlStr.replace("netWeight", new DecimalFormat("0.00").format(bill.getNetWeight())); htmlStr = htmlStr.replace("dePackage", new DecimalFormat("0.00").format(bill.getDePackage())); htmlStr = htmlStr.replace("remark", bill.getRemark()); htmlStr = htmlStr.replace("settleWeight", new DecimalFormat("0.00").format(bill.getSettleWeight())); htmlStr = htmlStr.replace("deHandle", bill.getDeHandle() + ""); htmlStr = htmlStr.replace("recordWeight", new DecimalFormat("0.00").format(bill.getRecordWeight())); htmlStr = htmlStr.replace("deSum", bill.getDeSum() + ""); htmlStr = htmlStr.replace("deOther", bill.getDeOther() + ""); htmlStr = htmlStr.replace("price", bill.getPrice()); htmlStr = htmlStr.replace("settleMoney", bill.getSettleMoney() + ""); htmlStr = htmlStr.replace("wet", bill.getWet() + ""); htmlStr = htmlStr.replace("impurity", bill.getImpurity() + ""); htmlStr = htmlStr.replace("unitName", getValue(bill.getUnitName())); htmlStr = htmlStr.replace("time", bill.getRegisterTime()); htmlStr = htmlStr.replace("handleStart", ""); htmlStr = htmlStr.replace("handleEnd", ""); htmlStr = htmlStr.replace("noticeId", bill.getNoticeId() == null ? "" : bill.getNoticeId()); htmlStr = htmlStr.replace("phone", data.getUserContact() == null ? "" : data.getUserContact() + ""); htmlStr = htmlStr.replace("printTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm")); htmlStr = htmlStr.replaceAll("weightUser", getValue(bill.getWeightUser())); htmlStr = htmlStr.replace("handleUser", getValue(bill.getHandleUser())); htmlStr = htmlStr.replaceAll("keeperName", getValue(bill.getKeeperUser())); return htmlStr; } public String getValue(String value) { if (null == value) return ""; return value; } /** * å°è£ è¿ç£ åæ°æ® * * @param data * @param billTitle * @return */ private InoutPrintBill createBillData(InoutRecord data, String billTitle) { InoutPrintBill bill = new InoutPrintBill(); bill.setBillTitle(billTitle); SysDept dept = sysDeptService.getCacheDept(data.getCompanyId(), data.getDeptId()); if (null != dept && StringUtils.isNotEmpty(dept.getDeptName())) { bill.setBillTitle(dept.getDeptName() + billTitle); bill.setDeptId(dept.getDeptId() + ""); bill.setDeptName(dept.getDeptName() + ""); bill.setUnitName(dept.getDeptName()); } bill.setCompanyId(data.getCompanyId() == null ? "" : data .getCompanyId()); if (null == data.getRegisterTime()) { data.setRegisterTime(new Date()); } bill.setRegisterTime(DateFormatUtils.format(data.getRegisterTime(), "yyyy-MM-dd HH:mm")); if (null == data.getCompleteTime()) { data.setCompleteTime(new Date()); } bill.setCompleteTime(DateFormatUtils.format(data.getCompleteTime(), "yyyy-MM-dd HH:mm")); bill.setEmptyTime(DateFormatUtils.format(data.getEmptyWeightTime(), "yyyy-MM-dd HH:mm:ss")); bill.setFullTime(DateFormatUtils.format(data.getFullWeightTime(), "yyyy-MM-dd HH:mm:ss")); bill.setSerId(data.getId()); if ("5016".equals(data.getCompanyId()) || "5347".equals(data.getCompanyId()) || "5352".equals(data.getCompanyId())) { bill.setCompleteTime(DateFormatUtils.format(data.getCompleteTime(), "yyyy-MM-dd")); bill.setSerId(data.getId().substring(2)); } //客æ·ä¿¡æ¯ bill.setCustomerName(data.getCustomerName() == null ? "" : data.getCustomerName()); bill.setUserId(data.getUserId() == null ? "" : data.getUserId()); bill.setUserAddress(data.getUserAddress() == null ? "" : data.getUserAddress()); bill.setUserContact(data.getUserContact() == null ? "" : data.getUserContact()); bill.setNoticeId(data.getNoticeId()); bill.setDriverName(data.getUserName() == null ? "" : data.getUserName()); // è·åä»åºä¿¡æ¯ Depot depot = depotService.getCacheDepot(data.getCompanyId(), data.getDepotId()); if (depot != null) { bill.setDepotName(depot.getName() == null ? "" : depot.getName()); bill.setHandleUser(depot.getStoreKeeperName() == null ? "" : depot .getStoreKeeperName()); } bill.setFoodVariety(FoodVariety.getMsg(data.getFoodVariety())); bill.setFoodLocation(data.getFoodLocation() == null ? "" : data .getFoodLocation()); bill.setPlateNum(data.getPlateNum()); bill.setFullWeight(data.getFullWeight()); bill.setEmptyWeight(data.getEmptyWeight()); bill.setNetWeight(data.getNetWeight()); bill.setRecordWeight(data.getRecordWeight()); bill.setCheckStatus(data.getCheckStatus().equals(Constant.STATUS_CHECK) ? "åæ ¼" : "ä¸åæ ¼"); bill.setDeOther(data.getDeOther()); bill.setSettleWeight(data.getSettleWeight()); bill.setPrice(data.getPrice() == null ? "" : data.getPrice() + ""); if (data.getSettleMoney() <= 0) { if (null != data.getPrice() && null != data.getRecordWeight()) { data.setSettleMoney(NumberUtil.keepPrecision(data.getPrice() * data.getRecordWeight(), 2)); } } bill.setSettleMoney(data.getSettleMoney() == null ? "" : data.getSettleMoney() + ""); bill.setRemark(data.getRemarks() == null ? "" : data.getRemarks()); if (Constant.TYPE_IN.equals(data.getType())) { bill.setWeightUser(data.getFullWeightUser()); } if (Constant.TYPE_OUT.equals(data.getType())) { bill.setWeightUser(data.getEmptyWeightUser()); } bill.setHandleUser(data.getHandleUser()); bill.setKeeperUser(depot.getStoreKeeperName()); return bill; } } fzzy-igdss-view/pom.xml
@@ -96,11 +96,29 @@ </exclusions> </dependency> <!-- <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency>--> <dependency> <groupId>com.bstek.dorado</groupId> <artifactId>dorado-uploader</artifactId> <version>1.0.20</version> <exclusions> <exclusion> <artifactId>slf4j-jcl</artifactId> <groupId>org.slf4j</groupId> </exclusion> <exclusion> <artifactId>slf4j-log4j12</artifactId> <groupId>org.slf4j</groupId> </exclusion> <exclusion> <artifactId>log4j</artifactId> <groupId>log4j</groupId> </exclusion> <exclusion> <artifactId>slf4j-jdk14</artifactId> <groupId>org.slf4j</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.commons</groupId> fzzy-igdss-view/src/main/java/com/fzzy/igds/FilePR.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,78 @@ package com.fzzy.igds; import com.bstek.dorado.annotation.DataProvider; import com.bstek.dorado.annotation.Expose; import com.fzzy.common.utils.Base64Util; import com.fzzy.igds.domain.FileInfo; import com.fzzy.igds.service.FileService; import com.fzzy.igds.utils.ContextUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.util.HashMap; import java.util.List; import java.util.Map; /** * @Description æä»¶ä¸ä¼ * @Author CZT * @Date 2025/11/29 11:02 */ @Slf4j @Component public class FilePR { @Resource private FileService fileService; /** * filePR#parseExcel * * @param fileName * @return */ @Expose public String parseExcel(String fileName) { return fileName; } /** * filePR#listFile æ ¹æ®æ¡ä»¶è·ååè¡¨æ°æ® * * @param bizId * @param bizId * @return */ @DataProvider public List<FileInfo> listFile(String bizId) { if (null == bizId){ return null; } return fileService.listFile(ContextUtil.getCompanyId(),ContextUtil.subDeptId(null), bizId, null); } /** * * filePR#getImg * è·åå¾çä¿¡æ¯ * * @param file * @return */ @Expose public Map<String, String> getImg(FileInfo file) { Map<String, String> result = new HashMap<String, String>(); result.put("code", "SUCCESS"); String basePath = fileService.getFileSavePath("COMMON"); String imgData = Base64Util.getImageStr(basePath + file.getFileName()); if (null == imgData) { result.put("code", "ERROR"); } result.put("data", imgData); return result; } } fzzy-igdss-view/src/main/java/com/fzzy/igds/FileUploadManage.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,94 @@ package com.fzzy.igds; import com.bstek.dorado.uploader.UploadFile; import com.bstek.dorado.uploader.annotation.FileResolver; import com.fzzy.igds.service.FileService; import com.fzzy.igds.utils.ContextUtil; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.time.DateFormatUtils; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.io.File; import java.io.IOException; import java.util.Date; import java.util.Map; /** * @Description Dorado7 éä»¶ä¸ä¼ å ¬å ±ç®¡çå± * @Author CZT * @Date 2025/12/05 10:05 */ @Slf4j @Component public class FileUploadManage { @Resource private FileService fileService; /** * ä¸ä¼ åºåºé¸ç°å¾ * fileUploadManage#imgFile * * @param file * @param parameter * @return */ @FileResolver public String imgFile(UploadFile file, Map<String, Object> parameter) { String fileId = null; try { String basePath = fileService.getFileSavePath("DEPT"); fileId = "aerial-" + ContextUtil.subDeptId(null) + file.getFileName().substring( file.getFileName().lastIndexOf(".")); file.transferTo(new File(basePath + fileId)); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return fileId; } /** * ä¸ä¼ åºå ¥åºéä»¶ * fileUploadManage#inoutFile * * @param file * @param parameter * @return */ @FileResolver public String inoutFile(UploadFile file, Map<String, Object> parameter) { //æµç¨ String bizTag = (String) parameter.get("bizTag"); String newFileName = null; try { String basePath = fileService.getFileSavePath("INOUT"); // è·åæ°çID newFileName = DateFormatUtils.format(new Date(), "yyyyMMddHHmmss"); if(StringUtils.isNotEmpty(bizTag)){ newFileName = bizTag + "_" + newFileName; } // æä»¶åç¼å String suffixName = file.getFileName().substring(file.getFileName().lastIndexOf(".")); // åææ°çæä»¶å newFileName = newFileName + suffixName; file.transferTo(new File(basePath + newFileName)); } catch (Exception e) { e.printStackTrace(); } return newFileName; } } fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutDataPR.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,161 @@ package com.fzzy.igds; import com.bstek.dorado.annotation.DataProvider; import com.bstek.dorado.annotation.DataResolver; import com.bstek.dorado.annotation.Expose; import com.bstek.dorado.data.provider.Page; import com.fzzy.igds.constant.Constant; import com.fzzy.igds.data.InoutData; import com.fzzy.igds.data.InoutParam; import com.fzzy.igds.domain.InoutRecord; import com.fzzy.igds.service.InoutRecordService; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.domain.entity.SysUser; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.Date; /** * @Description åºå ¥åºè¯¦å页é¢ç®¡ç * @Author CZT * @Date 2025/12/05 10:40 */ @Component public class InoutDataPR { @Resource private InoutRecordService inoutRecordService; /** * inoutDataPR#pageInoutData * * @param page * @param param * @throws Exception */ @DataProvider public void pageInoutData(Page<InoutRecord> page, InoutParam param) { com.baomidou.mybatisplus.extension.plugins.pagination.Page<InoutRecord> corePage = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(page.getPageNo(), page.getPageSize()); if(null == param) { param = new InoutParam(); } inoutRecordService.listPageInout(corePage, param); // éæ°å°è£ page.setEntities(corePage.getRecords()); page.setEntityCount(Integer.parseInt(String.valueOf(corePage.getTotal()))); } /** * ä¿ååºå ¥åºæ°æ® inoutDataPR#saveInoutData */ @DataResolver public String saveInoutData(InoutRecord data) { if (Constant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) { return "ç³»ç»ï¼å·²ç»å é¤çæ°æ®ä¸æ¯æä¿®æ¹ï¼"; } if (!Constant.PROGRESS_RECORD.equals(data.getProgress())) { return "ç³»ç»ï¼æªç»ææµç¨çæ°æ®ä¸æ¯æä¿®æ¹ï¼"; } int i = inoutRecordService.updateInoutRecord(data); if (i > 0) { return null; } else { return "ä¿å失败ï¼"; } } /** * inoutDataPR#errorInoutData åºå ¥åºæ°æ®æ§è¡ å¼å¸¸ç»æ¢ * * @param data * @return * @throws Exception */ @DataResolver @Transactional public String errorInoutData(InoutRecord data) { return inoutRecordService.errorInoutData(data); } /** * inoutDataPR#printWeightBill è·åæå°åä¿¡æ¯ * * @param data * @return * @throws Exception */ @Expose public String printWeightBill(InoutRecord data) { if (Constant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) { return "å é¤çæ°æ®ä¸æ¯ææå°ï¼"; } if (!Constant.PROGRESS_RECORD.equals(data.getProgress())) { return "æªå®æçæ°æ®ä¸æ¯ææå°ï¼"; } if (Constant.TYPE_IN.equals(data.getType())) { return inoutRecordService.inWeightBill(data); } else { return inoutRecordService.outWeightBill(data); } } /** * inoutDataPR#initDataByHand æ°å¢ * * @return */ @DataProvider public InoutData initDataByHand(String type) { SysUser user = ContextUtil.getLoginUser(); InoutData data = new InoutData(); data.setCompanyId(user.getCompanyId()); data.setRegisterTime(new Date()); data.setType(type); data.setRegisterUser(user.getUserName()); data.setDeptId(ContextUtil.subDeptId(user)); data.setCheckUser(user.getUserName()); data.setProgress(Constant.PROGRESS_RECORD); data.setRecordStatus(Constant.RECORD_STATUS_ADD); return data; } /** * è¡¥å inoutDataPR#addData */ @DataResolver public String addData(InoutData data) { if (data.getSettleWeight() <= 0.0) { return "ç³»ç»ï¼ç»ç®ééå¿ é¡»å¤§äº0"; } return inoutRecordService.handAddInoutRecord(data); } /** * inoutDataPR#printWeightBill è·åæå°åä¿¡æ¯ * * @param data * @return * @throws Exception */ @Expose public String printWeightBillHand(InoutData data) { if (Constant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) { return "å é¤çæ°æ®ä¸æ¯ææå°ï¼"; } if (!Constant.PROGRESS_RECORD.equals(data.getProgress())) { return "æªå®æçæ°æ®ä¸æ¯ææå°ï¼"; } if (Constant.TYPE_IN.equals(data.getType())) { return inoutRecordService.inWeightBill(data); } else { return inoutRecordService.outWeightBill(data); } } } fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutHand.view.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,944 @@ <?xml version="1.0" encoding="UTF-8"?> <ViewConfig> <Arguments/> <Context/> <Model> <DataType name="dtMain"> <Property name="creationType">com.fzzy.igds.data.InoutData</Property> <PropertyDef name="id"> <Property></Property> <Property name="label">åæ®å·</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="companyId"> <Property></Property> <Property name="label">ç»ç»ç¼ç </Property> </PropertyDef> <PropertyDef name="progress"> <Property></Property> <Property name="label">æµç¨è¿åº¦</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("PROCESS_STATUS_")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="recordStatus"> <Property></Property> <Property name="label">æ°æ®ç¶æ</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("RECORD_STATUS")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="checkStatus"> <Property></Property> <Property name="label">æ¦æ ·ç»æ</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("CHECK_STATUS")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="registerTime"> <Property name="dataType">DateTime</Property> <Property name="label">ç»è®°æ¶é´</Property> </PropertyDef> <PropertyDef name="registerUser"> <Property></Property> <Property name="label">ç»è®°äººå</Property> </PropertyDef> <PropertyDef name="userName"> <Property></Property> <Property name="label">æ¿è¿äºº</Property> </PropertyDef> <PropertyDef name="userId"> <Property></Property> <Property name="label">身份è¯å·</Property> </PropertyDef> <PropertyDef name="userContact"> <Property></Property> <Property name="label">èç³»æ¹å¼</Property> </PropertyDef> <PropertyDef name="userAddress"> <Property></Property> <Property name="label">æ¿è¿äººå°å</Property> </PropertyDef> <PropertyDef name="plateNum"> <Property></Property> <Property name="label">车çå·</Property> </PropertyDef> <PropertyDef name="customerName"> <Property></Property> <Property name="label">徿¥åä½</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="foodLocation"> <Property></Property> <Property name="label">ç²®é£äº§å°</Property> </PropertyDef> <PropertyDef name="foodYear"> <Property></Property> <Property name="label">ç²®é£å¹´ä»½</Property> </PropertyDef> <PropertyDef name="deOther"> <Property name="dataType">Double</Property> <Property name="label">æ£é</Property> <Property name="displayFormat">0.0 KG</Property> </PropertyDef> <PropertyDef name="fullWeight"> <Property name="dataType">Double</Property> <Property name="label">满车称é</Property> <Property name="required">true</Property> <Property name="displayFormat">0.0 KG</Property> </PropertyDef> <PropertyDef name="fullWeightTime"> <Property name="dataType">DateTime</Property> <Property name="label">满车称æ¶é´</Property> </PropertyDef> <PropertyDef name="fullWeightUser"> <Property></Property> <Property name="label">满车称é人</Property> </PropertyDef> <PropertyDef name="emptyWeight"> <Property name="dataType">Double</Property> <Property name="label">空车称é</Property> <Property name="required">true</Property> <Property name="displayFormat">0.0 KG</Property> </PropertyDef> <PropertyDef name="emptyWeightTime"> <Property name="dataType">DateTime</Property> <Property name="label">空车称æ¶é´</Property> </PropertyDef> <PropertyDef name="emptyWeightUser"> <Property></Property> <Property name="label">空车称é人</Property> </PropertyDef> <PropertyDef name="netWeight"> <Property name="dataType">Double</Property> <Property name="label">åé</Property> <Property name="displayFormat">0.0 KG</Property> </PropertyDef> <PropertyDef name="settleWeight"> <Property name="dataType">Double</Property> <Property name="label">ç»ç®åé</Property> <Property name="required">true</Property> <Property name="displayFormat">0.0 KG</Property> </PropertyDef> <PropertyDef name="recordWeight"> <Property name="dataType">Double</Property> <Property name="label">å ¥åºéé</Property> <Property name="displayFormat">0.0 KG</Property> </PropertyDef> <PropertyDef name="handleStart"> <Property name="dataType">Date</Property> <Property name="label">å¼ä»å¼å§æ¶é´</Property> </PropertyDef> <PropertyDef name="handleEnd"> <Property name="dataType">Date</Property> <Property name="label">å¼ä»ç»ææ¶é´</Property> </PropertyDef> <PropertyDef name="handleUser"> <Property></Property> <Property name="label">å¼ä»æä½äºº</Property> </PropertyDef> <PropertyDef name="completeTime"> <Property name="dataType">DateTime</Property> <Property name="label">宿æ¶é´</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="completeUser"> <Property></Property> <Property name="label">å®æç¡®è®¤äºº</Property> </PropertyDef> <PropertyDef name="remarks"> <Property></Property> <Property name="label">夿³¨ä¿¡æ¯</Property> </PropertyDef> <PropertyDef name="deptId"> <Property></Property> <Property name="label">æå±ååº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deptPR#getAllData").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">kqmc</Property> </Property> </PropertyDef> <PropertyDef name="foodVariety"> <Property></Property> <Property name="label">ç²®é£åç§</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("FOOD_VARIETY_")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> <Property name="required">true</Property> </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> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="type"> <Property name="label">åºå ¥åºç±»å</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="name">åºåº</Property> <Property name="value">OUT</Property> </Entity> <Entity> <Property name="name">å ¥åº</Property> <Property name="value">IN</Property> </Entity> </Collection> </Property> <Property name="keyProperty">value</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="foodLevel"> <Property></Property> <Property name="label">ç²®é£ç级</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerFoodLevel").getResult()}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="checkUser"> <Property></Property> <Property name="label">è´¨æ£äºº</Property> </PropertyDef> <PropertyDef name="price"> <Property name="dataType">double</Property> <Property name="label">ç²®é£å®ä»·</Property> <Property name="displayFormat">0.00 å /å ¬æ¤</Property> </PropertyDef> <PropertyDef name="noticeId"> <Property></Property> <Property name="label">éç¥åç¼ç </Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="foodLocationId"> <Property></Property> <Property name="label">产å°å称代ç </Property> </PropertyDef> <PropertyDef name="checkTime"> <Property name="dataType">DateTime</Property> <Property name="label">è´¨æ£æ¶é´</Property> </PropertyDef> <PropertyDef name="perWet"> <Property name="dataType">Double</Property> <Property name="label">æ°´å</Property> <Property name="displayFormat">0.00 %</Property> </PropertyDef> <PropertyDef name="perImpurity"> <Property name="dataType">Double</Property> <Property name="label">æè´¨</Property> <Property name="displayFormat">0.00 %</Property> </PropertyDef> <PropertyDef name="settleMoney"> <Property name="dataType">Double</Property> <Property name="label">ç»ç®éé¢</Property> <Property name="displayFormat">0.00 å </Property> </PropertyDef> <PropertyDef name="settleTag"> <Property></Property> <Property name="label">æ¯å¦ç»ç®</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="name">æªç»ç®</Property> <Property name="value">N</Property> </Entity> <Entity> <Property name="name">å·²ç»ç®</Property> <Property name="value">Y</Property> </Entity> </Collection> </Property> <Property name="keyProperty">value</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="settleTime"> <Property name="dataType">DateTime</Property> <Property name="label">ç»ç®æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="createTime"> <Property name="dataType">DateTime</Property> <Property name="label">å建æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="createBy"> <Property></Property> <Property name="label">å建人</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateTime"> <Property name="dataType">DateTime</Property> <Property name="label">æ´æ°æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateBy"> <Property></Property> <Property name="label">æ´æ°äºº</Property> <Property name="readOnly">true</Property> </PropertyDef> <Reference name="files"> <Property name="dataProvider">filePR#listFile</Property> <Property name="dataType">[dtFileData]</Property> <Property name="parameter">$${this.id}</Property> </Reference> </DataType> </Model> <View layout="padding:10"> <ClientEvent name="onReady">var TYPE = "${request.getParameter('type')}";
 var PROGRESS = "WEIGHT_TAG";
 
 /**
 * å·æ°é¡µé¢
 */
 flush = function(){
 view.get("#btnSave").set("disabled",false);
 view.get("#btnPrintWeigh").set("disabled",true);
 view.get("#dsMain").set("parameter",TYPE).flushAsync();
 };
 flush();
 
 /**
 * æ°æ®ä¿åæäº¤
 */
 save = function(){
 var data = view.get("#dsMain.data");
 if(data.validate() != 'ok'){
 $alert("æ°æ®éªè¯å¤±è´¥ï¼è¯·æ¥çãåºç¡ä¿¡æ¯ããæ¦æ ·åéªä¿¡æ¯ãä¸çº¢è²æéï¼");
 return;
 }
 var netWeight = data.get("netWeight");
 if(netWeight <= 0){
 $alert("æ°æ®éªè¯å¤±è´¥ï¼ãåºç¡ä¿¡æ¯ã-ç»ç®ééå¿ é¡»å¤§äº0ï¼");
 return;
 }
 view.get("#uaSave").execute(function(result){
 if(result){
 $alert("ä¿å失败ï¼"+result);
 }else{
 view.get("#btnSave").set("disabled",true);
 view.get("#btnPrintWeigh").set("disabled",false);
 $alert("ä¿åæåï¼å¯ä»¥è¿è¡æå°åéæ°ææ°è¡¨åï¼");
 flush();
 
 }
 });
 }
 
 /**
 * èªå¨è®¡ç®
 * @param name
 */
 deAutoByWeight = function () {
 
 var curData = view.get("#dsMain.data:#");
 var fullWeight = curData.get("fullWeight");
 var emptyWeight = curData.get("emptyWeight");
 //æ£éä¿¡æ¯
 var deOther = curData.get("deOther");
 
 if (fullWeight == 0 || emptyWeight == 0) {
 return;
 }
 // åé
 var netWeight = Number(fullWeight) - Number(emptyWeight);
 
 if (netWeight <= 0) {
 $notify("åéå°äº0ï¼å½åç§°éåå¨é»è¾é®é¢");
 return;
 }
 
 /** å ¥åºéé = åé - æ»æ£é */
 recordWeight = Number(netWeight) - Number(deOther);
 
 /** ç»ç®éé = åé - æ»æ£é + å¢é */
 settleWeight = Number(recordWeight);
 
 curData.set("netWeight", netWeight);
 curData.set("settleWeight", settleWeight);
 curData.set("recordWeight", recordWeight);
 };
 //å é¤éä»¶
 delFile = function(){
 var entity = view.get("#dgFiles").getCurrentItem();
 view.get("#ajaxDelFile").set("parameter",{
 fileName:entity.get("fileName"),
 createTime:entity.get("createTime")
 }).execute(function(result){
 if(result){
 $alert(result);
 }else{
 entity.remove();
 $alert("å 餿åï¼");
 }
 });
 }</ClientEvent> <Property name="packages">font-awesome,css-common</Property> <Property name="javaScriptFile">./static/js/plugins/lodop/LodopFuncs.js</Property> <DataSet id="dsMain"> <Property name="dataType">dtMain</Property> <Property name="dataProvider">inoutDataPR#initDataByHand</Property> <Property name="loadMode">manual</Property> </DataSet> <Container> <Property name="className">c-data</Property> <ToolBar> <ToolBarButton id="btnSave"> <ClientEvent name="onClick">save();</ClientEvent> <Property name="caption">æäº¤ä¿å</Property> <Property name="exClassName">btn1</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-plus</Property> </ToolBarButton> <ToolBarButton id="btnPrintWeigh"> <ClientEvent name="onClick">printWeight();</ClientEvent> <Property name="caption">æå°è¿ç£ å</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-print</Property> <Property name="disabled">true</Property> <Property name="width">120</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">flush();</ClientEvent> <Property name="caption">å·æ°é¡µé¢</Property> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-refresh</Property> </ToolBarButton> </ToolBar> </Container> <Container> <Property name="className">c-data</Property> <TabControl id="tabControlMain" layoutConstraint="left"> <Property name="width">1300</Property> <ControlTab> <Property name="caption">åºç¡ä¿¡æ¯</Property> <Property name="iconClass">fa fa-download</Property> <Property name="width">150</Property> <Property name="name">tabCommon</Property> <Container> <FieldSet layoutConstraint="padding:2" layout="padding:5"> <Property name="caption">åºæ¬ä¿¡æ¯</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelWidth">100</Property> <AutoFormElement> <Property name="name">id</Property> <Property name="property">id</Property> <Editor> <TextEditor> <Property name="blankText">-- ç³»ç»èªå¨çæ --</Property> </TextEditor> </Editor> </AutoFormElement> <AutoFormElement> <Property name="name">plateNum</Property> <Property name="property">plateNum</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">depotId</Property> <Property name="property">depotId</Property> <Property name="label">è£ å¸ä»åº</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">userName</Property> <Property name="property">userName</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">userId</Property> <Property name="property">userId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">foodVariety</Property> <Property name="property">foodVariety</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">perWet</Property> <Property name="property">perWet</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">userContact</Property> <Property name="property">userContact</Property> <Property name="label">èç³»çµè¯</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">foodLevel</Property> <Property name="property">foodLevel</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">perImpurity</Property> <Property name="property">perImpurity</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">foodYear</Property> <Property name="property">foodYear</Property> <Property name="trigger">yearDropDown</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">foodLocation</Property> <Property name="property">foodLocation</Property> <Property name="trigger">ddDicArea</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="label">客æ·åç§°</Property> <Property name="property">customerName</Property> <Property name="editable">false</Property> <Property name="trigger">ddNotice</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">noticeId</Property> <Property name="property">noticeId</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </FieldSet> <FieldSet layoutConstraint="padding:2" layout="padding:5"> <Property name="caption">ç§°éä¿¡æ¯ï¼åä½ï¼KGï¼</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,50,*,50,*,50</Property> <Property name="labelAlign">right</Property> <Property name="labelWidth">100</Property> <Property name="labelSeparator">ï¼</Property> <AutoFormElement layoutConstraint="colSpan:2"> <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent> <Property name="name">fullWeight</Property> <Property name="property">fullWeight</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">fullWeightTime</Property> <Property name="property">fullWeightTime</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">fullWeightUser</Property> <Property name="property">fullWeightUser</Property> <Property name="label">满车称é人</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent> <Property name="name">emptyWeight</Property> <Property name="property">emptyWeight</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">emptyWeightTime</Property> <Property name="property">emptyWeightTime</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">emptyWeightUser</Property> <Property name="property">emptyWeightUser</Property> <Property name="label">空车称é人</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">netWeight</Property> <Property name="property">netWeight</Property> <Property name="readOnly">true</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent> <Property name="name">deOther</Property> <Property name="property">deOther</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">registerTime</Property> <Property name="property">registerTime</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">settleWeight</Property> <Property name="property">settleWeight</Property> <Property name="readOnly">true</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">recordWeight</Property> <Property name="property">recordWeight</Property> <Property name="readOnly">true</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">completeTime</Property> <Property name="property">completeTime</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </FieldSet> <FieldSet layoutConstraint="padding:2" layout="padding:5"> <Property name="caption">å ¶ä»ä¿¡æ¯</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelWidth">100</Property> <AutoFormElement> <Property name="name">price</Property> <Property name="property">price</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">settleMoney</Property> <Property name="property">settleMoney</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">settleTime</Property> <Property name="property">settleTime</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:3"> <Property name="name">remarks</Property> <Property name="property">remarks</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </FieldSet> </Container> </ControlTab> </TabControl> <TabControl id="tabControlImage" layoutConstraint="left"> <Property name="width">370</Property> <ControlTab id="tabImage"> <Property name="name">tabImage</Property> <Property name="caption">åºå ¥åºè¿ç¨è®°å½</Property> <FieldSet layoutConstraint="padding:10" layout="padding:5"> <Buttons> <Button layoutConstraint="left"> <ClientEvent name="onClick">view.PROGRESS = "WEIGHT_EMPTY";
 </ClientEvent> <Property name="exClassName">btn1</Property> <Property name="iconClass">fa fa-cloud-upload</Property> <Property name="action">uploadImg</Property> <Property name="caption">ç©ºè½¦ç§°ç §ç</Property> <Property name="width">110</Property> </Button> <Button layoutConstraint="left"> <ClientEvent name="onClick">view.PROGRESS = "WEIGHT_FULL";
 </ClientEvent> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-cloud-upload</Property> <Property name="action">uploadImg1</Property> <Property name="caption">æ»¡è½¦ç§°ç §ç</Property> <Property name="width">110</Property> </Button> <Button layoutConstraint="left"> <ClientEvent name="onClick">view.PROGRESS = "HANDLE";</ClientEvent> <Property name="caption">å¼ä»ç §ç</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-cloud-upload</Property> <Property name="action">uploadImg2</Property> <Property name="width">110</Property> </Button> </Buttons> <Children> <DataGrid id="dgFiles"> <Property name="dataSet">dsMain</Property> <Property name="readOnly">true</Property> <Property name="selectionMode">singleRow</Property> <Property name="dataPath">#.files</Property> <RowNumColumn/> <DataColumn name="bizTag"> <Property name="property">bizTag</Property> <Property name="visible">false</Property> </DataColumn> <DataColumn name="fileName"> <Property name="property">fileName</Property> </DataColumn> <DataColumn> <ClientEvent name="onRenderCell">arg.dom.innerHTML = "<a href='javascript:;' onClick='delFile()'>å é¤</a>";
 </ClientEvent> <Property name="property">fileId</Property> <Property name="name">fileId</Property> <Property name="align">center</Property> <Property name="caption">æä½</Property> <Property name="readOnly">true</Property> <Property name="width">80</Property> </DataColumn> </DataGrid> </Children> </FieldSet> </ControlTab> </TabControl> </Container> <YearDropDown id="yearDropDown"/> <UpdateAction id="uaSave"> <Property name="dataResolver">inoutDataPR#addData</Property> <Property name="confirmMessage">ç¡®å®è¦æäº¤ä¹ï¼</Property> <UpdateItem> <Property name="dataSet">dsMain</Property> <Property name="dataPath">[#current]</Property> <Property name="validateData">false</Property> </UpdateItem> </UpdateAction> <AjaxAction id="ajaxPrint"> <Property name="service">inoutDataPR#printWeightBillHand</Property> <Property name="executingMessage">æ£å¨æ§è¡æå°â¦â¦</Property> <Property name="async">false</Property> </AjaxAction> <CustomDropDown id="ddNotice"> <Property name="minHeight">400</Property> <Property name="assignmentMap">noticeId=id,customerName=customerName</Property> <Property name="minWidth">1000</Property> <Property name="autoOpen">true</Property> <Container layout="regionPadding:5"> <DataSet id="dsNotice"> <Property name="dataProvider">inoutNoticePR#queryNoticeByKey</Property> <Property name="parameter"> <Entity> <Property name="type">${request.getParameter('type')}</Property> </Entity> </Property> <Property name="dataType">[dtNoticeDto]</Property> </DataSet> <Container layout="hbox regionPadding:5"> <TextEditor id="key3"> <Property name="blankText"> -- 客æ·åç§°æç¼ç --</Property> <Property name="width">200</Property> </TextEditor> <Button> <ClientEvent name="onClick">var key = view.get("#key3.value");
 var type = "${request.getParameter('type')}";
 view.get("#dsNotice").set("parameter",{key: key,type: type}).flushAsync();</ClientEvent> <Property name="caption">æ¥è¯¢</Property> <Property name="exClassName">btn1</Property> <Property name="iconClass">fa fa-search</Property> </Button> <Button> <ClientEvent name="onClick">var data = view.get("#dsNotice.data:#");
 if(data){
 view.get("#ddNotice").close(data.toJSON());
 }</ClientEvent> <Property name="iconClass">fa fa-check</Property> <Property name="exClassName">btn2</Property> <Property name="caption">ç¡®å®</Property> </Button> </Container> <DataGrid> <ClientEvent name="onDataRowDoubleClick">var data = view.get("#dsNotice.data:#");
 if(data){
 view.get("#ddNotice").close(data.toJSON());
 }</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="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="contract"> <Property name="property">contract</Property> <Property name="align">center</Property> <Property name="width">300</Property> </DataColumn> </DataGrid> </Container> </CustomDropDown> <CustomDropDown id="ddDicArea"> <Property name="minHeight">500</Property> <Property name="minWidth">500</Property> <Property name="assignmentMap">foodLocation=name,foodLocationId=code</Property> <Container layout="regionPadding:5"> <DataSet id="dsDicArea"> <Property name="dataProvider">dicAreaPR#pageList</Property> <Property name="parameter"></Property> <Property name="dataType">[dtArea]</Property> <Property name="pageSize">1000</Property> </DataSet> <Container layout="hbox regionPadding:5"> <TextEditor id="key2"> <Property name="blankText"> -åç§°æç®æ¼ï¼åäº¬å¸ bjs -</Property> <Property name="width">200</Property> </TextEditor> <Button> <ClientEvent name="onClick">var key = view.get("#key2.value");
 view.get("#dsDicArea").set("parameter",{key:key}).flushAsync();</ClientEvent> <Property name="caption">æ¥è¯¢</Property> <Property name="iconClass">fa fa-search</Property> <Property name="exClassName">btn1</Property> </Button> <Button> <ClientEvent name="onClick">var data = view.get("#dsDicArea.data:#");
 if(data){
 view.get("#ddDicArea").close(data.toJSON());
 }</ClientEvent> <Property name="iconClass">fa fa-check</Property> <Property name="exClassName">btn2</Property> <Property name="caption">ç¡®å®</Property> </Button> </Container> <DataGrid> <ClientEvent name="onDataRowDoubleClick">var data = view.get("#dsDicArea.data:#");
 if(data){
 view.get("#ddDicArea").close(data.toJSON());
 }</ClientEvent> <Property name="dataSet">dsDicArea</Property> <Property name="readOnly">true</Property> <DataColumn name="name"> <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = "bold";
 arg.processDefault = true;</ClientEvent> <Property name="property">name</Property> <Property name="readOnly">true</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="code"> <Property name="property">code</Property> <Property name="readOnly">true</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="simple"> <Property name="property">simple</Property> <Property name="readOnly">true</Property> <Property name="align">center</Property> </DataColumn> </DataGrid> <DataPilot layoutConstraint="bottom"> <Property name="dataSet">dsDicArea</Property> </DataPilot> </Container> </CustomDropDown> <UploadAction id="uploadImg"> <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
; var bizTag = "EMPTY";
 self.set("parameter",{
 bizTag: bizTag
 })</ClientEvent> <ClientEvent name="onFileUploaded">//éä»¶ä¸ä¼ 宿忷»å ä¸å¡æ°æ®
 var mainData = view.get("#dsMain.data");
 var fileName = arg.returnValue;
 var files = mainData.get("files");
 files.insert({bizTag:view.PROGRESS,fileName:fileName,createTime:new Date()});</ClientEvent> <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 if(data){
 var plateNum = data.get("plateNum");
 var bizTag = "EMPTY";
 self.set("parameter",{
 bizTag:bizTag
 })
 }</ClientEvent> <Property name="maxFileSize">20MB</Property> <Property name="successMessage">ä¸ä¼ æå</Property> <Property name="parameter"></Property> <Property name="fileResolver">fileUploadManage#inoutFile</Property> <Filters/> </UploadAction> <UploadAction id="uploadImg1"> <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 
 var bizTag = "FULL";
 self.set("parameter",{
 bizTag: bizTag
 })</ClientEvent> <ClientEvent name="onFileUploaded">//éä»¶ä¸ä¼ 宿忷»å ä¸å¡æ°æ®
 var mainData = view.get("#dsMain.data");
 var fileName = arg.returnValue;
 var files = mainData.get("files");
 files.insert({bizTag:view.PROGRESS,fileName:fileName});</ClientEvent> <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 if(data){
 var bizTag = "FULL";
 self.set("parameter",{
 bizTag:bizTag
 })
 }</ClientEvent> <Property name="maxFileSize">20MB</Property> <Property name="successMessage">ä¸ä¼ æå</Property> <Property name="parameter"></Property> <Property name="fileResolver">fileUploadManage#inoutFile</Property> <Filters/> </UploadAction> <UploadAction id="uploadImg2"> <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 
 var plateNum = data.get("plateNum");
 var bizTag = "HANDLE";
 self.set("parameter",{
 bizTag: bizTag
 })</ClientEvent> <ClientEvent name="onFileUploaded">//éä»¶ä¸ä¼ 宿忷»å ä¸å¡æ°æ®
 var mainData = view.get("#dsMain.data");
 var fileName = arg.returnValue;
 var files = mainData.get("files");
 files.insert({bizTag:view.PROGRESS,fileName:fileName});</ClientEvent> <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 if(data){
 var plateNum = data.get("plateNum");
 var bizTag = "HANDLE";
 self.set("parameter",{
 bizTag:bizTag
 })
 }</ClientEvent> <Property name="maxFileSize">20MB</Property> <Property name="successMessage">ä¸ä¼ æå</Property> <Property name="parameter"></Property> <Property name="fileResolver">fileUploadManage#inoutFile</Property> <Filters/> </UploadAction> <AjaxAction id="ajaxDelFile"> <Property name="service">fileUploadManage#delInoutFile</Property> <Property name="async">true</Property> <Property name="confirmMessage">ç¡®å®è¦å é¤ä¹ï¼</Property> </AjaxAction> </View> </ViewConfig> fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutList.view.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,1165 @@ <?xml version="1.0" encoding="UTF-8"?> <ViewConfig> <Arguments/> <Context/> <Model> <DataType name="dtMain"> <Property name="creationType">com.fzzy.igds.domain.InoutRecord</Property> <PropertyDef name="id"> <Property></Property> <Property name="label">åæ®å·</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="companyId"> <Property></Property> <Property name="label">ç»ç»ç¼ç </Property> </PropertyDef> <PropertyDef name="progress"> <Property></Property> <Property name="label">æµç¨è¿åº¦</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("PROCESS_STATUS_")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="recordStatus"> <Property></Property> <Property name="label">æ°æ®ç¶æ</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("RECORD_STATUS")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="checkStatus"> <Property></Property> <Property name="label">æ¦æ ·ç»æ</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("CHECK_STATUS")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="registerTime"> <Property name="dataType">DateTime</Property> <Property name="label">ç»è®°æ¶é´</Property> </PropertyDef> <PropertyDef name="registerUser"> <Property></Property> <Property name="label">ç»è®°äººå</Property> </PropertyDef> <PropertyDef name="userName"> <Property></Property> <Property name="label">æ¿è¿äºº</Property> </PropertyDef> <PropertyDef name="userId"> <Property></Property> <Property name="label">身份è¯å·</Property> </PropertyDef> <PropertyDef name="userContact"> <Property></Property> <Property name="label">èç³»æ¹å¼</Property> </PropertyDef> <PropertyDef name="userAddress"> <Property></Property> <Property name="label">æ¿è¿äººå°å</Property> </PropertyDef> <PropertyDef name="plateNum"> <Property></Property> <Property name="label">车çå·</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="customerName"> <Property></Property> <Property name="label">徿¥åä½</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="foodLocation"> <Property></Property> <Property name="label">ç²®é£äº§å°</Property> </PropertyDef> <PropertyDef name="foodYear"> <Property></Property> <Property name="label">ç²®é£å¹´ä»½</Property> </PropertyDef> <PropertyDef name="deOther"> <Property name="dataType">Double</Property> <Property name="label">æ£é</Property> <Property name="displayFormat">0.0 KG</Property> </PropertyDef> <PropertyDef name="fullWeight"> <Property name="dataType">Double</Property> <Property name="label">满车称é</Property> <Property name="required">true</Property> <Property name="displayFormat">0.0 KG</Property> </PropertyDef> <PropertyDef name="fullWeightTime"> <Property name="dataType">DateTime</Property> <Property name="label">满车称æ¶é´</Property> </PropertyDef> <PropertyDef name="fullWeightUser"> <Property></Property> <Property name="label">满车称é人</Property> </PropertyDef> <PropertyDef name="emptyWeight"> <Property name="dataType">Double</Property> <Property name="label">空车称é</Property> <Property name="required">true</Property> <Property name="displayFormat">0.0 KG</Property> </PropertyDef> <PropertyDef name="emptyWeightTime"> <Property name="dataType">DateTime</Property> <Property name="label">空车称æ¶é´</Property> </PropertyDef> <PropertyDef name="emptyWeightUser"> <Property></Property> <Property name="label">空车称é人</Property> </PropertyDef> <PropertyDef name="netWeight"> <Property name="dataType">Double</Property> <Property name="label">åé</Property> <Property name="displayFormat">0.0 KG</Property> </PropertyDef> <PropertyDef name="settleWeight"> <Property name="dataType">Double</Property> <Property name="label">ç»ç®åé</Property> <Property name="required">true</Property> <Property name="displayFormat">0.0 KG</Property> </PropertyDef> <PropertyDef name="recordWeight"> <Property name="dataType">Double</Property> <Property name="label">å ¥åºéé</Property> <Property name="displayFormat">0.0 KG</Property> </PropertyDef> <PropertyDef name="handleStart"> <Property name="dataType">Date</Property> <Property name="label">å¼ä»å¼å§æ¶é´</Property> </PropertyDef> <PropertyDef name="handleEnd"> <Property name="dataType">Date</Property> <Property name="label">å¼ä»ç»ææ¶é´</Property> </PropertyDef> <PropertyDef name="handleUser"> <Property></Property> <Property name="label">å¼ä»æä½äºº</Property> </PropertyDef> <PropertyDef name="completeTime"> <Property name="dataType">DateTime</Property> <Property name="label">宿æ¶é´</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="completeUser"> <Property></Property> <Property name="label">å®æç¡®è®¤äºº</Property> </PropertyDef> <PropertyDef name="remarks"> <Property></Property> <Property name="label">夿³¨ä¿¡æ¯</Property> </PropertyDef> <PropertyDef name="deptId"> <Property></Property> <Property name="label">æå±ååº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deptPR#getAllData").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">kqmc</Property> </Property> </PropertyDef> <PropertyDef name="foodVariety"> <Property></Property> <Property name="label">ç²®é£åç§</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("FOOD_VARIETY_")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> <Property name="required">true</Property> </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> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="type"> <Property name="label">åºå ¥åºç±»å</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="name">åºåº</Property> <Property name="value">OUT</Property> </Entity> <Entity> <Property name="name">å ¥åº</Property> <Property name="value">IN</Property> </Entity> </Collection> </Property> <Property name="keyProperty">value</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="foodLevel"> <Property></Property> <Property name="label">ç²®é£ç级</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerFoodLevel").getResult()}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="checkUser"> <Property></Property> <Property name="label">è´¨æ£äºº</Property> </PropertyDef> <PropertyDef name="price"> <Property name="dataType">double</Property> <Property name="label">ç²®é£å®ä»·</Property> <Property name="displayFormat">0.00 å /å ¬æ¤</Property> </PropertyDef> <PropertyDef name="noticeId"> <Property></Property> <Property name="label">éç¥åç¼ç </Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="foodLocationId"> <Property></Property> <Property name="label">产å°å称代ç </Property> </PropertyDef> <PropertyDef name="checkTime"> <Property name="dataType">DateTime</Property> <Property name="label">è´¨æ£æ¶é´</Property> </PropertyDef> <PropertyDef name="perWet"> <Property name="dataType">Double</Property> <Property name="label">æ°´å</Property> <Property name="displayFormat">0.00 %</Property> </PropertyDef> <PropertyDef name="perImpurity"> <Property name="dataType">Double</Property> <Property name="label">æè´¨</Property> <Property name="displayFormat">0.00 %</Property> </PropertyDef> <PropertyDef name="settleMoney"> <Property name="dataType">Double</Property> <Property name="label">ç»ç®éé¢</Property> <Property name="displayFormat">0.00 å </Property> </PropertyDef> <PropertyDef name="settleTag"> <Property></Property> <Property name="label">æ¯å¦ç»ç®</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="name">æªç»ç®</Property> <Property name="value">N</Property> </Entity> <Entity> <Property name="name">å·²ç»ç®</Property> <Property name="value">Y</Property> </Entity> </Collection> </Property> <Property name="keyProperty">value</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="settleTime"> <Property name="dataType">DateTime</Property> <Property name="label">ç»ç®æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="createTime"> <Property name="dataType">DateTime</Property> <Property name="label">å建æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="createBy"> <Property></Property> <Property name="label">å建人</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateTime"> <Property name="dataType">DateTime</Property> <Property name="label">æ´æ°æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateBy"> <Property></Property> <Property name="label">æ´æ°äºº</Property> <Property name="readOnly">true</Property> </PropertyDef> </DataType> <DataType name="dtQuery"> <Property name="creationType">com.fzzy.igds.data.InoutParam</Property> <PropertyDef name="type"> <Property name="label">åºå ¥åºç±»å</Property> </PropertyDef> <PropertyDef name="deptId"> <Property></Property> <Property name="label">æå±ååº</Property> </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="plateNum"> <Property name="label">车çå·å·</Property> </PropertyDef> <PropertyDef name="foodVariety"> <Property></Property> <Property name="label">ç²®é£åç§</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("FOOD_VARIETY_")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="progress"> <Property></Property> <Property name="label">æµç¨è¿åº¦</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("PROCESS_STATUS_")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="recordStatus"> <Property></Property> <Property name="label">åæ®ç¶æ</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("RECORD_STATUS")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="start"> <Property name="label">å¼å§æ¶é´</Property> <Property name="dataType">Date</Property> </PropertyDef> <PropertyDef name="end"> <Property name="label">æªæ¢æ¶é´</Property> <Property name="dataType">Date</Property> </PropertyDef> </DataType> </Model> <View layout="padding:10"> <ClientEvent name="onReady">var TYPE = "${request.getParameter('type')}";
 var EDIT = "${request.getParameter('edit')}";
 var deptId = window.parent.DEPT_ID;//ç¶é¡µé¢ä¸çååºç¼ç 
 
 //妿editæå¼è¡¨ç¤ºéèADDåç¼è¾æé®
 if(EDIT){
 view.get("#btnEdit").set("visible",false);
 view.get("#btnDel").set("visible",false);
 }
 
 if("OUT" == TYPE){
 view.get("#recordWeight").set("caption","åºåºéé");
 }else{
 view.get("#recordWeight").set("caption","å ¥åºéé");
 }
 
 //é»è®¤æ¥è¯¢æ¥è¯¢ææ¡ä»¶
 view.get("#dsQuery").insert({
 type:TYPE,
 deptId:deptId
 });
 
 //æ¥è¯¢
 query = function(){
 var data = view.get("#dsQuery.data");
 view.get("#dsMain").set("parameter",data).flushAsync();
 };
 query();
 
 
 //ç¼è¾ï¼åªææµç¨ç»æçæå¯ä»¥ä¿®æ¹
 edit = function(){
 
 var select = view.get("#dataGridMain").get("selection");
 if(select){
 console.log(select);
 view.get("#dialogMain").show();;
 }else{
 $notify("è¯·éæ©éè¦ä¿®æ¹çæ°æ®â¦â¦");
 } 
 };
 
 
 //å¼å¸¸æä½
 showAbnormal = function(){ 
 var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#dialogAbnormal").show();
 view.get("#textAbnormal").set("value",null);
 }else{
 $notify("è¯·éæ©æ°æ®â¦â¦");
 } 
 };
 
 //追踪
 showImg = function(){
 
 var select = view.get("#dataGridMain").get("selection");
 if(select){
 var user = encodeURIComponent(select.get("userName"));
 var plateNum = encodeURIComponent(select.get("plateNum"));
 
 view.get("#iFrameImg").set("path", "./basic/inout/inout-img?id=" + select.get("id")+"&plateNum="+plateNum+"&user="+user);
 view.get("#dialogImg").show();
 }else{
 $notify("è¯·éæ©æ°æ®â¦â¦");
 }
 };
 
 //å¼å¸¸æ§è¡
 todoError = function(){
 var data = view.get("#dataGridMain.currentEntity");
 if(!data) return;
 
 var textError = view.get("#textAbnormal.text");
 if(!textError){
 $alert("请说æå¼å¸¸ç»æ¢åå ï¼ï¼");
 return;
 }
 data.set("remarks",textError);
 view.get("#ajaxError").execute(function(result){
 if(result){
 $alert(result);
 return;
 }else{
 data.remove();
 view.get("#dialogAbnormal").close();
 $alert("æ§è¡æåï¼èªå¨å·æ°æ°æ®ï¼");
 }
 });
 };
 
 /**
 * æå°è¿ç£ å
 */
 printBill = function (htmlStr) {
 var LODOP = CLODOP;
 LODOP.PRINT_INIT("ç§°éå");
 LODOP.SET_PRINT_PAGESIZE(1, 2100, 1400, "A4");
 //LODOP.SET_PRINT_PAGESIZE(1, 0, '90mm', "A4");
 LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", htmlStr);
 LODOP.PREVIEW();
 };
 
 //æå°è¿ç£ å
 printWeight = function () {
 var data = view.get("#dataGridMain").get("selection");
 if (!data) return;
 if ("DEL" == data.get("recordStatus")) {
 $alert("å¼å¸¸å¤ççä¿¡æ¯ä¸æ¯ææå°ï¼");
 return;
 }
 if ("RECORD" != data.get("progress")) {
 $alert("æµç¨æªå®æä¸æ¯ææå°ï¼");
 return;
 }
 view.get("#ajaxPrint").set("parameter", data).execute(function (result) {
 printBill(result);
 });
 };
 
 /**
 * èªå¨è®¡ç®
 * @param name
 */
 deAutoByWeight = function () {
 
 var curData = view.get("#dsMain.data:#");
 var fullWeight = curData.get("fullWeight");
 var emptyWeight = curData.get("emptyWeight");
 //æ£éä¿¡æ¯
 var deOther = curData.get("deOther");
 
 if (fullWeight == 0 || emptyWeight == 0) {
 return;
 }
 // åé
 var netWeight = Number(fullWeight) - Number(emptyWeight);
 
 if (netWeight <= 0) {
 $notify("åéå°äº0ï¼å½åç§°éåå¨é»è¾é®é¢");
 return;
 }
 
 /** å ¥åºéé = åé - æ»æ£é */
 recordWeight = Number(netWeight) - Number(deOther);
 
 /** ç»ç®éé = åé - æ»æ£é + å¢é */
 settleWeight = Number(recordWeight);
 
 curData.set("netWeight", netWeight);
 curData.set("settleWeight", settleWeight);
 curData.set("recordWeight", recordWeight);
 };
 </ClientEvent> <Property name="packages">font-awesome,css-common</Property> <Property name="javaScriptFile">./static/js/plugins/lodop/LodopFuncs.js</Property> <DataSet id="dsMain"> <Property name="dataType">[dtMain]</Property> <Property name="pageSize">20</Property> <Property name="dataProvider">inoutDataPR#pageInoutData</Property> <Property name="loadMode">manual</Property> </DataSet> <DataSet id="dsQuery"> <Property name="dataType">dtQuery</Property> </DataSet> <Container> <Property name="className">c-param</Property> <AutoForm> <Property name="cols">*,*,*,*,90,90</Property> <Property name="dataSet">dsQuery</Property> <Property name="labelAlign">right</Property> <Property name="labelWidth">100</Property> <AutoFormElement> <Property name="name">depotId</Property> <Property name="property">depotId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">plateNum</Property> <Property name="property">plateNum</Property> <Editor> <TextEditor> <Property name="blankText">-- æ¯ææ¨¡ç³ --</Property> </TextEditor> </Editor> </AutoFormElement> <AutoFormElement> <Property name="name">start</Property> <Property name="property">start</Property> <Property name="trigger">defaultDateDropDown</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">end</Property> <Property name="property">end</Property> <Property name="trigger">defaultDateDropDown</Property> <Editor/> </AutoFormElement> <Button layoutConstraint="left"> <ClientEvent name="onClick">query();
 </ClientEvent> <Property name="caption">æç´¢</Property> <Property name="iconClass">fa fa-search</Property> <Property name="exClassName">btn-q1</Property> </Button> <Button layoutConstraint="left"> <ClientEvent name="onClick">var type ="${request.getParameter('type')}";
 var deptId = window.parent.DEPT_ID;//ç¶é¡µé¢ä¸çååºç¼ç 
 view.get("#dsQuery").setData({type:type,deptId:deptId});</ClientEvent> <Property name="caption">éç½®</Property> <Property name="exClassName">btn-q2</Property> <Property name="iconClass">fa fa-refresh</Property> </Button> </AutoForm> </Container> <Container> <Property name="className">c-data</Property> <ToolBar> <ToolBarButton id="btnEdit"> <ClientEvent name="onClick">edit();</ClientEvent> <Property name="caption">ä¿®æ¹</Property> <Property name="exClassName">btn2</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-pencil-square-o</Property> </ToolBarButton> <ToolBarButton id="btnDel"> <ClientEvent name="onClick">showAbnormal();</ClientEvent> <Property name="caption">å¼å¸¸æä½</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-minus</Property> <Property name="width">100</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">showImg();</ClientEvent> <Property name="caption">è¿ç¨è¿½è¸ª</Property> <Property name="exClassName">btn1</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-picture-o</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">var data = view.get("#dataGridMain").get("selection");
 if (!data) {
 $alert("请å éæ©æ°æ®ï¼");
 return;
 }
 
 printWeight();
 </ClientEvent> <Property name="caption">æå°è¿ç£ å</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-print</Property> <Property name="width">120</Property> </ToolBarButton> </ToolBar> <DataGrid id="dataGridMain" layoutConstraint="padding:8"> <ClientEvent name="onDataRowClick">view.get("#dataGridMain").set("selection",arg.data);</ClientEvent> <Property name="dataSet">dsMain</Property> <Property name="readOnly">true</Property> <Property name="selectionMode">singleRow</Property> <RowSelectorColumn/> <RowNumColumn> <Property name="width">50</Property> </RowNumColumn> <DataColumn name="id"> <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = "bold";
 arg.dom.style.color = "#f67d06";
 arg.processDefault = true;</ClientEvent> <Property name="property">id</Property> <Property name="align">center</Property> <Property name="width">150</Property> </DataColumn> <DataColumn name="plateNum"> <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = "bold";
 arg.processDefault = true;</ClientEvent> <Property name="property">plateNum</Property> <Property name="align">center</Property> <Property name="width">130</Property> </DataColumn> <DataColumn> <Property name="property">customerName</Property> <Property name="name">customerName</Property> <Property name="align">center</Property> <Property name="caption">徿¥åä½</Property> </DataColumn> <DataColumn name="depotId"> <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = "bold";
 arg.processDefault = true;</ClientEvent> <Property name="property">depotId</Property> <Property name="align">center</Property> <Property name="width">120</Property> </DataColumn> <DataColumn name="foodVariety"> <Property name="property">foodVariety</Property> <Property name="align">center</Property> <Property name="width">110</Property> </DataColumn> <DataColumn name="fullWeight"> <Property name="property">fullWeight</Property> <Property name="caption">æ¯é</Property> <Property name="align">center</Property> <Property name="width">100</Property> </DataColumn> <DataColumn name="emptyWeight"> <Property name="property">emptyWeight</Property> <Property name="caption">ç®é</Property> <Property name="align">center</Property> <Property name="width">100</Property> </DataColumn> <DataColumn name="deOther"> <Property name="property">deOther</Property> <Property name="caption">æ£é</Property> <Property name="align">center</Property> <Property name="width">100</Property> </DataColumn> <DataColumn name="settleWeight"> <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = "bold";
 arg.processDefault = true;</ClientEvent> <Property name="property">settleWeight</Property> <Property name="align">center</Property> <Property name="width">100</Property> </DataColumn> <DataColumn id="recordWeight"> <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = "bold";
 arg.processDefault = true;</ClientEvent> <Property name="property">recordWeight</Property> <Property name="align">center</Property> <Property name="width">100</Property> <Property name="visible">true</Property> <Property name="name">recordWeight</Property> </DataColumn> <DataColumn name="progress"> <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = "bold";
 arg.processDefault = true;</ClientEvent> <Property name="property">progress</Property> <Property name="align">center</Property> <Property name="width">80</Property> </DataColumn> <DataColumn name="completeTime"> <Property name="property">completeTime</Property> <Property name="align">center</Property> <Property name="width">150</Property> </DataColumn> </DataGrid> <ToolBar layoutConstraint="bottom"> <Fill/> <DataPilot layoutConstraint="right"> <Property name="itemCodes">pageSize,pages</Property> <Property name="dataSet">dsMain</Property> </DataPilot> </ToolBar> </Container> <Dialog id="dialogMain" layout="regionPadding:8"> <Property name="iconClass">fa fa-tasks</Property> <Property name="caption">åæ®ä¿¡æ¯</Property> <Property name="width">1200</Property> <Property name="showCaptionBar">false</Property> <Buttons> <Button id="btnOK"> <ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
 if(data.validate() != 'ok'){
 $notify("æ°æ®æ ¡éªå¤±è´¥ï¼ï¼");
 return;
 }
 view.get("#uaSave").execute(function(result){
 if(result){
 $alert(result);
 return;
 }
 $notify("æ°æ®æ§è¡å®æï¼ï¼");
 self.get("parent").hide();
 });</ClientEvent> <Property name="caption">ç¡®å®ä¿å</Property> <Property name="iconClass">fa fa-check-circle</Property> <Property name="exClassName">btn1</Property> <Property name="width">120</Property> </Button> <Button> <ClientEvent name="onClick">self.get("parent").close();</ClientEvent> <Property name="caption">åæ¶æä½</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-times-circle</Property> <Property name="width">120</Property> </Button> </Buttons> <Children> <FieldSet layout="padding:5"> <Property name="caption">åºæ¬ä¿¡æ¯</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelWidth">100</Property> <AutoFormElement> <Property name="name">id</Property> <Property name="property">id</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">plateNum</Property> <Property name="property">plateNum</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">depotId</Property> <Property name="property">depotId</Property> <Property name="label">è£ å¸ä»åº</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">userName</Property> <Property name="property">userName</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">userId</Property> <Property name="property">userId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">foodVariety</Property> <Property name="property">foodVariety</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">perWet</Property> <Property name="property">perWet</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">userContact</Property> <Property name="property">userContact</Property> <Property name="label">èç³»çµè¯</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">foodLevel</Property> <Property name="property">foodLevel</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">perImpurity</Property> <Property name="property">perImpurity</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">foodYear</Property> <Property name="property">foodYear</Property> <Property name="trigger">yearDropDown</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">foodLocation</Property> <Property name="property">foodLocation</Property> <Property name="trigger">ddDicArea</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="label">客æ·åç§°</Property> <Property name="property">customerName</Property> <Property name="editable">false</Property> <Property name="trigger">ddNotice</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">noticeId</Property> <Property name="property">noticeId</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </FieldSet> <FieldSet layout="padding:5"> <Property name="caption">ç§°éä¿¡æ¯ï¼åä½ï¼KGï¼</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,50,*,50,*,50</Property> <Property name="labelAlign">right</Property> <Property name="labelWidth">100</Property> <Property name="labelSeparator">ï¼</Property> <AutoFormElement layoutConstraint="colSpan:2"> <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent> <Property name="name">fullWeight</Property> <Property name="property">fullWeight</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">fullWeightTime</Property> <Property name="property">fullWeightTime</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">fullWeightUser</Property> <Property name="property">fullWeightUser</Property> <Property name="label">满车称é人</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent> <Property name="name">emptyWeight</Property> <Property name="property">emptyWeight</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">emptyWeightTime</Property> <Property name="property">emptyWeightTime</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">emptyWeightUser</Property> <Property name="property">emptyWeightUser</Property> <Property name="label">空车称é人</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">netWeight</Property> <Property name="property">netWeight</Property> <Property name="readOnly">true</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent> <Property name="name">deOther</Property> <Property name="property">deOther</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">registerTime</Property> <Property name="property">registerTime</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">settleWeight</Property> <Property name="property">settleWeight</Property> <Property name="readOnly">true</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">recordWeight</Property> <Property name="property">recordWeight</Property> <Property name="readOnly">true</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">completeTime</Property> <Property name="property">completeTime</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </FieldSet> <FieldSet layout="padding:5"> <Property name="caption">å ¶ä»ä¿¡æ¯</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelWidth">100</Property> <AutoFormElement> <Property name="name">price</Property> <Property name="property">price</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">settleMoney</Property> <Property name="property">settleMoney</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">settleTime</Property> <Property name="property">settleTime</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:3"> <Property name="name">remarks</Property> <Property name="property">remarks</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </FieldSet> </Children> <Tools/> </Dialog> <Dialog id="dialogImg"> <Property name="width">1000</Property> <Property name="height">95%</Property> <Property name="iconClass">fa fa-tasks</Property> <Property name="caption">æµç¨è¿½æº¯å±ç¤º</Property> <Buttons/> <Children> <IFrame id="iFrameImg"> <Property name="width">100%</Property> </IFrame> </Children> <Tools/> </Dialog> <Dialog id="dialogAbnormal" layout="regionPadding:5"> <Property name="width">450</Property> <Property name="iconClass">fa fa-tasks</Property> <Property name="caption">å¼å¸¸æä½åå </Property> <Property name="closeable">false</Property> <Buttons> <Button> <ClientEvent name="onClick">todoError();</ClientEvent> <Property name="caption">å¼å¸¸ç»æ¢</Property> <Property name="iconClass">fa fa-check</Property> <Property name="exClassName">btn1</Property> <Property name="width">120</Property> </Button> <Button> <ClientEvent name="onClick">self.get("parent").close();</ClientEvent> <Property name="caption">åæ¶æä½</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-times-circle</Property> <Property name="width">120</Property> </Button> </Buttons> <Children> <TextArea id="textAbnormal"> <Property name="height">165</Property> </TextArea> <AutoForm> <Property name="cols">*</Property> <Label layoutConstraint="colSpan:1"> <Property name="style"> <Property name="color">blue</Property> </Property> <Property name="text">å¼å¸¸ç»æ¢ï¼ä¸å¡æ°æ®æµç¨ç»æï¼ééä¿¡æ¯ä¸è¿è¡ç»è®¡è®¡ç®ã</Property> </Label> <Label layoutConstraint="colSpan:1"> <Property name="style"> <Property name="color">blue</Property> </Property> <Property name="text">å 餿ä½ï¼ä¸å¡æ°æ®è¢«å é¤ä¸ä¸ç»è®¡ï¼åªä¿çæ¥å¿è®°å½ã</Property> </Label> </AutoForm> </Children> <Tools/> </Dialog> <UpdateAction id="uaSave"> <Property name="dataResolver">inoutDataPR#saveInoutData</Property> <UpdateItem> <Property name="dataSet">dsMain</Property> <Property name="dataPath">[#current]</Property> <Property name="validateData">false</Property> </UpdateItem> </UpdateAction> <UpdateAction id="ajaxError"> <Property name="dataResolver">inoutDataPR#errorInoutData</Property> <UpdateItem> <Property name="dataSet">dsMain</Property> <Property name="dataPath">[#current]</Property> <Property name="validateData">false</Property> </UpdateItem> </UpdateAction> <AjaxAction id="ajaxPrint"> <Property name="service">inoutDataPR#printWeightBill</Property> <Property name="executingMessage">æ£å¨æ§è¡æå°â¦â¦</Property> <Property name="async">false</Property> </AjaxAction> <CustomDropDown id="ddNotice"> <Property name="minHeight">400</Property> <Property name="assignmentMap">noticeId=id,customerName=customerName</Property> <Property name="minWidth">1000</Property> <Property name="autoOpen">true</Property> <Container layout="regionPadding:5"> <DataSet id="dsNotice"> <Property name="dataProvider">inoutNoticePR#queryNoticeByKey</Property> <Property name="parameter"> <Entity> <Property name="type">${request.getParameter('type')}</Property> </Entity> </Property> <Property name="dataType">[dtNoticeDto]</Property> </DataSet> <Container layout="hbox regionPadding:5"> <TextEditor id="key3"> <Property name="blankText"> -- 客æ·åç§°æç¼ç --</Property> <Property name="width">200</Property> </TextEditor> <Button> <ClientEvent name="onClick">var key = view.get("#key3.value");
 var type = "${request.getParameter('type')}";
 view.get("#dsNotice").set("parameter",{key: key,type: type}).flushAsync();</ClientEvent> <Property name="caption">æ¥è¯¢</Property> <Property name="exClassName">btn1</Property> <Property name="iconClass">fa fa-search</Property> </Button> <Button> <ClientEvent name="onClick">var data = view.get("#dsNotice.data:#");
 if(data){
 view.get("#ddNotice").close(data.toJSON());
 }</ClientEvent> <Property name="iconClass">fa fa-check</Property> <Property name="exClassName">btn2</Property> <Property name="caption">ç¡®å®</Property> </Button> </Container> <DataGrid> <ClientEvent name="onDataRowDoubleClick">var data = view.get("#dsNotice.data:#");
 if(data){
 view.get("#ddNotice").close(data.toJSON());
 }</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="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="contract"> <Property name="property">contract</Property> <Property name="align">center</Property> <Property name="width">300</Property> </DataColumn> </DataGrid> </Container> </CustomDropDown> <CustomDropDown id="ddDicArea"> <Property name="minHeight">500</Property> <Property name="minWidth">500</Property> <Property name="assignmentMap">foodLocation=name,foodLocationId=code</Property> <Container layout="regionPadding:5"> <DataSet id="dsDicArea"> <Property name="dataProvider">dicAreaPR#pageList</Property> <Property name="parameter"></Property> <Property name="dataType">[dtArea]</Property> <Property name="pageSize">1000</Property> </DataSet> <Container layout="hbox regionPadding:5"> <TextEditor id="key2"> <Property name="blankText"> -åç§°æç®æ¼ï¼åäº¬å¸ bjs -</Property> <Property name="width">200</Property> </TextEditor> <Button> <ClientEvent name="onClick">var key = view.get("#key2.value");
 view.get("#dsDicArea").set("parameter",{key:key}).flushAsync();</ClientEvent> <Property name="caption">æ¥è¯¢</Property> <Property name="iconClass">fa fa-search</Property> <Property name="exClassName">btn1</Property> </Button> <Button> <ClientEvent name="onClick">var data = view.get("#dsDicArea.data:#");
 if(data){
 view.get("#ddDicArea").close(data.toJSON());
 }</ClientEvent> <Property name="iconClass">fa fa-check</Property> <Property name="exClassName">btn2</Property> <Property name="caption">ç¡®å®</Property> </Button> </Container> <DataGrid> <ClientEvent name="onDataRowDoubleClick">var data = view.get("#dsDicArea.data:#");
 if(data){
 view.get("#ddDicArea").close(data.toJSON());
 }</ClientEvent> <Property name="dataSet">dsDicArea</Property> <Property name="readOnly">true</Property> <DataColumn name="name"> <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = "bold";
 arg.processDefault = true;</ClientEvent> <Property name="property">name</Property> <Property name="readOnly">true</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="code"> <Property name="property">code</Property> <Property name="readOnly">true</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="simple"> <Property name="property">simple</Property> <Property name="readOnly">true</Property> <Property name="align">center</Property> </DataColumn> </DataGrid> <DataPilot layoutConstraint="bottom"> <Property name="dataSet">dsDicArea</Property> </DataPilot> </Container> </CustomDropDown> <YearDropDown id="yearDropDown"/> </View> </ViewConfig> fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticePR.java
@@ -5,12 +5,15 @@ import com.bstek.dorado.annotation.DataResolver; import com.bstek.dorado.annotation.Expose; import com.bstek.dorado.data.provider.Page; import com.fzzy.igds.constant.Constant; import com.fzzy.igds.data.NoticeDto; import com.fzzy.igds.data.NoticeParam; import com.fzzy.igds.service.InoutNoticeService; import com.fzzy.igds.domain.InoutNoticeIn; import com.fzzy.igds.domain.InoutNoticeOut; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.utils.StringUtils; import org.apache.commons.lang3.time.DateFormatUtils; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; @@ -208,4 +211,55 @@ return "fail"; } /** * inoutNoticePR#queryNoticeByKey æ ¹æ®åæ°æ¥è¯¢åºå ¥åºéç¥åï¼ç¨äºæå¨è¡¥åæ¶ï¼éæ©éç¥å * * @param * @return */ @DataProvider public List<NoticeDto> queryNoticeByKey(Map<String, Object> param) { if (param == null) { return null; } String type = (String)param.get("type"); if (StringUtils.isEmpty(type)) { return null; } List<NoticeDto> list = new ArrayList<>(); NoticeDto dto; NoticeParam noticeParam = new NoticeParam(); noticeParam.setCompanyId(ContextUtil.getCompanyId()); noticeParam.setDeptId(ContextUtil.subDeptId(null)); noticeParam.setCompleteStatus(Constant.COMPLETE_STATUS_NONE); String key = (String)param.get("key"); if (StringUtils.isNotEmpty(key)) { noticeParam.setKey(key); } if (Constant.TYPE_IN.equals(type)) { List<InoutNoticeIn> listIn = inoutNoticeService.getNoticeIn(noticeParam); if (null != listIn && listIn.size() > 0) { for (InoutNoticeIn inoutNoticeIn : listIn) { dto = new NoticeDto(); BeanUtils.copyProperties(inoutNoticeIn, dto); list.add(dto); } } } if (Constant.TYPE_OUT.equals(type)) { List<InoutNoticeOut> listOut = inoutNoticeService.getNoticeOut(noticeParam); if (null != listOut && listOut.size() > 0) { for (InoutNoticeOut inoutNoticeOut : listOut) { dto = new NoticeDto(); BeanUtils.copyProperties(inoutNoticeOut, dto); list.add(dto); } } } return list; } } fzzy-igdss-view/src/main/java/models/core.model.xml
@@ -1209,4 +1209,120 @@ <Property name="label">æ§è¡æ¶é´3</Property> </PropertyDef> </DataType> <DataType name="dtNoticeDto"> <Property name="creationType">com.fzzy.igds.data.NoticeDto</Property> <PropertyDef name="id"> <Property></Property> <Property name="label">ééåç¼ç </Property> </PropertyDef> <PropertyDef name="name"> <Property></Property> <Property name="label">éç¥ååç§°</Property> </PropertyDef> <PropertyDef name="companyId"> <Property></Property> </PropertyDef> <PropertyDef name="deptId"> <Property></Property> </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> </PropertyDef> <PropertyDef name="customerName"> <Property></Property> <Property name="label">æ¶/å货客æ·</Property> </PropertyDef> <PropertyDef name="foodVariety"> <Property></Property> <Property name="label">ç²®é£åç§</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("FOOD_VARIETY_")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </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> </PropertyDef> <PropertyDef name="completeNumber"> <Property name="dataType">Double</Property> </PropertyDef> <PropertyDef name="completeTime"> <Property name="dataType">Date</Property> </PropertyDef> <PropertyDef name="unitName"> <Property></Property> </PropertyDef> <PropertyDef name="contract"> <Property></Property> <Property name="label">æå±åå</Property> </PropertyDef> </DataType> <DataType name="dtFileData"> <Property name="creationType">com.fzzy.igds.domain.FileInfo</Property> <PropertyDef name="fileId"> <Property></Property> <Property name="label">éä»¶ID</Property> </PropertyDef> <PropertyDef name="companyId"> <Property></Property> <Property name="label">ç»ç»ç¼å·</Property> </PropertyDef> <PropertyDef name="deptId"> <Property></Property> <Property name="label">åºåºç¼ç </Property> </PropertyDef> <PropertyDef name="bizId"> <Property></Property> <Property name="label">ä¸å¡ID</Property> </PropertyDef> <PropertyDef name="bizTag"> <Property></Property> <Property name="label">ä¸å¡æ ç¾</Property> </PropertyDef> <PropertyDef name="fileName"> <Property></Property> <Property name="label">æä»¶åç§°</Property> </PropertyDef> <PropertyDef name="filePath"> <Property></Property> <Property name="label">æä»¶è·¯å¾</Property> </PropertyDef> <PropertyDef name="createTime"> <Property name="dataType">DateTime</Property> <Property name="label">å建æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="createBy"> <Property></Property> <Property name="label">å建人</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateTime"> <Property name="dataType">DateTime</Property> <Property name="label">æ´æ°æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateBy"> <Property></Property> <Property name="label">æ´æ°äºº</Property> <Property name="readOnly">true</Property> </PropertyDef> </DataType> </Model> fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/file/FileManager.java
@@ -71,7 +71,7 @@ String oldFileName = file.getOriginalFilename(); // è·åæä»¶ä¿åè·¯å¾ String filePath = fileService.getInoutFilePath(new Date()); String filePath = fileService.getFileSavePath("INOUT"); // è·åæ°çID String newFileName = ContextUtil.generateId(); fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/inout/InoutManager.java
@@ -5,10 +5,7 @@ import com.fzzy.igds.constant.RespCodeEnum; import com.fzzy.igds.data.*; import com.fzzy.igds.domain.*; import com.fzzy.igds.service.DicAreaService; import com.fzzy.igds.service.InoutConfService; import com.fzzy.igds.service.InoutNoticeService; import com.fzzy.igds.service.InoutRecordService; import com.fzzy.igds.service.*; import com.fzzy.igds.utils.ContextUtil; import com.fzzy.igds.utils.SystemUtil; import com.ruoyi.common.core.domain.entity.SysUser; @@ -35,6 +32,8 @@ private RedisCache redisCache; @Resource private InoutConfService inoutConfService; @Resource private FileService fileService; @Resource private InoutRecordService inoutRecordService; @Resource @@ -228,7 +227,7 @@ } //éä»¶å¤ç saveInoutFiles(data.getFiles(), data.getId(), curProgress); fileService.saveInoutFiles(data.getFiles(), data.getId(), curProgress, "INOUT"); return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "ç»è®°æåï¼", data); } @@ -293,6 +292,11 @@ String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf); data.setProgress(nextProgress); if(Constant.PROGRESS_RECORD.equals(nextProgress)){ //æµç¨ç»ææ¶ï¼è®¾ç½®å®ææ¶é´åå®æäºº data.setCompleteTime(new Date()); data.setCompleteUser(ContextUtil.getLoginUserName()); } //ç§°éæ°æ®æ´æ° int num = inoutRecordService.updateInoutRecord(data); @@ -301,7 +305,7 @@ } //éä»¶å¤ç saveInoutFiles(data.getFiles(), data.getId(), curProgress); fileService.saveInoutFiles(data.getFiles(), data.getId(), curProgress, "INOUT"); return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "æ§è¡æå", data); } @@ -335,28 +339,9 @@ } //éä»¶å¤ç saveInoutFiles(data.getFiles(), data.getId(), curProgress); fileService.saveInoutFiles(data.getFiles(), data.getId(), curProgress, "INOUT"); return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "æäº¤æå", data); } /** * 弿¥æ§è¡éä»¶ä¿å * @param files éä»¶ä¿¡æ¯ * @param bizId ä¸å¡id * @param progress æµç¨èç¹ */ @Async public void saveInoutFiles(List<FileInfo> files, String bizId, String progress) { if (null == files || files.isEmpty()) { return; } //TODO éä»¶é»è¾å¾ å¤ç } /** @@ -524,8 +509,8 @@ param.setCompanyId(user.getCompanyId()); } param.setDeptId(ContextUtil.subDeptId(user)); List<InoutNoticeIn> list = inoutNoticeService.getNoticeIn(param.getCompanyId(), param.getDeptId(), Constant.COMPLETE_STATUS_NONE); param.setCompleteStatus(Constant.COMPLETE_STATUS_NONE); List<InoutNoticeIn> list = inoutNoticeService.getNoticeIn(param); if (null == list || list.isEmpty()) { return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "æ¥è¯¢ç»æä¸ºç©ºï¼"); @@ -544,8 +529,8 @@ param.setCompanyId(user.getCompanyId()); } param.setDeptId(ContextUtil.subDeptId(user)); List<InoutNoticeOut> list = inoutNoticeService.getNoticeOut(param.getCompanyId(), param.getDeptId(), Constant.COMPLETE_STATUS_NONE); param.setCompleteStatus(Constant.COMPLETE_STATUS_NONE); List<InoutNoticeOut> list = inoutNoticeService.getNoticeOut(param); if (null == list || list.isEmpty()) { return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "æ¥è¯¢ç»æä¸ºç©ºï¼"); fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/print/PrintManager.java
@@ -1,21 +1,9 @@ package com.fzzy.sys.manager.print; import com.fzzy.igds.bill.InoutBill; import com.fzzy.igds.constant.Constant; import com.fzzy.igds.constant.FoodVariety; import com.fzzy.igds.data.InoutPrintBill; import com.fzzy.igds.domain.Depot; import com.fzzy.igds.domain.InoutRecord; import com.fzzy.igds.service.DepotService; import com.fzzy.igds.service.SysDeptService; import com.fzzy.igds.utils.NumberUtil; import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.utils.StringUtils; import org.apache.commons.lang3.time.DateFormatUtils; import com.fzzy.igds.service.InoutRecordService; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.text.DecimalFormat; import java.util.*; /** * @Description åæ®æå° @@ -26,9 +14,7 @@ public class PrintManager { @Resource private SysDeptService sysDeptService; @Resource private DepotService depotService; private InoutRecordService inoutRecordService; /** * è·åå ¥åºè¿ç£ åæ°æ®ä¿¡æ¯ @@ -37,87 +23,7 @@ * @return */ public String inWeightBill(InoutRecord data) { // è·åè¡¨åæ°æ® InoutPrintBill bill = this.createBillData(data, "å ¥åºåç å"); // è°æ´æ¨¡çæ°æ®å¹¶è¿å String htmlStr = InoutBill.IN_WEIGHT_DEFAULT; htmlStr = htmlStr.replace("billTitle", bill.getBillTitle()); htmlStr = htmlStr.replace("registerTime", bill.getRegisterTime()); htmlStr = htmlStr.replace("completeTime", bill.getCompleteTime()); htmlStr = htmlStr.replace("fullTime", bill.getFullTime()); htmlStr = htmlStr.replace("emptyTime", bill.getEmptyTime()); htmlStr = htmlStr.replace("serId", bill.getSerId()); htmlStr = htmlStr.replace("customerName", bill.getCustomerName()); htmlStr = htmlStr.replace("deptName", bill.getUnitName()); htmlStr = htmlStr.replace("driverName", bill.getDriverName()); htmlStr = htmlStr.replace("userNumberId", bill.getUserId()); htmlStr = htmlStr.replace("userContact", bill.getUserContact()); htmlStr = htmlStr.replace("userAddress", bill.getUserAddress()); htmlStr = htmlStr.replace("foodVariety", bill.getFoodVariety()); htmlStr = htmlStr.replace("depotName", bill.getDepotName()); htmlStr = htmlStr.replace("foodLocation", bill.getFoodLocation()); if ("5326".equals(data.getCompanyId())) { htmlStr = htmlStr.replace("recordWeight", new DecimalFormat("0").format(bill.getRecordWeight())); htmlStr = htmlStr.replace("settleWeight", new DecimalFormat("0").format(bill.getSettleWeight())); htmlStr = htmlStr.replace("fullWeight", new DecimalFormat("0").format(bill.getFullWeight())); htmlStr = htmlStr.replace("emptyWeight", new DecimalFormat("0").format(bill.getEmptyWeight())); htmlStr = htmlStr.replace("netWeight", new DecimalFormat("0").format(bill.getNetWeight())); } htmlStr = htmlStr.replace("plateNum", bill.getPlateNum()); htmlStr = htmlStr.replace("fullWeight", new DecimalFormat("0.00").format(bill.getFullWeight())); htmlStr = htmlStr.replace("emptyWeight", new DecimalFormat("0.00").format(bill.getEmptyWeight())); htmlStr = htmlStr.replace("netWeight", new DecimalFormat("0.00").format(bill.getNetWeight())); htmlStr = htmlStr.replace("deImpurity", bill.getDeImpurity() + ""); htmlStr = htmlStr.replace("deWet", bill.getDeWet() + ""); htmlStr = htmlStr.replace("recordWeight", new DecimalFormat("0.00").format(bill.getRecordWeight())); htmlStr = htmlStr.replace("deCheck", bill.getDeCheck() + ""); htmlStr = htmlStr.replace("addCheck", bill.getAddCheck() + ""); htmlStr = htmlStr.replace("deSum", bill.getDeSum() + ""); htmlStr = htmlStr.replace("settleWeight", new DecimalFormat("0.00").format(bill.getSettleWeight())); htmlStr = htmlStr.replace("dePackage", bill.getDePackage() + ""); htmlStr = htmlStr.replace("deHandle", bill.getDeHandle() + ""); htmlStr = htmlStr.replace("deOther", bill.getDeOther() + ""); htmlStr = htmlStr.replace("price", bill.getPrice()); htmlStr = htmlStr.replace("settleMoney", bill.getSettleMoney() + ""); htmlStr = htmlStr.replace("wet", bill.getWet() + ""); htmlStr = htmlStr.replace("impurity", bill.getImpurity() + ""); htmlStr = htmlStr.replace("checkStatus", bill.getCheckStatus()); htmlStr = htmlStr.replace("remark", bill.getRemark()); htmlStr = htmlStr.replace("moneyName", bill.getMoneyName()); htmlStr = htmlStr.replace("unitName", bill.getUnitName()); htmlStr = htmlStr.replace("time", bill.getRegisterTime()); htmlStr = htmlStr.replace("handleStart", ""); htmlStr = htmlStr.replace("handleEnd", ""); htmlStr = htmlStr.replace("noticeId", bill.getNoticeId() == null ? "" : bill.getNoticeId()); htmlStr = htmlStr.replace("phone", data.getUserContact() == null ? "" : data.getUserContact() + ""); htmlStr = htmlStr.replace("printTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm")); htmlStr = htmlStr.replaceAll("weightUser", bill.getWeightUser() == null ? "" : bill.getWeightUser()); htmlStr = htmlStr.replaceAll("handleUser", bill.getHandleUser() == null ? "" : bill.getHandleUser()); htmlStr = htmlStr.replaceAll("keeperName", bill.getKeeperUser() == null ? "" : bill.getKeeperUser()); return htmlStr; return inoutRecordService.inWeightBill( data); } /** @@ -127,187 +33,8 @@ * @return */ public String outWeightBill(InoutRecord data) { // è·åè¡¨åæ°æ® InoutPrintBill bill = this.createBillData(data, "åºåºåç å"); //é»è®¤æ¨¡ç String htmlStr = InoutBill.OUT_WEIGHT_DEFAULT; htmlStr = htmlStr.replace("billTitle", bill.getBillTitle()); htmlStr = htmlStr.replace("registerTime", bill.getRegisterTime()); htmlStr = htmlStr.replace("completeTime", bill.getCompleteTime()); htmlStr = htmlStr.replace("fullTime", bill.getFullTime()); htmlStr = htmlStr.replace("emptyTime", bill.getEmptyTime()); htmlStr = htmlStr.replace("serId", bill.getSerId()); htmlStr = htmlStr.replace("customerName", bill.getCustomerName()); htmlStr = htmlStr.replace("deptName", bill.getUnitName()); htmlStr = htmlStr.replace("driverName", bill.getDriverName()); htmlStr = htmlStr.replace("userNumberId", bill.getUserId()); htmlStr = htmlStr.replace("userContact", bill.getUserContact()); htmlStr = htmlStr.replace("userAddress", bill.getUserAddress()); htmlStr = htmlStr.replace("foodVariety", bill.getFoodVariety()); htmlStr = htmlStr.replace("depotName", bill.getDepotName()); htmlStr = htmlStr.replace("foodLocation", bill.getFoodLocation()); if ("5326".equals(data.getCompanyId())) { htmlStr = htmlStr.replace("recordWeight", new DecimalFormat("0").format(bill.getRecordWeight())); htmlStr = htmlStr.replace("settleWeight", new DecimalFormat("0").format(bill.getSettleWeight())); htmlStr = htmlStr.replace("fullWeight", new DecimalFormat("0").format(bill.getFullWeight())); htmlStr = htmlStr.replace("emptyWeight", new DecimalFormat("0").format(bill.getEmptyWeight())); htmlStr = htmlStr.replace("netWeight", new DecimalFormat("0").format(bill.getNetWeight())); } htmlStr = htmlStr.replace("plateNum", bill.getPlateNum()); htmlStr = htmlStr.replace("fullWeight", new DecimalFormat("0.00").format(bill.getFullWeight())); htmlStr = htmlStr.replace("emptyWeight", new DecimalFormat("0.00").format(bill.getEmptyWeight())); htmlStr = htmlStr.replace("netWeight", new DecimalFormat("0.00").format(bill.getNetWeight())); htmlStr = htmlStr.replace("dePackage", new DecimalFormat("0.00").format(bill.getDePackage())); htmlStr = htmlStr.replace("remark", bill.getRemark()); htmlStr = htmlStr.replace("settleWeight", new DecimalFormat("0.00").format(bill.getSettleWeight())); htmlStr = htmlStr.replace("deHandle", bill.getDeHandle() + ""); htmlStr = htmlStr.replace("recordWeight", new DecimalFormat("0.00").format(bill.getRecordWeight())); htmlStr = htmlStr.replace("deSum", bill.getDeSum() + ""); htmlStr = htmlStr.replace("deOther", bill.getDeOther() + ""); htmlStr = htmlStr.replace("price", bill.getPrice()); htmlStr = htmlStr.replace("settleMoney", bill.getSettleMoney() + ""); htmlStr = htmlStr.replace("wet", bill.getWet() + ""); htmlStr = htmlStr.replace("impurity", bill.getImpurity() + ""); htmlStr = htmlStr.replace("unitName", getValue(bill.getUnitName())); htmlStr = htmlStr.replace("time", bill.getRegisterTime()); htmlStr = htmlStr.replace("handleStart", ""); htmlStr = htmlStr.replace("handleEnd", ""); htmlStr = htmlStr.replace("noticeId", bill.getNoticeId() == null ? "" : bill.getNoticeId()); htmlStr = htmlStr.replace("phone", data.getUserContact() == null ? "" : data.getUserContact() + ""); htmlStr = htmlStr.replace("printTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm")); htmlStr = htmlStr.replaceAll("weightUser", getValue(bill.getWeightUser())); htmlStr = htmlStr.replace("handleUser", getValue(bill.getHandleUser())); htmlStr = htmlStr.replaceAll("keeperName", getValue(bill.getKeeperUser())); return htmlStr; } public String getValue(String value) { if (null == value) return ""; return value; } /** * å°è£ è¿ç£ åæ°æ® * * @param data * @param billTitle * @return */ private InoutPrintBill createBillData(InoutRecord data, String billTitle) { InoutPrintBill bill = new InoutPrintBill(); bill.setBillTitle(billTitle); SysDept dept = sysDeptService.getCacheDept(data.getCompanyId(), data.getDeptId()); if (null != dept && StringUtils.isNotEmpty(dept.getDeptName())) { bill.setBillTitle(dept.getDeptName() + billTitle); bill.setDeptId(dept.getDeptId() + ""); bill.setDeptName(dept.getDeptName() + ""); bill.setUnitName(dept.getDeptName()); } //æ¸ è¿åºåè´§åä½åæ é¢ï¼ä½¿ç¨å ¬å¸å if ("5368".equals(data.getCompanyId())) { SysDept company = sysDeptService.getCacheDept(data.getCompanyId(), data.getCompanyId()); if (null != company && StringUtils.isNotEmpty(company.getDeptName())) { bill.setBillTitle(company.getDeptName() + billTitle); bill.setUnitName(company.getDeptName()); } } bill.setCompanyId(data.getCompanyId() == null ? "" : data .getCompanyId()); if (null == data.getRegisterTime()) { data.setRegisterTime(new Date()); } bill.setRegisterTime(DateFormatUtils.format(data.getRegisterTime(), "yyyy-MM-dd HH:mm")); if (null == data.getCompleteTime()) { data.setCompleteTime(new Date()); } bill.setCompleteTime(DateFormatUtils.format(data.getCompleteTime(), "yyyy-MM-dd HH:mm")); bill.setEmptyTime(DateFormatUtils.format(data.getEmptyWeightTime(), "yyyy-MM-dd HH:mm:ss")); bill.setFullTime(DateFormatUtils.format(data.getFullWeightTime(), "yyyy-MM-dd HH:mm:ss")); bill.setSerId(data.getId()); if ("5016".equals(data.getCompanyId()) || "5347".equals(data.getCompanyId()) || "5352".equals(data.getCompanyId())) { bill.setCompleteTime(DateFormatUtils.format(data.getCompleteTime(), "yyyy-MM-dd")); bill.setSerId(data.getId().substring(2)); } //客æ·ä¿¡æ¯ bill.setCustomerName(data.getCustomerName() == null ? "" : data.getCustomerName()); bill.setUserId(data.getUserId() == null ? "" : data.getUserId()); bill.setUserAddress(data.getUserAddress() == null ? "" : data.getUserAddress()); bill.setUserContact(data.getUserContact() == null ? "" : data.getUserContact()); bill.setNoticeId(data.getNoticeId()); bill.setDriverName(data.getUserName() == null ? "" : data.getUserName()); // è·åä»åºä¿¡æ¯ Depot depot = depotService.getCacheDepot(data.getCompanyId(), data.getDepotId()); if (depot != null) { bill.setDepotName(depot.getName() == null ? "" : depot.getName()); bill.setHandleUser(depot.getStoreKeeperName() == null ? "" : depot .getStoreKeeperName()); } bill.setFoodVariety(FoodVariety.getMsg(data.getFoodVariety())); bill.setFoodLocation(data.getFoodLocation() == null ? "" : data .getFoodLocation()); bill.setPlateNum(data.getPlateNum()); bill.setFullWeight(data.getFullWeight()); bill.setEmptyWeight(data.getEmptyWeight()); bill.setNetWeight(data.getNetWeight()); bill.setRecordWeight(data.getRecordWeight()); bill.setCheckStatus(data.getCheckStatus().equals(Constant.STATUS_CHECK) ? "åæ ¼" : "ä¸åæ ¼"); bill.setDeOther(data.getDeOther()); bill.setSettleWeight(data.getSettleWeight()); bill.setPrice(data.getPrice() == null ? "" : data.getPrice() + ""); if (data.getSettleMoney() <= 0) { if (null != data.getPrice() && null != data.getRecordWeight()) { data.setSettleMoney(NumberUtil.keepPrecision(data.getPrice() * data.getRecordWeight(), 2)); } } bill.setSettleMoney(data.getSettleMoney() == null ? "" : data.getSettleMoney() + ""); bill.setRemark(data.getRemarks() == null ? "" : data.getRemarks()); if (Constant.TYPE_IN.equals(data.getType())) { bill.setWeightUser(data.getFullWeightUser()); } if (Constant.TYPE_OUT.equals(data.getType())) { bill.setWeightUser(data.getEmptyWeightUser()); } bill.setHandleUser(data.getHandleUser()); bill.setKeeperUser(depot.getStoreKeeperName()); return bill; return inoutRecordService.outWeightBill( data); } } fzzy-igdss-web/src/main/resources/static/inout/inout-weight2.js
@@ -234,11 +234,13 @@ * ç»è®°å¼¹çª */ function quickRegister() { $("#form-data")[0].reset(); form.render(); //ç»è®°æé®æ¾å¼ $("#btn_register").css("display", "block"); $("#text-info").removeClass("text-info"); //ç§°éæä½å¼¹çª var pro = 'ç»è®°'; var pro = 'ç»è®°ç§°é'; recordData = null; updateEditAndProgress(); flushPage(); @@ -261,8 +263,9 @@ * @param progress */ function showWindows() { //ç»è®°æé®æ¾å¼ $("#form-data")[0].reset(); form.render(); //ç»è®°æé®éè $("#btn_register").css("display", "none"); $("#text-info").addClass("text-info"); //ç§°éæä½å¼¹çª @@ -606,8 +609,8 @@ notify("æ°æ®æäº¤æå", result.data); //ç¬¬ä¸æ¬¡ç§°éåï¼å·æ°é¡µé¢ if (recordData.recordWeight <= 0.0) { flushData(); layer.closeAll(); $("#form-data")[0].reset(); form.render(); } } layer.close(index); @@ -709,7 +712,7 @@ } $("#resultIntelCard").text(data.intelCard); layer.open({ var indexNotify = layer.open({ type: 1, offset: ['150px', '200px'], area: '450px;', @@ -718,7 +721,7 @@ btn: ['ç¡®å®'], content: $('#dialog-from-notify'), yes: function (index) { layer.closeAll(); layer.close(indexNotify); } }); } else { fzzy-igdss-web/src/main/resources/templates/inout/weight.html
@@ -386,7 +386,7 @@ <label class="layui-form-label color-red">æ¯é(满车)</label> <div class="layui-input-block"> <input type="text" name="fullWeight" id="fullWeight" autocomplete="off" placeholder="å°ç£ èªå¨å¸¦å ¥" class="layui-input rkbk-search-input" placeholder="å°ç£ èªå¨å¸¦å ¥" class="layui-input weight rkbk-search-input" disabled> <em class="kccz-data-dw">KG</em> fzzy-igdss-web/src/main/resources/templates/inout/weight2.html
@@ -591,7 +591,7 @@ <label class="layui-form-label color-red">æ¯é(满车)</label> <div class="layui-input-block"> <input type="text" name="fullWeight" id="fullWeight" autocomplete="off" placeholder="å°ç£ èªå¨å¸¦å ¥" class="layui-input rkbk-search-input" placeholder="å°ç£ èªå¨å¸¦å ¥" class="layui-input weight rkbk-search-input" disabled> <em class="kccz-data-dw">KG</em>