fzzy-igdss-core/src/main/java/com/fzzy/igds/data/DeviceIotParam.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,25 @@ package com.fzzy.igds.data; import lombok.Data; /** * @Description * @Author CZT * @Date 2025/11/28 14:45 */ @Data public class DeviceIotParam { private String id; private String companyId; private String deptId; private String serId; private String depotId; private String type; } fzzy-igdss-core/src/main/java/com/fzzy/igds/data/IgdsBaseParam.java
@@ -9,8 +9,14 @@ private String id; private String companyId; private String deptId; private String name; private String depotId; private String key;//èªå®ä¹å ³é®å private Date start; fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/Camera.java
@@ -136,12 +136,4 @@ @TableField("remark") private String remark; @Transient private String playAddr;//è§é¢ææ¾å°åï¼æ ¹æ®ä¸åçææ¾æ¹å¼çæä¸åçææ¾å°å @Transient private String playIframe;//æµåªä½Iframeææ¾å°å @Transient private String msg; } fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/Depot.java
@@ -73,8 +73,8 @@ @TableField("food_level") private String foodLevel; @Column(name = "food_locationId", columnDefinition = "varchar(40) COMMENT 'ç²®é£äº§å°'") @TableField("food_locationId") @Column(name = "food_location_id", columnDefinition = "varchar(40) COMMENT 'ç²®é£äº§å°'") @TableField("food_location_id") private String foodLocationId; @Column(name = "food_location", columnDefinition = "varchar(40) COMMENT 'ç²®é£äº§å°'") @@ -123,60 +123,4 @@ @TableField("order_num") private Integer orderNum = 1; // ------------å ¶ä»å±æ§ä¿¡æ¯------------// @Transient private String foodVarietyName; @Transient private String foodTypeName; @Transient private String depotTypeName; @Transient private String depotStatusName; @Transient private String foodLevelName; @Transient private String storeKeeperLevel = "é«çº§ä¿ç®¡å"; @Transient private String storeKeeperPhone = "####"; public String getFoodLevelName() { if (null != this.foodLevel) { return FoodLevel.getMsg(this.foodLevel); } return null; } public String getFoodVarietyName() { if (null != this.foodVariety) { return FoodVariety.getMsg(this.foodVariety); } return null; } public String getFoodTypeName() { if (null != this.foodType) { return FoodType.getMsg(this.foodType); } return null; } public String getDepotTypeName() { if (null != this.depotType) { return DepotType.getMsg(this.depotType); } return null; } public String getDepotStatusName() { if (null != this.depotStatus) { return DepotStatus.getMsg(this.depotStatus); } return null; } } fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/DepotConf.java
@@ -107,12 +107,4 @@ @TableField("is_only_th") private String isOnlyTH = Constant.YN_N; // ä»åºåç§° @Transient private String depotName; //ä»åºç±»å @Transient private String depotType; } fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/Dept.java
@@ -80,8 +80,4 @@ @TableField("file_name") private String imgName; //é¸ç°å¾å ¨è·¯å¾ @Transient private String imgPath; } fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutConf.java
@@ -117,11 +117,6 @@ @TableField("remark") private String remark; //å¼å¸¸ä¿¡æ¯ @Transient private String errorMsg; public InoutConf() { super(); } @@ -147,7 +142,6 @@ this.snapType = conf.getSnapType(); this.mediaAddr = conf.getMediaAddr(); this.remark = conf.getRemark(); this.errorMsg = conf.getErrorMsg(); } public InoutConf(String sort) { fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutNoticeOut.java
@@ -46,17 +46,13 @@ @TableField("type") private String type; @Column(name = "contract_id", columnDefinition = "varchar(40) COMMENT 'æå±åå'") @TableField("contract_id") private String contractId; @Column(name = "contract", columnDefinition = "varchar(40) COMMENT 'å ³èåå'") @TableField("contract") private String contract; @Column(name = "depot_id", columnDefinition = "varchar(40) COMMENT 'åºåºä»åº'") @TableField("depot_id") private String depotId; @Column(name = "customer_id", columnDefinition = "varchar(40) COMMENT 'å货客æ·'") @TableField("customer_id") private String customerId; @Column(name = "customer_name", columnDefinition = "varchar(40) COMMENT 'åè´§åä½'") @TableField("customer_name") @@ -82,7 +78,7 @@ @TableField("complete_number") private Double completeNumber = 0.0; @Column(name = "audit_status", columnDefinition = "varchar(2) COMMENT 'å®¡æ ¸ç¶æ(10=çç®¡å®¡æ ¸ï¼20=é¶è¡å®¡æ ¸ï¼30=éè¿)'") @Column(name = "audit_status", columnDefinition = "varchar(10) COMMENT 'å®¡æ ¸ç¶æ(10=çç®¡å®¡æ ¸ï¼20=é¶è¡å®¡æ ¸ï¼30=éè¿)'") @TableField("audit_status") private String auditStatus = "10"; @@ -108,7 +104,4 @@ @TableField("remark") private String remark; @Transient @PropertyDef(label = "æ è®°", description = "ç¨äºå¤æéç¥åæ¯å¦ä¸ºæ°å¢") private String tag; } fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/QuantityConf.java
@@ -148,9 +148,4 @@ @TableField("remark") private String remark; @Transient private String playAddr;//è§é¢ææ¾å°åï¼æ ¹æ®ä¸åçææ¾æ¹å¼çæä¸åçææ¾å°å @Transient private String msg; } fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/CameraMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,16 @@ package com.fzzy.igds.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fzzy.igds.domain.Camera; import com.fzzy.igds.domain.InoutNoticeIn; import org.apache.ibatis.annotations.Mapper; /** * @Description * @Author CZT * @Date 2025/11/28 10:48 */ @Mapper public interface CameraMapper extends BaseMapper<Camera> { } fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/CoreCompanyMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,16 @@ package com.fzzy.igds.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fzzy.igds.domain.Camera; import com.fzzy.igds.domain.Company; import org.apache.ibatis.annotations.Mapper; /** * @Description * @Author CZT * @Date 2025/11/28 10:48 */ @Mapper public interface CoreCompanyMapper extends BaseMapper<Company> { } fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/CoreDeptMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,15 @@ package com.fzzy.igds.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fzzy.igds.domain.Dept; import org.apache.ibatis.annotations.Mapper; /** * @Description * @Author CZT * @Date 2025/11/28 10:48 */ @Mapper public interface CoreDeptMapper extends BaseMapper<Dept> { } fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/DepotConfMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,15 @@ package com.fzzy.igds.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fzzy.igds.domain.DepotConf; import org.apache.ibatis.annotations.Mapper; /** * @Description * @Author CZT * @Date 2025/11/28 10:48 */ @Mapper public interface DepotConfMapper extends BaseMapper<DepotConf> { } fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/DepotMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,15 @@ package com.fzzy.igds.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fzzy.igds.domain.Depot; import org.apache.ibatis.annotations.Mapper; /** * @Description * @Author CZT * @Date 2025/11/28 10:48 */ @Mapper public interface DepotMapper extends BaseMapper<Depot> { } fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/DepotStoreMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,15 @@ package com.fzzy.igds.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fzzy.igds.domain.DepotStore; import org.apache.ibatis.annotations.Mapper; /** * @Description * @Author CZT * @Date 2025/11/28 10:48 */ @Mapper public interface DepotStoreMapper extends BaseMapper<DepotStore> { } fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/DeviceIotMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,15 @@ package com.fzzy.igds.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fzzy.igds.domain.DeviceIot; import org.apache.ibatis.annotations.Mapper; /** * @Description * @Author CZT * @Date 2025/11/28 10:48 */ @Mapper public interface DeviceIotMapper extends BaseMapper<DeviceIot> { } fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/DeviceSerMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,15 @@ package com.fzzy.igds.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fzzy.igds.domain.DeviceSer; import org.apache.ibatis.annotations.Mapper; /** * @Description * @Author CZT * @Date 2025/11/29 10:48 */ @Mapper public interface DeviceSerMapper extends BaseMapper<DeviceSer> { } fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/InoutConfMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,15 @@ package com.fzzy.igds.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fzzy.igds.domain.InoutConf; import org.apache.ibatis.annotations.Mapper; /** * @Description * @Author CZT * @Date 2025/11/25 16:24 */ @Mapper public interface InoutConfMapper extends BaseMapper<InoutConf> { } fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/InoutNoticeMapper.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/InoutNoticeOutMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,10 @@ package com.fzzy.igds.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fzzy.igds.domain.InoutNoticeOut; import org.apache.ibatis.annotations.Mapper; @Mapper public interface InoutNoticeOutMapper extends BaseMapper<InoutNoticeOut> { } fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/InoutSysConfMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,15 @@ package com.fzzy.igds.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fzzy.igds.domain.InoutSysConf; import org.apache.ibatis.annotations.Mapper; /** * @Description * @Author CZT * @Date 2025/11/25 16:24 */ @Mapper public interface InoutSysConfMapper extends BaseMapper<InoutSysConf> { } fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/QuantityConfMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,15 @@ package com.fzzy.igds.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fzzy.igds.domain.QuantityConf; import org.apache.ibatis.annotations.Mapper; /** * @Description * @Author CZT * @Date 2025/11/29 10:48 */ @Mapper public interface QuantityConfMapper extends BaseMapper<QuantityConf> { } fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/CompanyRepository.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/DepotConfRepository.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/DepotRepository.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/DepotStoreRepository.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/DeptRepository.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/DeviceIotRepository.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/DeviceSerRepository.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/DicAreaRepository.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/InoutConfRepository.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/InoutNoticeInRepository.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/InoutNoticeOutRepository.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/InoutSysConfRepository.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/QuantityConfRepository.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/SecCameraRepository.java
ÎļþÒÑɾ³ý fzzy-igdss-core/src/main/java/com/fzzy/igds/service/CoreCompanyService.java
@@ -1,10 +1,10 @@ package com.fzzy.igds.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.fzzy.igds.domain.Company; import com.fzzy.igds.repository.CompanyRepository; import com.fzzy.igds.mapper.CoreCompanyMapper; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.utils.StringUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -20,46 +20,39 @@ public class CoreCompanyService { @Resource private CompanyRepository companyRepository; private CoreCompanyMapper coreCompanyMapper; /** * jpaæ¥è¯¢å ¬å¸ä¿¡æ¯ * æ ¹æ®æ¡ä»¶æ¥è¯¢å ¬å¸ä¿¡æ¯ * @param id * @param companyId * @param parentId * @return */ public List<Company> getDataById(String id) { public List<Company> listCompany(String id, String companyId, String parentId) { return companyRepository.getDataById(id); } QueryWrapper<Company> queryWrapper = new QueryWrapper<>(); /** * jpaæ¥è¯¢å ¬å¸ä¿¡æ¯ * @return */ public List<Company> getAllData(String companyId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); if(StringUtils.isNotBlank(id)){ queryWrapper.eq("id", id); } return companyRepository.getAllData(companyId); if(StringUtils.isNotBlank(companyId)){ queryWrapper.eq("company_id", companyId); } if(StringUtils.isNotBlank(parentId)){ queryWrapper.likeRight("id", parentId); } return coreCompanyMapper.selectList(queryWrapper); } /** * jpaæ¥è¯¢å ¬å¸ä¿¡æ¯ * @return */ public List<Company> getDataByParentId() { SysUser user = ContextUtil.getLoginUser(); return companyRepository.getDataByParentId(user.getDeptId() + "%"); } /** * jpaæ°å¢å ¬å¸ä¿¡æ¯ * æ´æ°æä¿åå ¬å¸ä¿¡æ¯ * @param sysDept * @param isAdd * @return */ public void saveOrUpdate(SysDept sysDept) { public void saveOrUpdate(SysDept sysDept, Boolean isAdd) { if (null == sysDept) { return; } @@ -72,15 +65,30 @@ company.setDwzt(sysDept.getStatus()); company.setCompanyId(sysDept.getCompanyId()); //åå»ºä¿¡æ¯ company.setCreateBy(ContextUtil.getLoginUserName()); company.setCreateTime(new Date()); this.update(company); if (isAdd) { this.save(company); }else { this.update(company); } } /** * jpaæ´æ°å ¬å¸ä¿¡æ¯ * æ°å¢å ¬å¸ä¿¡æ¯ * @param data */ public void save(Company data) { if (StringUtils.isEmpty(data.getCompanyId())) { data.setCompanyId(ContextUtil.getCompanyId()); } //æ°å¢ä¿¡æ¯ data.setCreateBy(ContextUtil.getLoginUserName()); data.setCreateTime(new Date()); coreCompanyMapper.insert(data); } /** * æ´æ°å ¬å¸ä¿¡æ¯ * @param data */ public void update(Company data) { @@ -91,7 +99,7 @@ data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); companyRepository.save(data); coreCompanyMapper.updateById( data); } /** @@ -100,6 +108,6 @@ * @return */ public void delData(String deptId) { companyRepository.deleteById(deptId); coreCompanyMapper.deleteById(deptId); } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/CoreDeptService.java
@@ -1,8 +1,9 @@ package com.fzzy.igds.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.fzzy.igds.constant.Constant; import com.fzzy.igds.domain.Dept; import com.fzzy.igds.repository.DeptRepository; import com.fzzy.igds.mapper.CoreDeptMapper; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysUser; @@ -24,49 +25,55 @@ @Resource private ISysDeptService iSysDeptService; @Resource private DeptRepository deptRepository; private CoreDeptMapper coreDeptMapper; @Resource private InoutConfService inoutConfService; /** * jpaæ¥è¯¢ä¿¡æ¯ * æ ¹æ®æ¡ä»¶æ¥è¯¢åºåºä¿¡æ¯ * @param id * @param companyId * @param parentId * @return */ public List<Dept> getDataByParentId(String parentId) { return deptRepository.getDataByParentId(parentId + "%"); } public List<Dept> listDept(String id, String companyId, String parentId) { QueryWrapper<Dept> queryWrapper = new QueryWrapper<>(); /** * jpaæ¥è¯¢ä¿¡æ¯ * @return */ public List<Dept> getAllDeptData() { return deptRepository.getAllData(ContextUtil.getCompanyId()); if(StringUtils.isNotBlank(id)){ queryWrapper.eq("id", id); } if(StringUtils.isNotBlank(companyId)){ queryWrapper.eq("company_id", companyId); } if(StringUtils.isNotBlank(parentId)){ queryWrapper.likeRight("id", parentId); } return coreDeptMapper.selectList(queryWrapper); } /** * jpaæ¥è¯¢ä¿¡æ¯ * æ¥è¯¢ä¿¡æ¯ * @return */ public List<Dept> getDeptData() { SysUser user = ContextUtil.getLoginUser(); SysDept userDept = iSysDeptService.selectDeptById(user.getDeptId()); if (Constant.DEPT_TYPE_20.equals(userDept.getType())) { return deptRepository.getDataById(ContextUtil.subDeptId(user)); return this.listDept(ContextUtil.subDeptId(user),null,null); }else { return deptRepository.getDataByParentId(user.getDeptId() + "%"); return this.listDept(null,null,user.getDeptId() + "%"); } } /** * jpaæ°å¢åºåºä¿¡æ¯ * æ°å¢ææ´æ°åºåºä¿¡æ¯ * @param sysDept * @param isAdd * @return */ public void saveOrUpdate(SysDept sysDept) { public void saveOrUpdate(SysDept sysDept, Boolean isAdd) { if (null == sysDept) { return; } @@ -75,29 +82,45 @@ dept.setKqmc(sysDept.getDeptName()); dept.setCompanyId(sysDept.getCompanyId()); //åå»ºä¿¡æ¯ dept.setCreateBy(ContextUtil.getLoginUserName()); dept.setCreateTime(new Date()); this.update(dept); //çæåºå ¥åºæµç¨é ç½®ä¿¡æ¯ inoutConfService.initSysConfData(sysDept.getCompanyId(), dept.getId()); if (isAdd) { this.save(dept); }else { this.update(dept); } } /** * jpaæ´æ°åºåºä¿¡æ¯ * ä¿ååºåºä¿¡æ¯ * @param data */ public void save(Dept data) { if (StringUtils.isEmpty(data.getCompanyId())) { data.setCompanyId(ContextUtil.getCompanyId()); } //åå»ºä¿¡æ¯ data.setCreateBy(ContextUtil.getLoginUserName()); data.setCreateTime(new Date()); coreDeptMapper.insert(data); //åå§ååºå ¥åºæµç¨é ç½®ä¿¡æ¯ inoutConfService.initSysConfData(data.getCompanyId(), data.getId()); } /** * æ´æ°åºåºä¿¡æ¯ * @param data */ public void update(Dept data) { if (StringUtils.isEmpty(data.getCompanyId())) { data.setCompanyId(ContextUtil.getCompanyId()); } //æ´æ°ä¿¡æ¯ data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); deptRepository.save(data); coreDeptMapper.updateById(data); } /** @@ -107,7 +130,7 @@ */ public void delData(String deptId) { //å é¤åºåºä¿¡æ¯ deptRepository.deleteById(deptId); coreDeptMapper.deleteById(deptId); //å 餿µç¨é ç½®ä¿¡æ¯ inoutConfService.delSysConfData(deptId); fzzy-igdss-core/src/main/java/com/fzzy/igds/service/DepotConfService.java
@@ -1,9 +1,11 @@ package com.fzzy.igds.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.fzzy.igds.constant.RedisConst; import com.fzzy.igds.domain.Depot; import com.fzzy.igds.domain.DepotConf; import com.fzzy.igds.repository.DepotConfRepository; import com.fzzy.igds.mapper.DepotConfMapper; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.StringUtils; @@ -26,14 +28,14 @@ public class DepotConfService { @Resource private DepotConfRepository depotConfRepository; private DepotConfMapper depotConfMapper; @Resource private DepotService depotService; @Resource private RedisCache redisCache; /** * jpaæ¥è¯¢é ç½®ä¿¡æ¯ * æ¥è¯¢é ç½®ä¿¡æ¯ * * @param companyId * @param deptId @@ -44,14 +46,17 @@ if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } if (StringUtils.isEmpty(deptId)) { deptId = ContextUtil.subDeptId(null); QueryWrapper<DepotConf> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("company_id", companyId); if(StringUtils.isNotBlank(deptId)){ queryWrapper.eq("dept_id", deptId); } return depotConfRepository.getDepotConf(companyId, deptId); return depotConfMapper.selectList(queryWrapper); } /** * jpaæ´æ°ä¿åé ç½®ä¿¡æ¯ * æ´æ°ä¿åé ç½®ä¿¡æ¯ * * @param conf */ @@ -61,23 +66,31 @@ } if (StringUtils.isEmpty(conf.getDeptId())) { conf.setDeptId(ContextUtil.subDeptId(null)); } if (null == conf.getUpdateBy()) { conf.setCreateBy(ContextUtil.getLoginUserName()); conf.setCreateTime(new Date()); conf.setUpdateBy(ContextUtil.getLoginUserName()); conf.setUpdateTime(new Date()); depotConfMapper.insert(conf); }else { conf.setUpdateBy(ContextUtil.getLoginUserName()); conf.setUpdateTime(new Date()); depotConfMapper.update(conf, new UpdateWrapper<DepotConf>().eq("depot_id", conf.getDepotId())); } conf.setUpdateBy(ContextUtil.getLoginUserName()); conf.setUpdateTime(new Date()); depotConfRepository.save(conf); flushConfCache(conf.getCompanyId()); } /** * jpaå é¤é ç½®ä¿¡æ¯ * å é¤é ç½®ä¿¡æ¯ * * @param conf * @return */ public void deleteDepotConf(DepotConf conf) { depotConfRepository.delete(conf); depotConfMapper.deleteById( conf); //å é¤é ç½®ç¼å this.delCacheDepotConf(conf, conf.getCompanyId()); @@ -91,14 +104,8 @@ */ public void setCacheDepotConf(List<DepotConf> list, String companyId) { if (null != list) { Depot depot; String key; for (DepotConf depotConf : list) { depot = depotService.getCacheDepot(companyId, depotConf.getDepotId()); if (null != depot) { depotConf.setDepotName(depot.getName()); depotConf.setDepotType(depot.getDepotType()); } key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT_CONF, depotConf.getDepotId()); redisCache.setCacheObject(key, depotConf); } @@ -199,30 +206,11 @@ String key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT_CONF, depotId); DepotConf depotConf = redisCache.getCacheObject(key); if (null == depotConf) { depotConf = depotConfRepository.getDepotConfByDepotId(companyId, depotId); depotConf = depotConfMapper.selectById(depotId); redisCache.setCacheObject(key, depotConf); } return depotConf; } /** * æ ¹æ®ä»åºå表ï¼èªå¨çæä»åºé ç½®ä¿¡æ¯ * @param companyId */ private void addConfByDepot(String companyId) { List<Depot> list = depotService.getCacheDepotList(companyId); if (null == list || list.isEmpty()) { return; } DepotConf conf; for (Depot depot : list) { conf = new DepotConf(); conf.setDepotId(depot.getId()); conf.setCompanyId(depot.getCompanyId()); conf.setDeptId(depot.getDeptId()); this.saveConf(conf); } } /** @@ -234,7 +222,7 @@ companyId = ContextUtil.getCompanyId(); } List<DepotConf> list = depotConfRepository.getDepotConfByCompanyId(companyId); List<DepotConf> list = this.getConfList(companyId, null); this.setCacheDepotConf(list, companyId); } @@ -244,6 +232,8 @@ * @param freq */ public void updateFreq(String freq) { depotConfRepository.updateGrainFreq(ContextUtil.getCompanyId(), ContextUtil.subDeptId(null), freq); UpdateWrapper<DepotConf> updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("dept_id", ContextUtil.subDeptId(null)).set("pos_x", freq); depotConfMapper.update(null, updateWrapper); } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/DepotService.java
@@ -1,13 +1,13 @@ package com.fzzy.igds.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.fzzy.igds.constant.RedisConst; import com.fzzy.igds.domain.Depot; import com.fzzy.igds.domain.DepotStore; import com.fzzy.igds.repository.DepotRepository; import com.fzzy.igds.mapper.DepotMapper; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.mapper.SysDeptMapper; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -23,41 +23,43 @@ public class DepotService { @Resource private DepotRepository depotRepository; private DepotMapper depotMapper; @Resource private RedisCache redisCache; /** * jpaæ¥è¯¢ä»åºå表 * æ¥è¯¢åºåºä¸ä»åºå表 * * @param companyId * @param deptId * @param idDesc æ¯å¦IDååºæå * @return */ public List<Depot> getData(String companyId, String deptId) { public List<Depot> getData(String companyId, String deptId, boolean idDesc) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } if (StringUtils.isEmpty(deptId)) { deptId = ContextUtil.subDeptId(null); QueryWrapper<Depot> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("company_id", companyId); if(StringUtils.isNotBlank(deptId)){ queryWrapper.eq("dept_id", deptId); } return depotRepository.getDepot(companyId, deptId); if(idDesc){ //IDååº queryWrapper.orderByDesc("id"); }else { //åºå·æ£åº queryWrapper.orderByAsc("order_num"); } return depotMapper.selectList(queryWrapper); } /** * jpaæ¥è¯¢ä»åºå表 * @param ids * @return */ public List<Depot> getDepotByIds(List<String> ids) { if (null == ids ||ids.isEmpty()) { return null; } return depotRepository.getDepotByIds(ids); } /** * jpaä¿åæ´æ°ä»åºä¿¡æ¯ * ä¿åæ´æ°ä»åºä¿¡æ¯ * * @param depot */ public void saveDepot(Depot depot) { @@ -67,38 +69,42 @@ if (StringUtils.isEmpty(depot.getDeptId())) { depot.setDeptId(ContextUtil.subDeptId(null)); } //é»è®¤é¡ºåºå· if (null == depot.getOrderNum()) { depot.setOrderNum(1); } //主é®ID if (StringUtils.isEmpty(depot.getId())) { depot.setId(getStrId(depot.getDeptId())); depot.setCreateBy(ContextUtil.getLoginUserName()); depot.setCreateTime(new Date()); depotMapper.insert(depot); }else { depot.setUpdateBy(ContextUtil.getLoginUserName()); depot.setUpdateTime(new Date()); depotMapper.updateById(depot); } //é»è®¤é¡ºåºå· if(null == depot.getOrderNum()){ depot.setOrderNum(1); } depot.setUpdateBy(ContextUtil.getLoginUserName()); depot.setUpdateTime(new Date()); depotRepository.save(depot); flushCache(depot.getCompanyId()); } /** * è·å主é®ID * * @param deptId * @param deptId */ public String getStrId(String deptId) { List<Depot> depots = depotRepository.getDepotMaxId(deptId); List<Depot> depots = this.getData(null, deptId, true); String oldOrderId = null; if(null != depots && depots.size() > 0){ if (null != depots && depots.size() > 0) { oldOrderId = depots.get(0).getId().substring(deptId.length()); } return deptId + ContextUtil.getOrderId(oldOrderId, 3); } /** * jpaæ´æ°ä»åºç¶æ * æ´æ°ä»åºç¶æ * * @param depotId * @param status */ @@ -106,15 +112,19 @@ if (StringUtils.isEmpty(depotId)) { return; } depotRepository.updateDepotStatus(status, depotId); UpdateWrapper<Depot> updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("id", depotId).set("depot_status", status); depotMapper.update(null, updateWrapper); } /** * jpaå é¤ä»åºè´§ä½ä¿¡æ¯ * å é¤ä»åºè´§ä½ä¿¡æ¯ * * @param depot */ public void deleteDepot(Depot depot) { depotRepository.delete(depot); depotMapper.deleteById(depot); //å é¤é ç½®ç¼å this.delCacheDepot(depot, depot.getCompanyId()); @@ -122,6 +132,7 @@ /** * å·æ°ä»åºè´§ä½ç¼å * * @param companyId */ public void flushCache(String companyId) { @@ -129,13 +140,14 @@ companyId = ContextUtil.getCompanyId(); } List<Depot> list = depotRepository.getDepotByCompanyId(companyId); List<Depot> list = this.getData(companyId,null, false); this.setCacheDepotList(list, companyId); } /** * 设置ç¼å * * @param list * @param companyId */ @@ -150,6 +162,7 @@ /** * å é¤ç¼åä¿¡æ¯ * * @param depot * @param companyId */ @@ -157,7 +170,7 @@ if (null == depot) { return; } if(StringUtils.isEmpty(companyId)){ if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } String key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT, depot.getId()); @@ -166,11 +179,12 @@ /** * è·åç¼å-æ ¹æ®ç»ç»ç¼ç è·åä»åºéå * * @param companyId * @return */ public List<Depot> getCacheDepotList(String companyId) { if(StringUtils.isEmpty(companyId)){ if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } String patten = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT) + "*"; @@ -185,8 +199,8 @@ list.add((Depot) redisCache.getCacheObject(key)); } //ç¼åè·å为空ï¼åæ¥è¯¢æ°æ®åº if(list.size() < 1){ list = depotRepository.getDepotByCompanyId(companyId); if (list.size() < 1) { list = this.getData(companyId,null, false); setCacheDepotList(list, companyId); } @@ -197,6 +211,7 @@ /** * è·åç¼å-æ ¹æ®ç»ç»ç¼ç ååºåºç¼ç è·åä»åºéå * * @param companyId * @param deptId * @return @@ -206,7 +221,7 @@ return null; } List<Depot> list = getCacheDepotList(companyId); if(null == list || list.isEmpty()){ if (null == list || list.isEmpty()) { return null; } List<Depot> result = new ArrayList<>(); @@ -222,6 +237,7 @@ /** * è·åä»åºä¿¡æ¯-æ ¹æ®ä»åºç¼ç è·åç¼åä¿¡æ¯ * * @param companyId * @param depotId * @return @@ -230,40 +246,15 @@ if (StringUtils.isEmpty(depotId)) { return null; } if(StringUtils.isEmpty(companyId)){ if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } String key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT, depotId); Depot depot = redisCache.getCacheObject(key); if(null == depot){ depot = depotRepository.getDepotById(companyId, depotId); if (null == depot) { depot = depotMapper.selectById(depotId); redisCache.setCacheObject(key, depot); } return depot; } /** * æ ¹æ®åºåä¿¡æ¯æ´æ°ä»åºä¿¡æ¯ * @param data */ public void updateByStore(DepotStore data) { Depot depot = this.getCacheDepot(data.getCompanyId(), data.getDepotId()); if (null == depot) { return; } depot.setStorageReal(data.getStorageReal()); depot.setDepotStatus(data.getDepotStatus()); depot.setFoodLevel(data.getFoodLevel()); depot.setFoodLocation(data.getFoodLocation()); depot.setFoodVariety(data.getFoodVariety()); depot.setFoodType(data.getFoodType()); depot.setFoodYear(data.getFoodYear()); if (null != data.getStoreDate()) { depot.setStoreDate(data.getStoreDate()); } this.saveDepot(depot); } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/DepotStoreService.java
@@ -1,15 +1,17 @@ package com.fzzy.igds.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fzzy.igds.data.IgdsBaseParam; import com.fzzy.igds.domain.Depot; import com.fzzy.igds.domain.DepotStore; import com.fzzy.igds.repository.DepotRepository; import com.fzzy.igds.repository.DepotStoreRepository; import com.fzzy.igds.mapper.DepotMapper; import com.fzzy.igds.mapper.DepotStoreMapper; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.time.DateFormatUtils; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.Date; @@ -25,23 +27,33 @@ public class DepotStoreService { @Resource private DepotStoreRepository depotStoreRepository; private DepotStoreMapper depotStoreMapper; @Resource private DepotRepository depotRepository; private DepotMapper depotMapper; /** * JPAå页æ¥è¯¢æ°æ® * * @param specification * @param pageable * @return */ public Page<DepotStore> findAll(Specification<DepotStore> specification, Pageable pageable) { return depotStoreRepository.findAll(specification, pageable); public void listPageData(Page<DepotStore> page, IgdsBaseParam param) { QueryWrapper<DepotStore> queryWrapper = new QueryWrapper<>(); param.setCompanyId(ContextUtil.getCompanyId()); param.setDeptId(ContextUtil.subDeptId(null)); queryWrapper.eq("company_id", param.getCompanyId()); queryWrapper.eq("dept_id", param.getDeptId()); if (StringUtils.isNotBlank(param.getName())) { queryWrapper.eq("depot_id", param.getName()); } if (null != param.getStart()) { queryWrapper.ge("update_time", param.getStart()); } if (null != param.getEnd()) { queryWrapper.le("update_time", param.getEnd()); } depotStoreMapper.selectPage(page, queryWrapper); } /** * JPAæ´æ°ä¿åæ°æ® * æ´æ°ä¿åæ°æ® * * @param data */ @@ -52,36 +64,48 @@ if (StringUtils.isEmpty(data.getDeptId())) { data.setDeptId(ContextUtil.subDeptId(null)); } data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); data.setId(data.getDepotId() + "_" + DateFormatUtils.format(data.getStoreDate(), "yyyyMMddHHmmss") + "_" + DateFormatUtils.format(data.getUpdateTime(), "yyyyMMddHHmmss")); data.setCreateTime(new Date()); data.setRemark("ç³»ç»çæ"); depotStoreRepository.save(data); if (StringUtils.isEmpty(data.getId())) { data.setId(data.getDepotId() + "_" + DateFormatUtils.format(data.getStoreDate(), "yyyyMMddHHmmss") + "_" + DateFormatUtils.format(data.getUpdateTime(), "yyyyMMddHHmmss")); data.setCreateTime(new Date()); data.setRemark("ç³»ç»çæ"); data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); depotStoreMapper.insert(data); }else{ data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); depotStoreMapper.updateById(data); } } /** * JPAå 餿°æ® * å 餿°æ® * * @param data * @return */ public String delDepotStore(DepotStore data) { depotStoreRepository.delete(data); depotStoreMapper.deleteById(data); return null; } /** * JPAè·åä»åºæå䏿¡åºåæ°æ® * è·åä»åºæå䏿¡åºåæ°æ® * * @param depotId * @param time * @return */ public DepotStore getLastData(String depotId, Date time) { List<DepotStore> list = depotStoreRepository.getDataByDepotId(depotId, time); QueryWrapper<DepotStore> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("depot_id", depotId); queryWrapper.ge("create_time", time); queryWrapper.le("create_time", time); queryWrapper.orderByDesc("create_time"); List<DepotStore> list = depotStoreMapper.selectList(queryWrapper); if (null == list || list.isEmpty()) { return null; } @@ -92,12 +116,13 @@ if (null == store.getUpdateTime()) store.setUpdateTime(new Date()); if (null == store.getId()) store.setId(ContextUtil.generateId()); depotStoreRepository.save(store); depotStoreMapper.insert(store); if (updateDepot) { depotRepository.updateDepotStorage(store.getStorageReal(), store.getDepotId()); UpdateWrapper<Depot> updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("id", store.getDepotId()).set("storage_real", store.getStorageReal()); depotMapper.update(null, updateWrapper); } } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/DeviceIotService.java
@@ -1,15 +1,16 @@ package com.fzzy.igds.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.fzzy.igds.constant.RedisConst; import com.fzzy.igds.data.DeviceIotParam; import com.fzzy.igds.domain.DeviceIot; import com.fzzy.igds.repository.DeviceIotRepository; import com.fzzy.igds.mapper.DeviceIotMapper; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.domain.Specification; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.*; @@ -27,17 +28,46 @@ @Resource private RedisCache redisCache; @Resource private DeviceIotRepository deviceIotRepository; private DeviceIotMapper deviceIotMapper; /** * JPAå页æ¥è¯¢æ°æ® * * @param specification * @param pageable * @return * å页æ¥è¯¢æ°æ® * @param page * @param param */ public Page<DeviceIot> findAll(Specification<DeviceIot> specification, Pageable pageable) { return deviceIotRepository.findAll(specification, pageable); public void listPageData(Page<DeviceIot> page, DeviceIotParam param) { QueryWrapper<DeviceIot> queryWrapper = new QueryWrapper<>(); param.setCompanyId(ContextUtil.getCompanyId()); param.setDeptId(ContextUtil.subDeptId(null)); queryWrapper.eq("company_id", param.getCompanyId()); queryWrapper.eq("dept_id", param.getDeptId()); if (StringUtils.isNotBlank(param.getDepotId())) { queryWrapper.eq("depot_id", param.getDepotId()); } if (StringUtils.isNotBlank(param.getType())) { queryWrapper.eq("type", param.getType()); } if (StringUtils.isNotBlank(param.getSerId())) { queryWrapper.eq("ser_id", param.getSerId()); } deviceIotMapper.selectPage(page, queryWrapper); } /** * æ ¹æ®æ¡ä»¶æ¥è¯¢ * @param companyId */ public List<DeviceIot> listData(String companyId) { QueryWrapper<DeviceIot> queryWrapper = new QueryWrapper<>(); if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } queryWrapper.eq("company_id", companyId); return deviceIotMapper.selectList(queryWrapper); } /** @@ -55,10 +85,14 @@ deviceIot.setId(ContextUtil.generateId()); deviceIot.setCreateBy(ContextUtil.getLoginUserName()); deviceIot.setCreateTime(new Date()); deviceIot.setUpdateBy(ContextUtil.getLoginUserName()); deviceIot.setUpdateTime(new Date()); deviceIotMapper.insert(deviceIot); }else { deviceIot.setUpdateBy(ContextUtil.getLoginUserName()); deviceIot.setUpdateTime(new Date()); deviceIotMapper.updateById(deviceIot); } deviceIot.setUpdateBy(ContextUtil.getLoginUserName()); deviceIot.setUpdateTime(new Date()); deviceIotRepository.save(deviceIot); } /** @@ -66,7 +100,7 @@ * @param deviceIot */ public void delDepotDeviceIot(DeviceIot deviceIot) { deviceIotRepository.delete(deviceIot); deviceIotMapper.deleteById(deviceIot); } /** @@ -77,7 +111,9 @@ * @param posY */ public void updatePos(String deviceId, Double posX, Double posY) { deviceIotRepository.updatePos(deviceId, posX, posY); UpdateWrapper<DeviceIot> updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("id", deviceId).set("pos_x", posX).set("pos_y", posY); deviceIotMapper.update(null, updateWrapper); } /** @@ -89,7 +125,7 @@ companyId = ContextUtil.getCompanyId(); } // è·åææç设å¤ä¿¡æ¯ List<DeviceIot> listAll =deviceIotRepository.getDeviceIotByCompanyId(companyId); List<DeviceIot> listAll =this.listData(companyId); if (null != listAll) { this.setCacheAllDeviceIot(listAll, companyId); fzzy-igdss-core/src/main/java/com/fzzy/igds/service/DeviceSerService.java
@@ -1,9 +1,11 @@ package com.fzzy.igds.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.fzzy.igds.constant.Constant; import com.fzzy.igds.constant.RedisConst; import com.fzzy.igds.domain.DeviceSer; import com.fzzy.igds.repository.DeviceSerRepository; import com.fzzy.igds.mapper.DeviceSerMapper; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysUser; @@ -26,21 +28,37 @@ @Resource private ISysDeptService iSysDeptService; @Resource private DeviceSerRepository deviceSerRepository; private DeviceSerMapper deviceSerMapper; @Resource private RedisCache redisCache; /** * JPA æ¥è¯¢åæºå表 * æ ¹æ®æ¡ä»¶æ¥è¯¢åæºä¿¡æ¯ * * @param companyId * @param deptId * @param parentId * @return */ public List<DeviceSer> getAllSerByCompanyId(String companyId) { return deviceSerRepository.getAllSerByCompanyId(companyId); public List<DeviceSer> listDeviceSer(String companyId, String deptId, String parentId) { QueryWrapper<DeviceSer> queryWrapper = new QueryWrapper<>(); if (StringUtils.isNotBlank(companyId)) { queryWrapper.eq("company_id", companyId); } if (StringUtils.isNotBlank(deptId)) { queryWrapper.eq("dept_id", deptId); } if (StringUtils.isNotBlank(parentId)) { queryWrapper.likeRight("dept_id", parentId); } return deviceSerMapper.selectList(queryWrapper); } /** * JPA æ¥è¯¢åæºå表 * æ¥è¯¢åæºå表 * * @return */ @@ -48,14 +66,15 @@ SysUser user = ContextUtil.getLoginUser(); SysDept userDept = iSysDeptService.selectDeptById(user.getDeptId()); if (Constant.DEPT_TYPE_20.equals(userDept.getType())) { return deviceSerRepository.getDataByDeptId(user.getDeptId() + ""); }else { return deviceSerRepository.getDataByParentId(user.getDeptId() + "%"); return this.listDeviceSer(null, user.getDeptId() + "", null); } else { return this.listDeviceSer(null, null, user.getDeptId() + ""); } } /** * JPA æ¥è¯¢åæº * æ¥è¯¢åæº * * @param companyId * @param id @@ -69,11 +88,16 @@ if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } return deviceSerRepository.getDataById(companyId, id); QueryWrapper<DeviceSer> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("company_id", companyId); queryWrapper.eq("id", id); return deviceSerMapper.selectOne(queryWrapper); } /** * JPA æ´æ°ä¿ååæº * æ´æ°ä¿ååæº * * @param ser */ @@ -86,23 +110,32 @@ } if (StringUtils.isEmpty(ser.getCompanyId())) { ser.setCompanyId(ContextUtil.getCompanyId()); } if (StringUtils.isEmpty(ser.getDeptId())) { ser.setDeptId(ContextUtil.subDeptId(null)); } if (StringUtils.isBlank(ser.getUpdateBy())) { ser.setCreateBy(ContextUtil.getLoginUserName()); ser.setCreateTime(new Date()); ser.setUpdateBy(ContextUtil.getLoginUserName()); ser.setUpdateTime(new Date()); deviceSerMapper.insert(ser); } else { ser.setUpdateBy(ContextUtil.getLoginUserName()); ser.setUpdateTime(new Date()); deviceSerMapper.updateById(ser); } ser.setUpdateBy(ContextUtil.getLoginUserName()); ser.setUpdateTime(new Date()); deviceSerRepository.save(ser); refreshCache(ser.getCompanyId()); } /** * JPA æ´æ°ä¿ååæº * æ´æ°ä¿ååæº * * @param ser */ public void delSer(DeviceSer ser) { deviceSerRepository.delete(ser); deviceSerMapper.deleteById(ser); //å é¤ç¼å delCache(ser.getCompanyId(), ser.getId()); @@ -111,6 +144,7 @@ /** * æ´æ°åæºä¿¡æ¯ * * @param status * @param ip * @param port @@ -124,12 +158,13 @@ ser.setPort(port); ser.setUpdateTime(new Date()); deviceSerRepository.save(ser); deviceSerMapper.updateById(ser); setCacheSer(ser); } /** * æ´æ°åæºä¿¡æ¯ * * @param data */ public void updateByData(DeviceSer data) { @@ -145,13 +180,14 @@ ser.setPort(data.getPort()); ser.setUpdateTime(new Date()); ser.setSn(data.getSn()); deviceSerRepository.save(ser); deviceSerMapper.updateById(ser); setCacheSer(ser); } /** * æ´æ°åæºä¿¡æ¯ * * @param companyId * @param serId * @param controlModel @@ -166,7 +202,7 @@ ser.setStatus(Constant.YN_Y); ser.setControlModel(controlModel); ser.setUpdateTime(new Date()); deviceSerRepository.save(ser); deviceSerMapper.updateById(ser); setCacheSer(ser); } @@ -180,7 +216,7 @@ if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } List<DeviceSer> list = this.getAllSerByCompanyId(companyId); List<DeviceSer> list = this.listDeviceSer(companyId, null, null); this.setCacheSer(list, companyId); } @@ -270,16 +306,17 @@ /** * æ ¹æ®ç±»åè·ååæºä¿¡æ¯ * * @param companyId * @param type * @return */ public List<DeviceSer> getSerCacheByType(String companyId, String type) { List<DeviceSer> listAll = this.getCacheSerList(companyId); if (null == listAll || listAll.isEmpty()){ if (null == listAll || listAll.isEmpty()) { return null; } if (null == type){ if (null == type) { return listAll; } List<DeviceSer> result = new ArrayList<DeviceSer>(); @@ -391,25 +428,33 @@ } /** * JPA-æ´æ°è®¾å¤å ¨é¨ç¦»çº¿ * -æ´æ°è®¾å¤å ¨é¨ç¦»çº¿ * * @param companyId */ public void allOffLine(String companyId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } deviceSerRepository.updateSerStatus(companyId, Constant.YN_N); UpdateWrapper<DeviceSer> updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("company_id", companyId).set("status", Constant.YN_N); deviceSerMapper.update(null, updateWrapper); } /** * JPA-æ ¹æ®SNæ´æ°ç¶æ * -æ ¹æ®SNæ´æ°ç¶æ * * @param ip * @param port * @param sn * @param status */ public void onlineBySn(String ip, Integer port, String sn, String status) { deviceSerRepository.updateBySn(ip, port, status, sn, new Date()); UpdateWrapper<DeviceSer> updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("sn", sn).set("ip", ip).set("port", port).set("update_time", new Date()); deviceSerMapper.update(null, updateWrapper); } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/DicAreaService.java
@@ -3,11 +3,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.fzzy.igds.domain.DicArea; import com.fzzy.igds.mapper.DicAreaMapper; import com.fzzy.igds.repository.DicAreaRepository; import com.ruoyi.common.utils.StringUtils; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.domain.Specification; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; @@ -17,67 +14,62 @@ * @Author CZT * @Date 2025/11/25 16:23 */ @Service("sys.dicAreaService") @Service public class DicAreaService { @Resource private DicAreaRepository dicAreaRepository; @Resource private DicAreaMapper dicAreaMapper; /** * JPAå页æ¥è¯¢æ°æ® * * @param pageable */ public Page<DicArea> findAll(Pageable pageable) { return dicAreaRepository.findAll(pageable); public void listPageData(Page<DicArea> page, String key) { QueryWrapper<DicArea> queryWrapper = new QueryWrapper<>(); if (StringUtils.isNotBlank(key)) { queryWrapper.like("name", key); } dicAreaMapper.selectPage(page, queryWrapper); } /** * JPAå页æ¥è¯¢æ°æ® * * @param specification * @param pageable * @return */ public Page<DicArea> findAll(Specification<DicArea> specification, Pageable pageable) { return dicAreaRepository.findAll(specification, pageable); } /** * JPAæ ¹æ®ç¶ç¼ç æ¥è¯¢åºåä¿¡æ¯ * æ ¹æ®ç¶ç¼ç æ¥è¯¢åºåä¿¡æ¯ * * @param parentCode * @return */ public List<DicArea> getDicAreaByParentCode(String parentCode) { if(StringUtils.isEmpty(parentCode)){ return dicAreaRepository.findAll(); public List<DicArea> listData(String parentCode, String name, String code) { QueryWrapper<DicArea> queryWrapper = new QueryWrapper<>(); if (StringUtils.isNotBlank(parentCode)) { queryWrapper.like("parent_code", parentCode); } return dicAreaRepository.getDicAreaByParentCode(parentCode); if (StringUtils.isNotBlank(name)) { queryWrapper.like("name", name); } if (StringUtils.isNotBlank(code)) { queryWrapper.like("code", code); } return dicAreaMapper.selectList(queryWrapper); } /** * JPAä¿åæ°æ® * ä¿åæ°æ® * * @param data * @return */ public String saveDicArea(DicArea data) { dicAreaRepository.save(data); dicAreaMapper.insert( data); return null; } /** * JPAå 餿°æ® * å 餿°æ® * * @param data * @return */ public String delDicArea(DicArea data) { dicAreaRepository.delete(data); dicAreaMapper.deleteById(data); return null; } @@ -88,7 +80,11 @@ * @return */ public DicArea listDicAreaByName(String name) { return dicAreaRepository.listDicAreaByName(name); List<DicArea> list = this.listData(null, name, null); if(null == list || list.isEmpty()){ return null; } return list.get(0); } /** @@ -98,9 +94,12 @@ * @return */ public DicArea listDicAreaByCode(String code) { return dicAreaRepository.listDicAreaByCode(code); List<DicArea> list = this.listData(null, null, code); if(null == list || list.isEmpty()){ return null; } return list.get(0); } /** * æ¨¡ç³æ¥è¯¢ @@ -109,16 +108,18 @@ * @return */ public List<DicArea> listDicArea(String key) { if(null == key){ return dicAreaMapper.selectList(null); } QueryWrapper<DicArea> queryWrapper = new QueryWrapper<>(); if(StringUtils.isNotEmpty(key)){ if (StringUtils.isNotBlank(key)) { queryWrapper.like("name", key); queryWrapper.like("code", key); } return dicAreaMapper.selectList(queryWrapper); List<DicArea> dicAreas = dicAreaMapper.selectList(queryWrapper); if (null == dicAreas || dicAreas.isEmpty()) { queryWrapper = new QueryWrapper<>(); queryWrapper.like("code", key); dicAreas = dicAreaMapper.selectList(queryWrapper); } return dicAreas; } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutConfService.java
@@ -1,9 +1,11 @@ package com.fzzy.igds.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.fzzy.igds.constant.Constant; import com.fzzy.igds.constant.RedisConst; import com.fzzy.igds.repository.InoutConfRepository; import com.fzzy.igds.repository.InoutSysConfRepository; import com.fzzy.igds.mapper.InoutConfMapper; import com.fzzy.igds.mapper.InoutSysConfMapper; import com.fzzy.igds.domain.InoutConf; import com.fzzy.igds.domain.InoutSysConf; import com.fzzy.igds.utils.ContextUtil; @@ -29,15 +31,38 @@ @Resource private ISysDeptService iSysDeptService; @Resource private InoutSysConfRepository inoutSysConfRepository; private InoutConfMapper inoutConfMapper; @Resource private InoutConfRepository inoutConfRepository; private InoutSysConfMapper inoutSysConfMapper; @Resource private RedisCache redisCache; /*--------------- åºå ¥åºæµç¨ ---------------*/ /** * JPA-æ¥è¯¢æµç¨é ç½® * æ ¹æ®æ¡ä»¶æ¥è¯¢æµç¨ä¿¡æ¯ * * @param deptId * @param parentId * @return */ public List<InoutSysConf> listInoutSysConf(String deptId, String parentId) { QueryWrapper<InoutSysConf> queryWrapper = new QueryWrapper<>(); if (StringUtils.isNotBlank(deptId)) { queryWrapper.eq("dept_id", deptId); } if (StringUtils.isNotBlank(parentId)) { queryWrapper.likeRight("dept_id", parentId); } return inoutSysConfMapper.selectList(queryWrapper); } /** * æ¥è¯¢æµç¨é ç½® * * @return */ @@ -46,15 +71,13 @@ SysUser user = ContextUtil.getLoginUser(); SysDept userDept = iSysDeptService.selectDeptById(user.getDeptId()); if (Constant.DEPT_TYPE_20.equals(userDept.getType())) { return inoutSysConfRepository.getDataById(ContextUtil.subDeptId(user)); }else { return inoutSysConfRepository.getDataByParentId(user.getDeptId() + "%"); return this.listInoutSysConf(ContextUtil.subDeptId(user), null); } else { return this.listInoutSysConf(null, user.getDeptId() + "%"); } } /** * * * @param companyId * @param deptId */ @@ -70,15 +93,14 @@ } /** * * @param deptId */ public void delSysConfData(String deptId) { inoutSysConfRepository.deleteById(deptId); inoutSysConfMapper.deleteById(deptId); } /** * JPA-ä¿åæµç¨é ç½® * ä¿åæµç¨é ç½® * * @param data * @return @@ -87,9 +109,18 @@ if (StringUtils.isEmpty(data.getCompanyId())) { data.setCompanyId(ContextUtil.getCompanyId()); } data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); inoutSysConfRepository.save(data); if (StringUtils.isEmpty(data.getUpdateBy())) { data.setCreateBy(ContextUtil.getLoginUserName()); data.setCreateTime(new Date()); data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); inoutSysConfMapper.insert(data); } else { data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); inoutSysConfMapper.update(data, new UpdateWrapper<InoutSysConf>().eq("dept_id", data.getDeptId())); } this.flushInoutSysConfCache(data); } @@ -116,8 +147,9 @@ } /*--------------- åºå ¥åºè®¾å¤ ---------------*/ /** * JPA-æ¥è¯¢è®¾å¤é ç½® * æ¥è¯¢è®¾å¤é ç½® * * @return */ @@ -128,50 +160,62 @@ if (StringUtils.isEmpty(deptId)) { deptId = ContextUtil.subDeptId(null); } return inoutConfRepository.getInoutConfList(companyId, deptId); QueryWrapper<InoutConf> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("dept_id", deptId); queryWrapper.eq("company_id", companyId); return inoutConfMapper.selectList(queryWrapper); } /** * JPA-ä¿å设å¤é ç½® * ä¿å设å¤é ç½® * * @param data * @return */ public String saveData(InoutConf data) { if (0 == data.getInOrder()) { data.setInOrder(1); } if (StringUtils.isEmpty(data.getSort())) { data.setSort("1"); } if (StringUtils.isEmpty(data.getId())) { data.setId(ContextUtil.generateId()); data.setCreateBy(ContextUtil.getLoginUserName()); data.setCreateTime(new Date()); } if (StringUtils.isEmpty(data.getCompanyId())) { data.setCompanyId(ContextUtil.getCompanyId()); } if (StringUtils.isEmpty(data.getDeptId())) { data.setDeptId(ContextUtil.subDeptId(null)); } data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); inoutConfRepository.save(data); if (0 == data.getInOrder()) { data.setInOrder(1); } if (StringUtils.isEmpty(data.getSort())) { data.setSort("1"); } if (StringUtils.isBlank(data.getId())) { data.setId(ContextUtil.generateId()); data.setCreateBy(ContextUtil.getLoginUserName()); data.setCreateTime(new Date()); data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); inoutConfMapper.insert(data); }else { data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); inoutConfMapper.updateById(data); } return null; } /** * JPA-å é¤è®¾å¤é ç½® * å é¤è®¾å¤é ç½® * * @param data * @return */ public String delData(InoutConf data) { inoutConfRepository.delete(data); inoutConfMapper.deleteById(data); return null; } /** * 设置ç¼å * * @param companyId * @param deptId */ @@ -183,6 +227,7 @@ /** * è·åç¼å * * @param companyId * @param deptId * @return @@ -190,7 +235,7 @@ public List<InoutConf> getCacheInoutConf(String companyId, String deptId) { String key = RedisConst.buildKey(companyId, Constant.CACHE_INOUT_CONF_LIST, deptId); List<InoutConf> list = redisCache.getCacheObject(key); if(null == list){ if (null == list) { list = this.getInoutConfList(companyId, deptId); redisCache.setCacheObject(key, list); } @@ -199,6 +244,7 @@ /** * è·åç¼å * * @param companyId * @param deptId * @param confId @@ -210,7 +256,7 @@ } List<InoutConf> list = getCacheInoutConf(companyId, deptId); if (null == list || list.isEmpty()) { if (null == list || list.isEmpty()) { return null; } for (InoutConf inoutConf : list) { @@ -223,11 +269,15 @@ /** * æ´æ°åºå ¥åºè®¾å¤ç¶æ * * @param ip * @param port * @param status */ public void updateInoutConfStatus(String ip, Integer port, String status) { inoutConfRepository.updateInoutConfStatus(status, ip, port); UpdateWrapper<InoutConf> updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("ip", ip).eq("port", port).set("status", status); inoutConfMapper.update(null, updateWrapper); } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java
@@ -5,26 +5,18 @@ import com.fzzy.igds.data.NoticeDto; import com.fzzy.igds.data.NoticeParam; import com.fzzy.igds.mapper.InoutNoticeInMapper; import com.fzzy.igds.mapper.InoutNoticeMapper; import com.fzzy.igds.repository.InoutNoticeInRepository; import com.fzzy.igds.repository.InoutNoticeOutRepository; import com.fzzy.igds.mapper.InoutNoticeOutMapper; import com.fzzy.igds.domain.InoutNoticeIn; import com.fzzy.igds.domain.InoutNoticeOut; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import javax.annotation.Resource; import java.util.Date; import java.util.List; import java.util.Map; /** * @Description åºå ¥åºéç¥åserviceå±ï¼å å«å ¥åºéç¥åååºåºéç¥å @@ -36,47 +28,86 @@ public class InoutNoticeService { @Resource private InoutNoticeInRepository noticeInRepository; @Resource private InoutNoticeOutRepository noticeOutRepository; @Resource private InoutNoticeMapper noticeMapper; @Resource private InoutNoticeInMapper noticeInMapper; @Resource private InoutNoticeOutMapper noticeOutMapper; /* *//** * JPAå页æ¥è¯¢æ°æ® * *//* public Page<InoutNoticeIn> queryAllNoticeIn(Specification<InoutNoticeIn> specification, Pageable pageable) { return noticeInRepository.findAll(specification, pageable); }*/ /*----------------------å ¥åºéç¥åä¿¡æ¯-------------------------*/ /** * å页æ¥è¯¢æ°æ® * @param page * @param param */ public void pageQueryIn(Page<InoutNoticeIn> page, NoticeParam param) { QueryWrapper<InoutNoticeIn> queryWrapper = new QueryWrapper<>(); if(null == param) param = new NoticeParam(); if(null == param) { param = new NoticeParam(); } param.setCompanyId(ContextUtil.getCompanyId()); queryWrapper.eq("company_id", param.getCompanyId()); if(StringUtils.isNotBlank(param.getCustomerName())){ queryWrapper.like("customer_name", param.getCustomerName()); } if(StringUtils.isNotBlank(param.getFoodVariety())){ queryWrapper.like("food_variety", param.getFoodVariety()); } if(StringUtils.isNotBlank(param.getCompleteStatus())){ queryWrapper.like("complete_status", param.getCompleteStatus()); } noticeInMapper.selectPage(page, queryWrapper); } /** * JPAæ¥è¯¢æ°æ® * æ ¹æ®æ¡ä»¶æ¥è¯¢ * @param companyId * @param deptId * @param completeStatus * @return */ public List<InoutNoticeIn> getNoticeIn(String companyId, String deptId, String completeStatus) { QueryWrapper<InoutNoticeIn> queryWrapper = new QueryWrapper<>(); if(StringUtils.isNotBlank(companyId)){ queryWrapper.eq("company_id", companyId); } if(StringUtils.isNotBlank(deptId)){ queryWrapper.eq("dept_id", deptId); } if(StringUtils.isNotBlank(completeStatus)){ queryWrapper.eq("complete_status", completeStatus); } queryWrapper.orderByDesc("create_time"); return noticeInMapper.selectList(queryWrapper); } /** * æ ¹æ®æ¡ä»¶æ¥è¯¢ * @param id * @return */ public InoutNoticeIn getNoticeInOne(String id) { QueryWrapper<InoutNoticeIn> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("id", id); return noticeInMapper.selectOne(queryWrapper); } /** * æ¥è¯¢æ°æ® * @param companyId * @param deptId * @return */ public List<InoutNoticeIn> listNoticeIn(String companyId, String deptId) { return noticeInRepository.listNoticeIn(companyId, deptId, Constant.COMPLETE_STATUS_NONE); return this.getNoticeIn(companyId, deptId, Constant.COMPLETE_STATUS_NONE); } /** * jpa è·åä¿¡æ¯ * æ¥è¯¢æ°æ® * @param companyId * @return */ @@ -84,11 +115,11 @@ if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } return noticeInRepository.listNoticeIn(companyId, Constant.COMPLETE_STATUS_NONE); return this.getNoticeIn(companyId, null, Constant.COMPLETE_STATUS_NONE); } /** * JPA - ä¿åæ´æ°æ°æ® * - ä¿åæ´æ°æ°æ® * * @param data * @return @@ -101,47 +132,99 @@ data.setCreateTime(new Date()); data.setAuditStatus(Constant.COMPLETE_STATUS_NONE); data.setCompleteStatus(Constant.COMPLETE_STATUS_NONE); noticeInRepository.save(data); noticeInMapper.insert(data); } else { data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); noticeInRepository.save(data); noticeInMapper.updateById(data); } return null; } /** * JPA - å 餿°æ® * - å 餿°æ® * * @param data * @return */ public String delDataIn(InoutNoticeIn data) { noticeInRepository.delete(data); noticeInMapper.deleteById(data); return null; } /*----------------------åºåºéç¥åä¿¡æ¯-------------------------*/ /** * JPAå页æ¥è¯¢æ°æ® * * @param specification * @param pageable * å页æ¥è¯¢æ°æ® * @param page * @param param */ public void pageQueryOut(Page<InoutNoticeOut> page, NoticeParam param) { QueryWrapper<InoutNoticeOut> queryWrapper = new QueryWrapper<>(); if(null == param) { param = new NoticeParam(); } param.setCompanyId(ContextUtil.getCompanyId()); queryWrapper.eq("company_id", param.getCompanyId()); if(StringUtils.isNotBlank(param.getCustomerName())){ queryWrapper.like("customer_name", param.getCustomerName()); } if(StringUtils.isNotBlank(param.getFoodVariety())){ queryWrapper.like("food_variety", param.getFoodVariety()); } if(StringUtils.isNotBlank(param.getCompleteStatus())){ queryWrapper.like("complete_status", param.getCompleteStatus()); } noticeOutMapper.selectPage(page, queryWrapper); } /** * æ ¹æ®æ¡ä»¶æ¥è¯¢ * @param companyId * @param deptId * @param completeStatus * @return */ public Page<InoutNoticeOut> queryAllNoticeOut(Specification<InoutNoticeOut> specification, Pageable pageable) { //return noticeOutRepository.findAll(specification, pageable); return null; public List<InoutNoticeOut> getNoticeOut(String companyId, String deptId, String completeStatus) { QueryWrapper<InoutNoticeOut> queryWrapper = new QueryWrapper<>(); if(StringUtils.isNotBlank(companyId)){ queryWrapper.eq("company_id", companyId); } if(StringUtils.isNotBlank(deptId)){ queryWrapper.eq("dept_id", deptId); } if(StringUtils.isNotBlank(completeStatus)){ queryWrapper.eq("complete_status", completeStatus); } queryWrapper.orderByDesc("create_time"); return noticeOutMapper.selectList(queryWrapper); } /** * JPAæ¥è¯¢æ°æ® * æ ¹æ®æ¡ä»¶æ¥è¯¢ * @param id * @return */ public InoutNoticeOut getNoticeOutOne(String id) { QueryWrapper<InoutNoticeOut> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("id", id); return noticeOutMapper.selectOne(queryWrapper); } /** * æ¥è¯¢æ°æ® * @param companyId * @param deptId * @return */ public List<InoutNoticeOut> listNoticeOut(String companyId, String deptId) { return noticeOutRepository.listNoticeOut(companyId, deptId, Constant.COMPLETE_STATUS_NONE); return this.getNoticeOut(companyId, deptId, Constant.COMPLETE_STATUS_NONE); } /** @@ -153,41 +236,45 @@ if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } return noticeOutRepository.listNoticeOut(companyId, Constant.COMPLETE_STATUS_NONE); return this.getNoticeOut(companyId, null,Constant.COMPLETE_STATUS_NONE); } /** * JPA - ä¿åæ´æ°æ°æ® * - ä¿åæ´æ°æ°æ® * * @param data * @return */ public String saveOrUpdateOut(InoutNoticeOut data) { if (Constant.YN_Y.equals(data.getTag())) { if (null == data.getUpdateBy()) { data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); data.setCreateBy(ContextUtil.getLoginUserName()); data.setCreateTime(new Date()); data.setAuditStatus(Constant.COMPLETE_STATUS_NONE); data.setCompleteStatus(Constant.COMPLETE_STATUS_NONE); noticeOutMapper.insert(data); } else { data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); noticeOutMapper.updateById(data); } data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); noticeOutRepository.save(data); return null; } /** * JPA - å 餿°æ® * å 餿°æ® * * @param data * @return */ public String delDataOut(InoutNoticeOut data) { noticeOutRepository.delete(data); noticeOutMapper.deleteById(data); return null; } /** * JPA - æ ¹æ®IDè·åéç¥åä¿¡æ¯ * æ ¹æ®IDè·åéç¥åä¿¡æ¯ * @param id * @param type * @return @@ -198,10 +285,10 @@ } NoticeDto noticeDto = new NoticeDto(); if (Constant.TYPE_IN.equals(type)) { InoutNoticeIn noticeIn = noticeInRepository.getDataById(ContextUtil.getCompanyId(), ContextUtil.subDeptId(null), id); InoutNoticeIn noticeIn = this.getNoticeInOne(id); BeanUtils.copyProperties(noticeIn, noticeDto); } else { InoutNoticeOut noticeOut = noticeOutRepository.getDataById(ContextUtil.getCompanyId(), ContextUtil.subDeptId(null), id); InoutNoticeOut noticeOut = this.getNoticeOutOne(id); BeanUtils.copyProperties(noticeOut, noticeDto); } return noticeDto; @@ -240,6 +327,7 @@ * @return */ public String reSumNoticeInComplete(NoticeParam param) { //TODO å¾ å®ç°ï¼åç»æ ¹æ®éæ±è¿è¡å®ç° if (StringUtils.isEmpty(param.getCustomerName())) { return "客æ·ç¼ç 为空ï¼"; } @@ -252,7 +340,6 @@ if (StringUtils.isEmpty(param.getDeptId())) { param.setDeptId(ContextUtil.subDeptId(null)); } noticeMapper.reSumNoticeInComplete(param); return null; } @@ -272,7 +359,7 @@ for (InoutNoticeOut noticeOut : noticeOutList) { param = new NoticeParam(noticeOut.getCompanyId(), noticeOut.getDeptId(), noticeOut.getDepotId(), noticeOut.getCustomerId(), noticeOut.getFoodVariety(), noticeOut.getId()); noticeOut.getCustomerName(), noticeOut.getFoodVariety(), noticeOut.getId()); log.info("å¼å§æ´æ°åºåºéç¥å={}", param.toString()); @@ -289,6 +376,7 @@ * @return */ public String reSumNoticeOutComplete(NoticeParam param) { //TODO å¾ å®ç°ï¼åç»æ ¹æ®éæ±è¿è¡å®ç° if (StringUtils.isEmpty(param.getCustomerName())) { return "客æ·ç¼ç 为空ï¼"; } @@ -304,9 +392,7 @@ if (StringUtils.isEmpty(param.getDeptId())) { param.setDeptId(ContextUtil.subDeptId(null)); } noticeMapper.reSumNoticeOutComplete(param); return null; } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/QuantityService.java
@@ -1,8 +1,10 @@ package com.fzzy.igds.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.fzzy.igds.constant.RedisConst; import com.fzzy.igds.domain.QuantityConf; import com.fzzy.igds.repository.QuantityConfRepository; import com.fzzy.igds.mapper.QuantityConfMapper; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.StringUtils; @@ -24,12 +26,12 @@ public class QuantityService { @Resource private QuantityConfRepository quantityConfRepository; private QuantityConfMapper quantityConfMapper; @Resource private RedisCache redisCache; /** * JPA - æ¥è¯¢é 置信æ¯ï¼æ ¹æ®åºåºç¼ç è·å * æ¥è¯¢é 置信æ¯ï¼æ ¹æ®åºåºç¼ç è·å * * @param companyId * @param deptId @@ -39,15 +41,22 @@ if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } if (StringUtils.isEmpty(deptId)) { deptId = ContextUtil.subDeptId(null); } return quantityConfRepository.listQuantityConf(companyId, deptId); QueryWrapper<QuantityConf> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("company_id", companyId); if(StringUtils.isNotBlank(deptId)){ queryWrapper.eq("dept_id", deptId); } queryWrapper.orderByAsc("order_num"); return quantityConfMapper.selectList(queryWrapper); } /** * JPA - æ¥è¯¢é 置信æ¯ï¼æ ¹æ®ç»ç»ç¼ç è·å * - æ¥è¯¢é 置信æ¯ï¼æ ¹æ®ç»ç»ç¼ç è·å * * @param companyId * @return @@ -57,11 +66,11 @@ companyId = ContextUtil.getCompanyId(); } return quantityConfRepository.listQuantityConf(companyId); return this.getConfList(companyId, null); } /** * JPA - æ´æ°ä¿åæ°æ® * - æ´æ°ä¿åæ°æ® * * @param conf */ @@ -69,41 +78,50 @@ if (StringUtils.isEmpty(conf.getDepotId())) { return; } if (StringUtils.isEmpty(conf.getCompanyId())) { if (StringUtils.isBlank(conf.getCompanyId())) { conf.setCompanyId(ContextUtil.getCompanyId()); } if (StringUtils.isEmpty(conf.getDeptId())) { if (StringUtils.isBlank(conf.getDeptId())) { conf.setDeptId(ContextUtil.subDeptId(null)); } if (null == conf.getUpdateBy()) { conf.setCreateBy(ContextUtil.getLoginUserName()); conf.setCreateTime(new Date()); conf.setUpdateBy(ContextUtil.getLoginUserName()); conf.setUpdateTime(new Date()); quantityConfMapper.insert(conf); }else { conf.setUpdateBy(ContextUtil.getLoginUserName()); conf.setUpdateTime(new Date()); quantityConfMapper.update(conf, new UpdateWrapper<QuantityConf>().eq("depot_id", conf.getDepotId())); } conf.setUpdateBy(ContextUtil.getLoginUserName()); conf.setUpdateTime(new Date()); quantityConfRepository.save(conf); //å·æ°ç¼å setCacheQuantityConf(conf); this.setCacheQuantityConf(conf); } /** * JPA- æ´æ°é ç½®åæ··ä¸ªå¤ª * æ´æ°ä¿¡æ¯ * * @param conf */ public void updateQuantityConfBySn(QuantityConf conf) { //æ´æ°ç¶æ quantityConfRepository.updateConfStatus(conf.getIp(), conf.getPort(), conf.getStatus(), conf.getSn()); setCacheQuantityConf(conf); UpdateWrapper<QuantityConf> updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("sn", conf.getSn()).set("ip", conf.getIp()).set("port", conf.getPort()).set("status", conf.getStatus()); quantityConfMapper.update(null, updateWrapper); this.setCacheQuantityConf(conf); } /** * JPA - å 餿°æ® * - å 餿°æ® * * @param conf * @return */ public String delQuantityConf(QuantityConf conf) { quantityConfRepository.delete(conf); quantityConfMapper.deleteById(conf); //å é¤é ç½®ä¿¡æ¯ flushConfCache(conf.getCompanyId(), conf.getDeptId()); fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SecCameraService.java
@@ -1,17 +1,16 @@ package com.fzzy.igds.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.fzzy.igds.constant.RedisConst; import com.fzzy.igds.domain.Camera; import com.fzzy.igds.repository.SecCameraRepository; import com.fzzy.igds.mapper.CameraMapper; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import javax.annotation.Resource; import java.util.ArrayList; import java.util.Date; @@ -27,31 +26,54 @@ public class SecCameraService { @Resource private SecCameraRepository secCameraRepository; private CameraMapper cameraMapper; @Resource private RedisCache redisCache; /** * JPAå页æ¥è¯¢æ°æ® * * @param specification * @param pageable * @return */ public Page<Camera> findAll(Specification<Camera> specification, Pageable pageable) { return secCameraRepository.findAll(specification, pageable); public void listPageCamera(Page<Camera> page, Camera param) { QueryWrapper<Camera> queryWrapper = new QueryWrapper<>(); param.setCompanyId(ContextUtil.getCompanyId()); param.setDeptId(ContextUtil.subDeptId(null)); queryWrapper.eq("company_id", param.getCompanyId()); queryWrapper.eq("dept_id", param.getDeptId()); if(StringUtils.isNotBlank(param.getName())){ queryWrapper.like("name", param.getName()); } if(StringUtils.isNotBlank(param.getBrand())){ queryWrapper.eq("brand", param.getBrand()); } if(StringUtils.isNotBlank(param.getSpjklx())){ queryWrapper.eq("spjklx", param.getSpjklx()); } if(StringUtils.isNotBlank(param.getSpdwlx())){ queryWrapper.eq("spdwlx", param.getSpdwlx()); } cameraMapper.selectPage(page, queryWrapper); } /** * JPA - æ¥è¯¢åºåºä¸ææçæ§ * æ¥è¯¢åºåºä¸ææçæ§ * @return */ public List<Camera> listCamera() { return secCameraRepository.listCamera(ContextUtil.getCompanyId(), ContextUtil.subDeptId(null)); public List<Camera> listCamera(String companyId, String deptId) { QueryWrapper<Camera> queryWrapper = new QueryWrapper<>(); if(StringUtils.isNotBlank(companyId)){ queryWrapper.eq("company_id", companyId); } if(StringUtils.isNotBlank(deptId)){ queryWrapper.eq("dept_id", deptId); } return cameraMapper.selectList(queryWrapper); } /** * JPA - ä¿åæ°æ® * ä¿åæ°æ® * @param data */ public void saveCamera(Camera data) { @@ -71,16 +93,16 @@ } data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); secCameraRepository.save(data); cameraMapper.insert(data); } /** * JPA - å 餿°æ® * å 餿°æ® * @param data * @return */ public String delCamera(Camera data) { secCameraRepository.delete(data); cameraMapper.deleteById(data); return null; } @@ -92,7 +114,7 @@ if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } List<Camera> list = secCameraRepository.listCameraByCompanyId(companyId); List<Camera> list = this.listCamera(companyId,null); redisCache.setCacheObject(RedisConst.buildKey(companyId, RedisConst.KEY_CAMERA_LIST), list); } @@ -109,7 +131,7 @@ List<Camera> list = redisCache.getCacheObject(key); if (null == list || list.isEmpty()) { list = secCameraRepository.listCameraByCompanyId(companyId); list = this.listCamera(companyId,null); redisCache.setCacheObject(key, list); } return list; @@ -171,7 +193,9 @@ * @param param */ public void updatePos(Camera param) { secCameraRepository.updatePosById(param.getId(), param.getPosX(), param.getPosY()); UpdateWrapper<Camera> updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("id", param.getId()).set("pos_x", param.getPosX()).set("pos_y", param.getPosY()); cameraMapper.update(null, updateWrapper); } } fzzy-igdss-view/src/main/java/com/fzzy/igds/CompanyPR.java
@@ -4,6 +4,8 @@ import com.bstek.dorado.annotation.DataResolver; import com.fzzy.igds.domain.Company; import com.fzzy.igds.service.CoreCompanyService; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.domain.entity.SysUser; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; import javax.annotation.Resource; @@ -21,7 +23,7 @@ private CoreCompanyService coreCompanyService; /** * æ¥è¯¢è®¾å¤,å°æä½ä¿¡æ¯è°æ´ä¸ºç©ºï¼é»è®¤å æ¬ååºåæ° * è·åå½åè´¦å·ä¸å±ææå ¬å¸ä¿¡æ¯ * * companyPR#getData * @@ -29,8 +31,8 @@ */ @DataProvider public List<Company> getData() { return coreCompanyService.getDataByParentId(); SysUser user = ContextUtil.getLoginUser(); return coreCompanyService.listCompany(null, null, user.getDeptId() + ""); } fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotConfPR.java
@@ -5,6 +5,7 @@ import com.bstek.dorado.annotation.Expose; import com.fzzy.igds.domain.DepotConf; import com.fzzy.igds.service.DepotConfService; import com.fzzy.igds.utils.ContextUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; @@ -31,7 +32,7 @@ */ @DataProvider public List<DepotConf> getConfList() { return depotConfService.getConfList(null,null); return depotConfService.getConfList(null, ContextUtil.subDeptId(null)); } /** fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotPR.java
@@ -31,7 +31,7 @@ */ @DataProvider public List<Depot> getData(){ return depotService.getData(null, null); return depotService.getData(null, ContextUtil.subDeptId(null) ,false); } /** fzzy-igdss-view/src/main/java/com/fzzy/igds/DeptPR.java
@@ -34,7 +34,7 @@ @DataProvider public List<Dept> getAllData() { return coreDeptService.getAllDeptData(); return coreDeptService.listDept(null,ContextUtil.getCompanyId(),null); } /** fzzy-igdss-view/src/main/java/com/fzzy/igds/DeviceIot.view.xml
@@ -158,13 +158,13 @@ <Property name="width">160</Property> </DataColumn> </DataGrid> </Container> <Container layoutConstraint="bottom"> <Property name="className">c-bottom</Property> <DataPilot layoutConstraint="right"> <Property name="dataSet">dsDeviceIot</Property> <Property name="itemCodes">pageSize,pages</Property> </DataPilot> <ToolBar layoutConstraint="bottom"> <Fill/> <DataPilot layoutConstraint="right"> <Property name="itemCodes">pageSize,pages</Property> <Property name="dataSet">dsDeviceIot</Property> </DataPilot> </ToolBar> </Container> <Dialog id="dialogDeviceIot" layout="regionPadding:8"> <ClientEvent name="onHide">view.id("dsDeviceIot").getData().cancel();</ClientEvent> fzzy-igdss-view/src/main/java/com/fzzy/igds/DeviceIotPR.java
@@ -6,26 +6,14 @@ import com.bstek.dorado.data.entity.EntityState; import com.bstek.dorado.data.entity.EntityUtils; import com.bstek.dorado.data.provider.Page; import com.fzzy.igds.data.DeviceIotParam; import com.fzzy.igds.domain.DeviceIot; import com.fzzy.igds.service.DeviceIotService; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.utils.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * @Description @@ -48,47 +36,17 @@ * @return */ @DataProvider public void loadDeviceIotPage(Page<DeviceIot> page, Map<String, Object> param) { if (null == param) { param = new HashMap<>(); public void loadDeviceIotPage(Page<DeviceIot> page, DeviceIotParam param) { com.baomidou.mybatisplus.extension.plugins.pagination.Page<DeviceIot> corePage = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(page.getPageNo(), page.getPageSize()); if(null == param) { param = new DeviceIotParam(); } Map<String, Object> finalParam = param; deviceIotService.listPageData(corePage, param); //å¤åæ°å页æ¥è¯¢ Pageable pageable = PageRequest.of(page.getPageNo() - 1, page.getPageSize(), Sort.Direction.ASC, DeviceIot.SORT_PROP); Specification<DeviceIot> specification = new Specification<DeviceIot>() { private static final long serialVersionUID = 1L; public Predicate toPredicate(Root<DeviceIot> root, CriteriaQuery<?> query, CriteriaBuilder cb) { List<Predicate> predicates = new ArrayList<Predicate>(); //ææçæè¨ Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId()); predicates.add(predicate1); predicate1 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null)); predicates.add(predicate1); String key = (String) finalParam.get("depotId"); if (StringUtils.isNotEmpty(key)) { predicate1 = cb.equal(root.get("depotId"), key); predicates.add(predicate1); } key = (String) finalParam.get("type"); if (StringUtils.isNotEmpty(key)) { predicate1 = cb.equal(root.get("type"), key); predicates.add(predicate1); } key = (String) finalParam.get("serId"); if (StringUtils.isNotEmpty(key)) { predicate1 = cb.equal(root.get("serId"), key); predicates.add(predicate1); } return cb.and(predicates.toArray(new Predicate[0])); } }; org.springframework.data.domain.Page<DeviceIot> japPage = deviceIotService.findAll(specification, pageable); page.setEntityCount((int) japPage.getTotalElements()); page.setEntities(japPage.getContent()); // éæ°å°è£ page.setEntities(corePage.getRecords()); page.setEntityCount(Integer.parseInt(String.valueOf(corePage.getTotal()))); } /** fzzy-igdss-view/src/main/java/com/fzzy/igds/DicArea.view.xml
@@ -108,13 +108,13 @@ <Property name="name">remark</Property> </DataColumn> </DataGrid> </Container> <Container layoutConstraint="bottom"> <Property name="className">c-bottom</Property> <DataPilot layoutConstraint="right"> <Property name="dataSet">dsMain</Property> <Property name="itemCodes">pageSize,pages</Property> </DataPilot> <ToolBar layoutConstraint="bottom"> <Fill/> <DataPilot layoutConstraint="right"> <Property name="itemCodes">pageSize,pages</Property> <Property name="dataSet">dsMain</Property> </DataPilot> </ToolBar> </Container> <Dialog id="dialogMain"> <Property name="closeable">false</Property> fzzy-igdss-view/src/main/java/com/fzzy/igds/DicAreaPR.java
@@ -6,20 +6,10 @@ import com.bstek.dorado.data.provider.Page; import com.fzzy.igds.domain.DicArea; import com.fzzy.igds.service.DicAreaService; import com.ruoyi.common.utils.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Component; import javax.annotation.Resource; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import java.util.ArrayList; import java.util.List; /** @@ -40,31 +30,14 @@ */ @DataProvider public void pageList(Page<DicArea> page, String key) { //å¤åæ°å页æ¥è¯¢ Pageable pageable = PageRequest.of(page.getPageNo() - 1, page.getPageSize(), Sort.Direction.ASC, DicArea.SORT_PROP); if (StringUtils.isEmpty(key)) { org.springframework.data.domain.Page<DicArea> japPage = dicAreaService.findAll(pageable); page.setEntityCount((int) japPage.getTotalElements()); page.setEntities(japPage.getContent()); com.baomidou.mybatisplus.extension.plugins.pagination.Page<DicArea> corePage = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(page.getPageNo(), page.getPageSize()); return; } Specification<DicArea> specification = new Specification<DicArea>() { private static final long serialVersionUID = 1L; dicAreaService.listPageData(corePage, key); public Predicate toPredicate(Root<DicArea> root, CriteriaQuery<?> query, CriteriaBuilder cb) { List<Predicate> predicates = new ArrayList<Predicate>(); //ææçæè¨ Predicate predicate1 = cb.like(root.get("name"), "%" + key + "%"); predicates.add(predicate1); return cb.and(predicates.toArray(new Predicate[0])); } }; org.springframework.data.domain.Page<DicArea> japPage = dicAreaService.findAll(specification, pageable); page.setEntityCount((int) japPage.getTotalElements()); page.setEntities(japPage.getContent()); // éæ°å°è£ page.setEntities(corePage.getRecords()); page.setEntityCount(Integer.parseInt(String.valueOf(corePage.getTotal()))); } /** @@ -72,7 +45,7 @@ */ @DataProvider public List<DicArea> getDicAreaByParentCode(String parentCode) { return dicAreaService.getDicAreaByParentCode(parentCode); return dicAreaService.listData(parentCode, null, null); } /** fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutConf.view.xml
@@ -450,23 +450,8 @@ <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createBy</Property> <Property name="property">createBy</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createTime</Property> <Property name="property">createTime</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">port</Property> <Property name="property">port</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">updateBy</Property> <Property name="property">updateBy</Property> <Editor/> </AutoFormElement> <AutoFormElement> @@ -477,7 +462,7 @@ </AutoForm> </Children> </FieldSet> <FieldSet layoutConstraint="padding:5"> <FieldSet layout="padding:5"> <Property name="caption">çæ§ä¿¡æ¯</Property> <Buttons/> <Children> @@ -541,7 +526,7 @@ </AutoForm> </Children> </FieldSet> <FieldSet layoutConstraint="padding:5"> <FieldSet layout="padding:5"> <Property name="caption">ææ¾é ç½®</Property> <Buttons/> <Children> fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeIn.view.xml
@@ -157,10 +157,6 @@ <Property></Property> <Property name="label">夿³¨ä¿¡æ¯</Property> </PropertyDef> <PropertyDef name="tag"> <Property></Property> <Property name="label">æ è®°</Property> </PropertyDef> <PropertyDef name="createTime"> <Property name="dataType">DateTime</Property> <Property name="label">å¶åæ¶é´</Property> @@ -236,7 +232,7 @@ <Button> <ClientEvent name="onClick">var data = view.get("#dsQuery.data");
 if(data){
 view.get("#dsMain").set("parameter",data.toJSON()).flushAsync();
 view.get("#dsMain").set("parameter",data).flushAsync();
 }else{
 view.get("#dsMain").flushAsync();
 }</ClientEvent> @@ -329,9 +325,8 @@ <Property name="align">center</Property> <Property name="width">120</Property> </DataColumn> <DataColumn> <DataColumn name="customerName"> <Property name="property">customerName</Property> <Property name="name">customerName</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="depotId"> @@ -390,7 +385,7 @@ <Property name="iconClass">fa fa-tasks</Property> <Buttons> <Button id="btnOk"> <ClientEvent name="onClick">view.get("#udpateSave").execute(function(result){
 <ClientEvent name="onClick">view.get("#updateSave").execute(function(result){
 if(result){
 $alert(result);
 return;
 @@ -560,10 +555,7 @@ </Children> <Tools/> </Dialog> <AjaxAction id="ajaxSave"> <Property name="service">inoutNoticePR#saveIn</Property> </AjaxAction> <UpdateAction id="udpateSave"> <UpdateAction id="updateSave"> <Property name="dataResolver">inoutNoticePR#saveIn</Property> <UpdateItem> <Property name="dataPath">[#current]</Property> fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeOut.view.xml
@@ -4,10 +4,7 @@ <Context/> <Model> <DataType name="dtMain"> <ClientEvent name="onDataChange">if(arg.property =="depotId"){
 autoByDepot(arg.newValue);
 }</ClientEvent> <Property name="creationType">com.fzzy.igds.models.InoutNoticeOut</Property> <Property name="creationType">com.fzzy.igds.domain.InoutNoticeOut</Property> <PropertyDef name="id"> <Property></Property> <Property name="label">éç¥åå·</Property> @@ -19,37 +16,37 @@ <PropertyDef name="deptId"> <Property></Property> <Property name="label">æå±ååº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deptPR#loadParents").getResult()}</Property> <Property name="keyProperty">deptId</Property> <Property name="valueProperty">deptName</Property> </Property> <Property name="required">false</Property> </PropertyDef> <PropertyDef name="planId"> <Property></Property> <Property name="label">æå±è®¡å</Property> <Property name="required">false</Property> </PropertyDef> <PropertyDef name="planName"> <Property></Property> <Property name="label">æå±è®¡å</Property> <Property name="required">false</Property> </PropertyDef> <PropertyDef name="contractId"> <Property></Property> <Property name="label">æå±åå</Property> <Property name="required">false</Property> </PropertyDef> <PropertyDef name="contractName"> <Property></Property> <Property name="label">æå±åå</Property> <Property name="required">false</Property> </PropertyDef> <PropertyDef name="name"> <Property></Property> <Property name="label">éç¥ååç§°</Property> <Property name="label">åæ®åç§°</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="type"> <Property></Property> <Property name="label">åæ®ç±»å</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="name">åºåºéç¥å</Property> <Property name="code">10</Property> </Entity> <Entity> <Property name="name">ç管éç¥å</Property> <Property name="code">20</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="contract"> <Property></Property> <Property name="label">å ³èåå</Property> <Property name="required">false</Property> </PropertyDef> <PropertyDef name="depotId"> <Property></Property> @@ -59,11 +56,6 @@ <Property name="keyProperty">id</Property> <Property name="valueProperty">name</Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="customerId"> <Property></Property> <Property name="label">æ¶è´§å®¢æ·</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="customerName"> @@ -76,9 +68,9 @@ <Property name="label">åè´§åä½</Property> <Property name="required">false</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deptPR#loadParents").getResult()}</Property> <Property name="keyProperty">deptId</Property> <Property name="valueProperty">deptName</Property> <Property name="mapValues">${dorado.getDataProvider("deptPR#getAllData").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">kqmc</Property> </Property> </PropertyDef> <PropertyDef name="foodVariety"> @@ -93,27 +85,50 @@ </PropertyDef> <PropertyDef name="year"> <Property></Property> <Property name="label">ç²®é£å¹´ä»½</Property> <Property name="required">true</Property> <Property name="label">年份</Property> </PropertyDef> <PropertyDef name="targetNumber"> <Property name="dataType">double</Property> <Property name="displayFormat">#,## kG</Property> <Property name="displayFormat">#0.0 KG</Property> <Property name="required">true</Property> <Property name="label">è®¡åæ°é</Property> </PropertyDef> <PropertyDef name="completeNumber"> <Property name="dataType">double</Property> <Property name="label">宿æ°é</Property> <Property name="displayFormat">#,## kG</Property> <Property name="displayFormat">#0.0 KG</Property> </PropertyDef> <PropertyDef name="auditStatus"> <Property></Property> <Property name="label">å®¡æ ¸ç¶æ</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="name">çç®¡å®¡æ ¸</Property> <Property name="code">10</Property> </Entity> <Entity> <Property name="name">é¶è¡å®¡æ ¸</Property> <Property name="code">20</Property> </Entity> <Entity> <Property name="name">å·²å®¡æ ¸</Property> <Property name="code">30</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="auditUser"> <Property></Property> <Property name="label">å®¡æ ¸äºº</Property> </PropertyDef> <PropertyDef name="auditDate"> <Property name="dataType">DateTime</Property> <Property name="label">å®¡æ¹æ¶é´</Property> </PropertyDef> <PropertyDef name="completeStatus"> <Property></Property> @@ -135,339 +150,33 @@ <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="createTime"> <Property name="dataType">DateTime</Property> <Property name="label">å建æ¶é´</Property> </PropertyDef> <PropertyDef name="createUser"> <Property></Property> <Property name="label">å建人</Property> </PropertyDef> <PropertyDef name="completeTime"> <Property name="dataType">DateTime</Property> <Property name="dataType">Date</Property> <Property name="label">宿æ¶é´</Property> </PropertyDef> <PropertyDef name="remark"> <Property></Property> <Property name="label">夿³¨ä¿¡æ¯</Property> </PropertyDef> <PropertyDef name="tag"> <PropertyDef name="createTime"> <Property name="dataType">DateTime</Property> <Property name="label">å¶åæ¶é´</Property> </PropertyDef> <PropertyDef name="createBy"> <Property></Property> <Property name="label">æ è®°</Property> </PropertyDef> </DataType> <DataType name="dtQuery"> <PropertyDef name="id"> <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#loadParents").getResult()}</Property> <Property name="keyProperty">deptId</Property> <Property name="valueProperty">deptName</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> </PropertyDef> <PropertyDef name="year"> <Property></Property> <Property name="label">年份</Property> </PropertyDef> <PropertyDef name="completeStatus"> <Property></Property> <Property name="label">å®æç¶æ</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="name">æªå®æ</Property> <Property name="code">NONE</Property> </Entity> <Entity> <Property name="name">已宿</Property> <Property name="code">COMPLETE</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</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> <Property name="required">true</Property> </PropertyDef> </DataType> <DataType name="dtQueryTitle"> <PropertyDef name="title"> <Property name="label">title</Property> </PropertyDef> </DataType> <DataType name="dtPlan"> <Property name="creationType">com.fzzy.igds.models.InoutPlanDetail</Property> <PropertyDef name="id"> <Property></Property> <Property name="label">计åæç»å·</Property> </PropertyDef> <PropertyDef name="planId"> <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> <Property name="label">ç²®é£æ§è´¨</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("FOOD_TYPE_")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</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="year"> <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="planNum"> <Property name="dataType">Double</Property> <Property name="label">è®¡åæ°é</Property> </PropertyDef> <PropertyDef name="type"> <Property name="label">计åç±»å</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerPlanType").getResult()}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> <Property name="label">å¶å人</Property> </PropertyDef> <PropertyDef name="updateTime"> <Property></Property> <Property name="dataType">DateTime</Property> <Property name="label">æ´æ°æ¶é´</Property> </PropertyDef> </DataType> <DataType name="dtContract"> <Property name="creationType">com.fzzy.igds.models.InoutContract</Property> <PropertyDef name="id"> <PropertyDef name="updateBy"> <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> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deptPR#loadParents").getResult()}</Property> <Property name="keyProperty">deptId</Property> <Property name="valueProperty">deptName</Property> </Property> </PropertyDef> <PropertyDef name="planId"> <Property></Property> <Property name="label">æå±è®¡å</Property> </PropertyDef> <PropertyDef name="planName"> <Property></Property> <Property name="label">æå±è®¡å</Property> </PropertyDef> <PropertyDef name="type"> <Property></Property> <Property name="label">ååç±»å</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerContractType").getResult()}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="name"> <Property></Property> <Property name="label">åååç§°</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="year"> <Property></Property> <Property name="label">年份</Property> </PropertyDef> <PropertyDef name="customerId"> <Property></Property> <Property name="label">客æ·ç¼ç </Property> </PropertyDef> <PropertyDef name="customerName"> <Property></Property> <Property name="label">客æ·åç§°</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="customerType"> <Property></Property> <Property name="label">客æ·ç±»å</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="code">1</Property> <Property name="name">1-ä¼ä¸</Property> </Entity> <Entity> <Property name="code">2</Property> <Property name="name">2-个人</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="customerBank"> <Property></Property> <Property name="label">客æ·å¼æ·è¡</Property> </PropertyDef> <PropertyDef name="customerBankAccount"> <Property></Property> <Property name="label">客æ·å¼æ·è¡è´¦å·</Property> </PropertyDef> <PropertyDef name="customerSignUser"> <Property></Property> <Property name="label">客æ·ç¾çº¦äºº</Property> </PropertyDef> <PropertyDef name="bank"> <Property></Property> <Property name="label">æ¬æ¹å¼æ·è¡</Property> </PropertyDef> <PropertyDef name="bankAccount"> <Property></Property> <Property name="label">æ¬æ¹å¼æ·è¡è´¦å·</Property> </PropertyDef> <PropertyDef name="signUser"> <Property></Property> <Property name="label">æ¬æ¹ç¾çº¦äºº</Property> </PropertyDef> <PropertyDef name="signAddress"> <Property></Property> <Property name="label">ç¾çº¦å°å</Property> </PropertyDef> <PropertyDef name="price"> <Property name="dataType">Double</Property> <Property name="label">åä»·</Property> <Property name="displayFormat">#,###0.000 å /å ¬æ¤</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="money"> <Property name="dataType">Double</Property> <Property name="label">æ»éé¢</Property> <Property name="displayFormat">#,###0.000 å </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="contactAmount"> <Property name="dataType">Double</Property> <Property name="label">ååæ°é</Property> <Property name="displayFormat">#,##0.00 KG</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="completeNum"> <Property name="dataType">Double</Property> <Property name="label">åå宿æ°é</Property> <Property name="displayFormat">#,##0.00 KG</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="foodType"> <Property></Property> <Property name="label">ç²®é£æ§è´¨</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("FOOD_TYPE_")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="payType"> <Property></Property> <Property name="label">æ¯ä»æ¹å¼</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("PAY_TYPE")}</Property> <Property name="valueProperty">dictLabel</Property> <Property name="keyProperty">dictValue</Property> </Property> </PropertyDef> <PropertyDef name="createUser"> <Property></Property> <Property name="label">å建人</Property> </PropertyDef> <PropertyDef name="createTime"> <Property name="dataType">Date</Property> <Property name="label">å建æ¶é´</Property> </PropertyDef> <PropertyDef name="signingTime"> <Property name="dataType">Date</Property> <Property name="label">ç¾è®¢æ¶é´</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="beginTime"> <Property name="dataType">Date</Property> <Property name="label">ææå¼å§æ¶é´</Property> </PropertyDef> <PropertyDef name="endTime"> <Property name="dataType">Date</Property> <Property name="label">æææªæ¢æ¶é´</Property> </PropertyDef> <PropertyDef name="remark"> <Property></Property> <Property name="label">夿³¨è¯´æ</Property> <Property name="label">æ´æ°äºº</Property> </PropertyDef> </DataType> </Model> <View layout="padding:5;regionPadding:5"> <View layout="padding:10"> <ClientEvent name="onReady">var deptId = window.parent.deptId;//ç¶é¡µé¢ä¸çååºç¼ç 
 var TYPE = "NOTICE_OUT";
 query = function(){
 @@ -475,29 +184,14 @@ };
 query();
 
 queryTitle = function(){
 view.get("#dsQueryTitle").set("parameter",{type:TYPE,deptId:deptId}).flushAsync();
 };
 queryTitle();
 
 //æ°å¢
 add = function(){
 view.get("#ajaxInitAdd").set("parameter", TYPE).execute(function(data){
 view.get("#ajaxInitAdd").execute(function(data){
 view.get("#dsMain").insert(data);
 view.get("#dialogMain").show();
 });
 };
 
 //æ ¹æ®ä»åºèªå¨åå¡«ç²®é£åç§ï¼ç级ï¼äº§å°æ°
 autoByDepot = function(depotId){
 view.get("#ajaxGetDepot").set("parameter",depotId).execute(function(result){
 if(result){
 var data = view.get("#dataGridMain.currentEntity");
 data.set("foodVariety",result.foodVariety);
 
 }
 });
 };</ClientEvent> 
</ClientEvent> <Property name="packages">font-awesome,css-common</Property> <DataSet id="dsMain"> <Property name="dataType">[dtMain]</Property> @@ -505,40 +199,38 @@ <Property name="pageSize">15</Property> <Property name="loadMode">lazy</Property> </DataSet> <DataSet id="dsQueryTitle"> <Property name="dataType">dtQueryTitle</Property> <Property name="dataProvider">inoutNoticePR#getTitle</Property> <Property name="loadMode">manual</Property> </DataSet> <DataSet id="dsQuery"> <Property name="dataType">dtQuery</Property> <Property name="dataType">dtNoticeParam</Property> <Property name="dataProvider">inoutNoticePR#getYearQuery</Property> <Property name="loadMode">manual</Property> </DataSet> <AutoForm layoutConstraint="top"> <Property name="cols">*,*,*,*</Property> <Property name="dataSet">dsQuery</Property> <Property name="exClassName">bg-color</Property> <AutoFormElement> <Property name="name">foodVariety</Property> <Property name="property">foodVariety</Property> <Property name="editable">false</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">year</Property> <Property name="property">year</Property> <Property name="trigger">defaultYearDropDown</Property> <Property name="editable">false</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">completeStatus</Property> <Property name="property">completeStatus</Property> <Property name="editable">false</Property> <Editor/> </AutoFormElement> <Container layout="hbox regionPadding:15"> <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">customerName</Property> <Property name="property">customerName</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">foodVariety</Property> <Property name="property">foodVariety</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">completeStatus</Property> <Property name="property">completeStatus</Property> <Editor/> </AutoFormElement> <Button> <ClientEvent name="onClick">var data = view.get("#dsQuery.data");
 if(data){
 @@ -546,106 +238,81 @@ }else{
 view.get("#dsMain").flushAsync();
 }</ClientEvent> <Property name="caption">æ¥è¯¢</Property> <Property name="exClassName">btn1</Property> <Property name="caption">æç´¢</Property> <Property name="iconClass">fa fa-search</Property> <Property name="exClassName">btn-q1</Property> </Button> <Button> <ClientEvent name="onClick">view.get("#dsQuery").flushAsync();</ClientEvent> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-refresh</Property> <Property name="caption">éç½®</Property> <Property name="exClassName">btn-q2</Property> <Property name="iconClass">fa fa-refresh</Property> </Button> </Container> <Container layout="regionPadding:10" layoutConstraint="type:top;colSpan:2"> <Property name="exClassName">bg-color</Property> <Property name="contentOverflow">hidden</Property> <Property name="height">55</Property> <Label layoutConstraint="left"> <Property name="text">èåæ ï¼</Property> </Label> <Button layoutConstraint="left"> <ClientEvent name="onClick">add();
 //view.get("#dsMain").insert({
 // name:"åºåºéç¥å"
 // });
 // view.get("#dialogMain").show();</ClientEvent> </AutoForm> </Container> <Container> <Property name="className">c-data</Property> <ToolBar> <ToolBarButton layoutConstraint="left"> <ClientEvent name="onClick">add();
</ClientEvent> <Property name="caption">æ°å¢</Property> <Property name="exClassName">btn1</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-plus</Property> </Button> <Button layoutConstraint="left"> </ToolBarButton> <ToolBarButton layoutConstraint="left"> <ClientEvent name="onClick">
 var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#dialogMain").show();
 }else{
 $notify("è¯·éæ©éè¦ä¿®æ¹çæ°æ®â¦â¦");
 }</ClientEvent> <Property name="caption">ç¼è¾</Property> var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#dialogMain").show();
 }else{
 $notify("è¯·éæ©éè¦ä¿®æ¹çæ°æ®â¦â¦");
 }</ClientEvent> <Property name="caption">ä¿®æ¹</Property> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-pencil</Property> </Button> <Button layoutConstraint="left"> <Property name="width">100</Property> <Property name="iconClass">fa fa-pencil-square-o</Property> </ToolBarButton> <ToolBarButton layoutConstraint="left"> <ClientEvent name="onClick">
 var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#ajaxDel").set("parameter",select).execute(function(result){
 select.remove();
 });
 }else{
 $notify("è¯·éæ©éè¦å é¤çä»åºâ¦â¦");
 }
 </ClientEvent> var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#ajaxDel").set("parameter",select).execute(function(result){
 select.remove();
 });
 }else{
 $notify("è¯·éæ©éè¦å é¤çä»åºâ¦â¦");
 }
 </ClientEvent> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-minus</Property> </Button> <Button layoutConstraint="left"> <ClientEvent name="onClick">var data = view.get("#dsQuery.data");
 var page = view.get("#dsMain");
 var param = {
 "pageSize":page.get("pageSize"),
 "pageNo":page.get("pageNo"),
 "foodVariety":data.get("foodVariety"),
 "year":data.get("year"),
 "completeStatus":data.get("completeStatus")
 }
 console.log(param);
 window.parent.$.table.exportExcelDorado("./export/noticeOut-excel", "åºåºéç¥åæ°æ®", param);</ClientEvent> <Property name="caption">导åºEXCEL</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-file-excel-o</Property> <Property name="action">exportExcel</Property> </Button> <Button layoutConstraint="left"> <Property name="width">100</Property> <Property name="iconClass">fa fa-times</Property> </ToolBarButton> <ToolBarButton layoutConstraint="left"> <ClientEvent name="onClick">view.get("#recalculate").execute(function(result){
 if(result == 'success'){
 $notify("æ°æ®æ´æ°å®æï¼ï¼");
 
 var data = view.get("#dsQuery.data");
 view.get("#dsMain").set("parameter",data.toJSON()).flushAsync();
 }else{
 $notify("æ°æ®æ´æ°å¤±è´¥ï¼ï¼");
 }
 });</ClientEvent> if(result == 'success'){
 $notify("æ°æ®æ´æ°å®æï¼ï¼");
 
 var data = view.get("#dsQuery.data");
 view.get("#dsMain").set("parameter",data.toJSON()).flushAsync();
 }else{
 $notify("æ°æ®æ´æ°å¤±è´¥ï¼ï¼");
 }
 });</ClientEvent> <Property name="caption">宿¶æ ¸ç®</Property> <Property name="exClassName">btn2</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-refresh</Property> <Property name="width">100</Property> <Property name="tip">宿éé»è®¤ç»è®¡å°æ¨å¤©ï¼æ¥ç宿¶å®æé请ç¹å»â宿¶æ ¸ç®âæé®</Property> </Button> </Container> </AutoForm> <Container layoutConstraint="center"> <Property name="exClassName">bg-color</Property> <DataGrid id="dataGridMain" layoutConstraint="center"> <ClientEvent name="onDataRowDoubleClick">var data = view.get("#dsMain.data:#");
 if(data){
 view.get("#dialogMain").show();
 }</ClientEvent> </ToolBarButton> </ToolBar> <DataGrid id="dataGridMain" layoutConstraint="padding:8"> <ClientEvent name="onDataRowDoubleClick">view.get("#dataGridMain").set("selection",arg.data);</ClientEvent> <Property name="dataSet">dsMain</Property> <Property name="readOnly">true</Property> <Property name="selectionMode">singleRow</Property> <Property name="readOnly">true</Property> <RowSelectorColumn/> <RowNumColumn> <Property name="width">50</Property> @@ -661,16 +328,14 @@ <Property name="align">center</Property> <Property name="width">120</Property> </DataColumn> <DataColumn> <DataColumn name="customerName"> <Property name="property">customerName</Property> <Property name="name">customerName</Property> <Property name="align">center</Property> </DataColumn> <DataColumn> <DataColumn name="depotId"> <Property name="property">depotId</Property> <Property name="name">depotId</Property> <Property name="align">center</Property> <Property name="width">100</Property> <Property name="width">150</Property> </DataColumn> <DataColumn name="foodVariety"> <Property name="property">foodVariety</Property> @@ -681,12 +346,6 @@ <Property name="property">targetNumber</Property> <Property name="name">targetNumber</Property> <Property name="align">center</Property> <Property name="width">200</Property> </DataColumn> <DataColumn> <Property name="property">completeNumber</Property> <Property name="align">center</Property> <Property name="name">completeNumber</Property> <Property name="width">200</Property> </DataColumn> <DataColumn> @@ -701,28 +360,35 @@ <Property name="name">createTime</Property> <Property name="width">200</Property> </DataColumn> <DataColumn> <Property name="property">updateBy</Property> <Property name="align">center</Property> <Property name="name">updateBy</Property> <Property name="width">120</Property> </DataColumn> <DataColumn> <Property name="property">updateTime</Property> <Property name="align">center</Property> <Property name="name">updateTime</Property> <Property name="width">160</Property> </DataColumn> </DataGrid> </Container> <Container layoutConstraint="bottom"> <Property name="exClassName">bg-color</Property> <DataPilot layoutConstraint="right"> <Property name="itemCodes">pageSize,pages</Property> <Property name="dataSet">dsMain</Property> </DataPilot> <ToolBar layoutConstraint="bottom"> <Fill/> <DataPilot layoutConstraint="right"> <Property name="itemCodes">pageSize,pages</Property> <Property name="dataSet">dsMain</Property> </DataPilot> </ToolBar> </Container> <Dialog id="dialogMain"> <Property name="closeable">false</Property> <Property name="caption">åºåºå</Property> <Property name="width">60%</Property> <Property name="caption">åºåºéç¥å</Property> <Property name="width">1200</Property> <Property name="iconClass">fa fa-tasks</Property> <Buttons> <Button id="btnOk"> <ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
 if(data.validate() != 'ok'){
 $notify("æ°æ®æ ¡éªå¤±è´¥ï¼ï¼");
 return;
 }
 view.get("#ajaxSave").set("parameter",data).execute(function(result){
 <ClientEvent name="onClick">view.get("#updateSave").execute(function(result){
 if(result){
 $alert(result);
 return;
 @@ -730,146 +396,175 @@ $notify("æ°æ®æ§è¡å®æï¼ï¼");
 self.get("parent").hide();
 });</ClientEvent> <Property name="caption">ç¡®å®</Property> <Property name="iconClass">fa fa-check</Property> <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">view.get("#dsMain.data:#").cancel();
 self.get("parent").hide();</ClientEvent> <Property name="caption">åæ¶</Property> <Property name="iconClass">fa fa-times</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-times-circle</Property> <Property name="width">120</Property> </Button> </Buttons> <Children> <Container> <AutoForm id="autoForm1" layoutConstraint="top padding:10"> <Property name="cols">*,*,*,*,*,*,*</Property> <Property name="dataSet">dsQueryTitle</Property> <Property name="labelAlign">right</Property> <AutoForm layoutConstraint="top "> <Property name="dataSet">dsMain</Property> <Property name="showHint">false</Property> <AutoFormElement layoutConstraint="colSpan:7"> <Property name="name">title</Property> <Property name="property">title</Property> <Property name="showLabel">false</Property> <Property name="cols">210,*,210</Property> <Control/> <AutoFormElement> <Property name="name">name</Property> <Property name="property">name</Property> <Property name="editorType">Label</Property> <Property name="style"> <Property name="font">bold 30px Georgia, serif;</Property> <Property name="text-align">center</Property> </Property> <Property name="showLabel">false</Property> <Property name="showHint">false</Property> <Property name="className">f-title</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">id</Property> <Property name="property">id</Property> <Property name="editorType">Label</Property> <Property name="showHint">false</Property> <Property name="labelAlign">right</Property> <Property name="showLabel">false</Property> <Editor/> </AutoFormElement> </AutoForm> <Container layout="padding:15"> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelWidth">110</Property> <AutoFormElement> <Property name="name">name</Property> <Property name="property">name</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">customerName</Property> <Property name="property">customerName</Property> <Property name="trigger">ddCustomer</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">unitName</Property> <Property name="property">unitName</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">depotId</Property> <Property name="property">depotId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">foodVariety</Property> <Property name="property">foodVariety</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">year</Property> <Property name="property">year</Property> <Property name="trigger">defaultYearDropDown</Property> <Editor/> </AutoFormElement> <Label layoutConstraint="colSpan:1"/> <AutoFormElement> <Property name="name">targetNumber</Property> <Property name="property">targetNumber</Property> <Property name="readOnly">false</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">completeNumber</Property> <Property name="property">completeNumber</Property> <Property name="readOnly">false</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">planName</Property> <Property name="property">planName</Property> <Property name="trigger">ddPlan</Property> <Editor/> </AutoFormElement> <Label layoutConstraint="colSpan:1"> <Property name="style"> <Property name="color">blue</Property> </Property> <Property name="text">注ï¼å½åéç¥åå ³èçåºåºè®¡å</Property> </Label> <AutoFormElement> <Property name="name">contractName</Property> <Property name="property">contractName</Property> <Property name="trigger">ddContract</Property> <Editor/> </AutoFormElement> <Label layoutConstraint="colSpan:1"> <Property name="style"> <Property name="color">blue</Property> </Property> <Property name="text">注ï¼å½åéç¥åå ³èçéå®åå</Property> </Label> <AutoFormElement> <Property name="name">createTime</Property> <Property name="property">createTime</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">completeTime</Property> <Property name="property">completeTime</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">completeStatus</Property> <Property name="property">completeStatus</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">remark</Property> <Property name="property">remark</Property> <Property name="editorType">TextArea</Property> <Editor/> </AutoFormElement> </AutoForm> </Container> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelWidth">120</Property> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">name</Property> <Property name="property">name</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">type</Property> <Property name="property">type</Property> <Property name="editorType">RadioGroup</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">depotId</Property> <Property name="property">depotId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">foodVariety</Property> <Property name="property">foodVariety</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">year</Property> <Property name="property">year</Property> <Property name="trigger">defaultYearDropDown</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">customerName</Property> <Property name="property">customerName</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">unitName</Property> <Property name="property">unitName</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">targetNumber</Property> <Property name="property">targetNumber</Property> <Property name="readOnly">false</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">completeNumber</Property> <Property name="property">completeNumber</Property> <Property name="readOnly">false</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">completeStatus</Property> <Property name="property">completeStatus</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">completeTime</Property> <Property name="property">completeTime</Property> <Property name="readOnly">false</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createBy</Property> <Property name="property">createBy</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">auditStatus</Property> <Property name="property">auditStatus</Property> <Property name="readOnly">true</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">contract</Property> <Property name="property">contract</Property> <Editor/> </AutoFormElement> <Label> <Property name="style"> <Property name="color">blue</Property> </Property> <Property name="text">注ï¼ç管éç¥åï¼å¯å¡«åè´¨æ¼åååç§°</Property> </Label> <AutoFormElement layoutConstraint="colSpan:3"> <Property name="name">remark</Property> <Property name="property">remark</Property> <Property name="editorType">TextArea</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createTime</Property> <Property name="property">createTime</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">auditUser</Property> <Property name="property">auditUser</Property> <Property name="readOnly">true</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">auditDate</Property> <Property name="property">auditDate</Property> <Property name="readOnly">true</Property> <Editor/> </AutoFormElement> <HtmlContainer layoutConstraint="colSpan:3"> <Property name="content">1.åºåºéç¥åä½ä¸ºåºåºä½ä¸çåç½®æ¡ä»¶ï¼å¿ é¡»é ç½®ï¼å¦åæ æ³è¿è¡å ¥åºä½ä¸ã<br>
 2.åæ®ç±»å=åºåºéç¥åï¼è¡¨ç¤ºåºåºèªå·±ä½ä¸ä¸å¡ï¼ä¸åç管管çã</Property> <Property name="exClassName">h-tip</Property> <Property name="contentOverflow">hidden</Property> </HtmlContainer> </AutoForm> </Container> </Children> <Tools/> </Dialog> <AjaxAction id="ajaxGetDepot"> <Property name="service">depotPR#getDepot</Property> </AjaxAction> <AjaxAction id="ajaxSave"> <Property name="service">inoutNoticePR#saveOut</Property> </AjaxAction> <UpdateAction id="updateSave"> <Property name="dataResolver">inoutNoticePR#saveOut</Property> <UpdateItem> <Property name="dataPath">[#current]</Property> <Property name="dataSet">dsMain</Property> </UpdateItem> </UpdateAction> <AjaxAction id="ajaxDel"> <Property name="service">inoutNoticePR#delDataOut</Property> <Property name="confirmMessage">ç¡®å®è¦æ§è¡å é¤ä¹ï¼</Property> @@ -877,240 +572,8 @@ <AjaxAction id="ajaxInitAdd"> <Property name="service">inoutNoticePR#initAddOut</Property> </AjaxAction> <CustomDropDown id="ddCustomer"> <Property name="minHeight">400</Property> <Property name="assignmentMap">customerId=id,customerName=name</Property> <Property name="minWidth">500</Property> <Property name="autoOpen">true</Property> <Container layout="regionPadding:5"> <DataSet id="dsCustomer"> <Property name="dataProvider">inoutCustomerPR#queryListByKey</Property> <Property name="dataType">[dtInoutCustomer]</Property> <Property name="parameter"> <Entity> <Property name="type">OUT</Property> </Entity> </Property> </DataSet> <Container layout="hbox regionPadding:5"> <TextEditor id="key"> <Property name="blankText"> -- ç¼ç æè åç§° --</Property> <Property name="width">200</Property> </TextEditor> <Button> <ClientEvent name="onClick">var key = view.get("#key.value");
 var type = "${request.getParameter('type')}";
 view.get("#dsCustomer").set("parameter",{key:key,type:type}).flushAsync();</ClientEvent> <Property name="caption">æ¥è¯¢</Property> <Property name="iconClass">fa fa-search</Property> </Button> <Button> <ClientEvent name="onClick">var data = view.get("#dsCustomer.data:#");
 if(data){
 view.get("#ddCustomer").close(data.toJSON());
 }</ClientEvent> <Property name="iconClass">fa fa-check</Property> <Property name="caption">ç¡®å®</Property> </Button> </Container> <DataGrid> <ClientEvent name="onDataRowDoubleClick">var data = view.get("#dsCustomer.data:#");
 if(data){
 view.get("#ddCustomer").close(data.toJSON());
 }</ClientEvent> <Property name="dataSet">dsCustomer</Property> <Property name="readOnly">true</Property> <DataColumn name="id"> <Property name="property">id</Property> <Property name="width">100</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="name"> <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = "bold";
 arg.processDefault = true;</ClientEvent> <Property name="property">name</Property> <Property name="align">center</Property> </DataColumn> </DataGrid> </Container> </CustomDropDown> <AjaxAction id="recalculate"> <Property name="service">inoutNoticePR#updateSumNoticeOut</Property> </AjaxAction> <CustomDropDown id="ddPlan"> <Property name="minHeight">325</Property> <Property name="assignmentMap">planId=id,planName=planId</Property> <Property name="minWidth">900</Property> <Property name="autoOpen">false</Property> <Container layout="regionPadding:5"> <DataSet id="dsPlan"> <Property name="dataProvider">planManagePR#pagePlanDetail</Property> <Property name="dataType">[dtPlan]</Property> <Property name="parameter"></Property> <Property name="pageSize">5</Property> </DataSet> <AutoForm layoutConstraint="top"> <Property name="cols">*,*,*</Property> <Property name="dataSet">dsQuery</Property> <Property name="exClassName">bg-color</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">:</Property> <Property name="labelWidth">100</Property> <AutoFormElement> <Property name="name">depotId</Property> <Property name="property">depotId</Property> <Property name="editable">false</Property> <Property name="label">计åä»åº</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">year</Property> <Property name="property">year</Property> <Property name="trigger">defaultYearDropDown</Property> <Property name="editable">false</Property> <Property name="label">æ¶è·å¹´ä»½</Property> <Editor/> </AutoFormElement> <Container layout="hbox regionPadding:15"> <Button> <ClientEvent name="onClick">var data = view.get("#dsQuery.data");
 if(data){
 view.get("#dsPlan").set("parameter",data.toJSON()).flushAsync();
 }else{
 view.get("#dsPlan").flushAsync();
 }
 </ClientEvent> <Property name="caption">æ¥è¯¢</Property> <Property name="exClassName">btn-normal</Property> <Property name="iconClass">fa fa-search</Property> </Button> <Button> <ClientEvent name="onClick">var data = view.get("#dsPlan.data:#");
 if(data){
 view.get("#ddPlan").close(data.toJSON());
 }</ClientEvent> <Property name="iconClass">fa fa-check</Property> <Property name="caption">ç¡®å®</Property> </Button> </Container> </AutoForm> <DataGrid> <ClientEvent name="onDataRowDoubleClick">var data = view.get("#dsPlan.data:#");
 if(data){
 view.get("#ddPlan").close(data.toJSON());
 }</ClientEvent> <Property name="dataSet">dsPlan</Property> <Property name="readOnly">true</Property> <DataColumn> <Property name="property">planId</Property> <Property name="width">100</Property> <Property name="align">center</Property> <Property name="name">planId</Property> <Property name="visible">false</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> </DataColumn> <DataColumn> <Property name="property">year</Property> <Property name="width">200</Property> <Property name="align">center</Property> <Property name="name">year</Property> </DataColumn> <DataColumn> <Property name="property">planNum</Property> <Property name="width">80</Property> <Property name="align">center</Property> <Property name="name">planNum</Property> </DataColumn> <DataColumn> <Property name="property">foodVariety</Property> <Property name="width">80</Property> <Property name="align">center</Property> <Property name="name">foodVariety</Property> </DataColumn> <DataColumn> <Property name="property">type</Property> <Property name="align">center</Property> <Property name="name">type</Property> </DataColumn> </DataGrid> <DataPilot layoutConstraint="bottom"> <Property name="dataSet">dsPlan</Property> </DataPilot> </Container> </CustomDropDown> <CustomDropDown id="ddContract"> <Property name="minHeight">317</Property> <Property name="assignmentMap">contractId=id,contractName=name</Property> <Property name="minWidth">550</Property> <Property name="autoOpen">false</Property> <Container layout="regionPadding:5"> <DataSet id="dsContract"> <Property name="dataProvider">contractManagePR#pageContract</Property> <Property name="dataType">[dtContract]</Property> <Property name="parameter"></Property> <Property name="pageSize">5</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");
 view.get("#dsContract").set("parameter",{key:key}).flushAsync();</ClientEvent> <Property name="caption">æ¥è¯¢</Property> <Property name="iconClass">fa fa-search</Property> </Button> <Button> <ClientEvent name="onClick">var data = view.get("#dsContract.data:#");
 if(data){
 view.get("#ddContract").close(data.toJSON());
 }</ClientEvent> <Property name="iconClass">fa fa-check</Property> <Property name="caption">ç¡®å®</Property> </Button> </Container> <DataGrid> <ClientEvent name="onDataRowDoubleClick">var data = view.get("#dsContract.data:#");
 if(data){
 view.get("#ddContract").close(data.toJSON());
 }</ClientEvent> <Property name="dataSet">dsContract</Property> <Property name="readOnly">true</Property> <DataColumn> <Property name="property">id</Property> <Property name="width">100</Property> <Property name="align">center</Property> <Property name="name">id</Property> <Property name="visible">false</Property> </DataColumn> <DataColumn name="name"> <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = "bold";
 arg.processDefault = true;</ClientEvent> <Property name="property">name</Property> <Property name="align">center</Property> </DataColumn> <DataColumn> <Property name="property">planName</Property> <Property name="align">center</Property> <Property name="name">planName</Property> </DataColumn> <DataColumn> <Property name="property">year</Property> <Property name="width">80</Property> <Property name="align">center</Property> <Property name="name">year</Property> </DataColumn> </DataGrid> <DataPilot layoutConstraint="bottom"> <Property name="dataSet">dsContract</Property> </DataPilot> </Container> </CustomDropDown> </View> </ViewConfig> fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticePR.java
@@ -5,76 +5,28 @@ 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.service.SysDeptService; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.domain.entity.SysDept; 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.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Component; import javax.annotation.Resource; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import java.util.*; /** * @Description éç¥å管ç * @Author CZT * @Date 2024/12/16 10:10 * @Date 2025/11/29 16:42 */ @Component public class InoutNoticePR { @Resource private InoutNoticeService inoutNoticeService; @Resource private SysDeptService sysDeptService; /* *//** * inoutNoticePR#getTitle æ ¹æ®æ¥è¡¨ç±»åï¼è·åé»è®¤æ¥è¯¢ä¿¡æ¯ï¼æ¯å¦è¡¨å¤´ä¿¡æ¯ç * * @param * @return *//* @DataProvider public Map<String, Object> getTitle(Map<String, Object> param) { Map<String, Object> result = new HashMap<String, Object>(); //è·å忰䏿¥è¡¨ç±»å String type = (String)param.get("type"); //è·åååºç¼ç 对åºçååºåç§° String deptName = ""; SysDept subDept = sysDeptService.getCacheDept(null, ContextUtil.subDeptId(null)); if (null != subDept) { deptName = subDept.getDeptName(); } if ("NOTICE_IN".equals(type)) { result.put("title", "å ¥åºéç¥å"); if (StringUtils.isNotEmpty(deptName)) { result.put("title", deptName + "å ¥åºéç¥å"); } } if ("NOTICE_OUT".equals(type)) { result.put("title", "åºåºéç¥å"); if (StringUtils.isNotEmpty(deptName)) { result.put("title", deptName + "åºåºéç¥å"); } } return result; }*/ /** * inoutNoticePR#getYearQuery é»è®¤å¹´ä»½ @@ -92,47 +44,6 @@ result.put("deptId", deptId); return result; } /** * 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; if (Constant.TYPE_IN.equals(type)) { List<InoutNoticeIn> listIn = this.queryNoticeIn(param); 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 = this.queryNoticeOut(param); if (null != listOut && listOut.size() > 0) { for (InoutNoticeOut inoutNoticeOut : listOut) { dto = new NoticeDto(); BeanUtils.copyProperties(inoutNoticeOut, dto); list.add(dto); } } } return list; } /*==================== å ¥åºéç¥åç¸å ³ä¸å¡ ====================*/ @@ -193,61 +104,6 @@ } /** * æ ¹æ®ä¸åæ¡ä»¶æ¥è¯¢ * @param param * @return */ public List<InoutNoticeIn> queryNoticeIn(Map<String, Object> param) { if (null == param) { param = new HashMap<>(); } Map<String, Object> finalParam = param; //å¤åæ°å页æ¥è¯¢ Pageable pageable = PageRequest.of(0, 10000, Sort.Direction.ASC, InoutNoticeIn.SORT_PROP); Specification<InoutNoticeIn> specification = new Specification<InoutNoticeIn>() { private static final long serialVersionUID = 1L; public Predicate toPredicate(Root<InoutNoticeIn> root, CriteriaQuery<?> query, CriteriaBuilder cb) { List<Predicate> predicates = new ArrayList<Predicate>(); //ææçæè¨ Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId()); predicates.add(predicate1); Predicate predicate2 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null)); predicates.add(predicate2); Predicate predicate3 = cb.equal(root.get("completeStatus"), "NONE"); predicates.add(predicate3); String key = (String) finalParam.get("customerId"); if (StringUtils.isNotEmpty(key)) { Predicate predicate4 = cb.equal(root.get("customerId"), key); predicates.add(predicate4); } key = (String) finalParam.get("foodVariety"); if (StringUtils.isNotEmpty(key)) { Predicate predicate5 = cb.equal(root.get("foodVariety"), key); predicates.add(predicate5); } key = (String) finalParam.get("depotId"); if (StringUtils.isNotEmpty(key)) { Predicate predicate6 = cb.equal(root.get("depotId"), key); predicates.add(predicate6); } key = (String) finalParam.get("key"); if (StringUtils.isNotEmpty(key)) { Predicate predicate7 = cb.like(root.get("name"), "%" + key + "%"); predicates.add(predicate7); } return cb.and(predicates.toArray(new Predicate[0])); } }; //org.springframework.data.domain.Page<InoutNoticeIn> japPage = inoutNoticeService.queryAllNoticeIn(specification, pageable); //return japPage.getContent(); return null; } /** * éæ°æ ¸ç®å ¥åºéç¥å宿é * * inoutNoticePR#updateSumNoticeIn @@ -259,7 +115,6 @@ //è·åæææªå®æç¶æçå ¥åºéç¥å String companyId = ContextUtil.getCompanyId(); String deptId = ContextUtil.subDeptId(null); List<InoutNoticeIn> noticeInList = inoutNoticeService.getUnComNoticeIn(companyId); @@ -267,8 +122,6 @@ inoutNoticeService.updateSumNoticeIn(noticeInList); return "success"; } return "fail"; } @@ -283,11 +136,13 @@ public InoutNoticeOut initAddOut() { SysUser user = ContextUtil.getLoginUser(); InoutNoticeOut data = new InoutNoticeOut(); data.setId("CKTZD_" + ContextUtil.generateId()); data.setId(ContextUtil.generateOrderId("CK")); data.setName("åºåºéç¥å"); data.setCompanyId(user.getCompanyId()); data.setDeptId(ContextUtil.subDeptId(user)); data.setTag(Constant.YN_Y); data.setYear(DateFormatUtils.format(new Date(), "yyyy")); data.setCreateBy(ContextUtil.getLoginUserName()); data.setCreateTime(new Date()); return data; } @@ -297,57 +152,15 @@ * @param param */ @DataProvider public void pageQueryOut(Page<InoutNoticeOut> page, Map<String, Object> param) { public void pageQueryOut(Page<InoutNoticeOut> page, NoticeParam param) { if (null == param) { param = new HashMap<>(); } Map<String, Object> finalParam = param; com.baomidou.mybatisplus.extension.plugins.pagination.Page<InoutNoticeOut> corePage = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(page.getPageNo(), page.getPageSize()); //å¤åæ°å页æ¥è¯¢ Pageable pageable = PageRequest.of(0, 10000, Sort.Direction.ASC, InoutNoticeOut.SORT_PROP); Specification<InoutNoticeOut> specification = new Specification<InoutNoticeOut>() { private static final long serialVersionUID = 1L; inoutNoticeService.pageQueryOut(corePage, param); public Predicate toPredicate(Root<InoutNoticeOut> root, CriteriaQuery<?> query, CriteriaBuilder cb) { List<Predicate> predicates = new ArrayList<Predicate>(); //ææçæè¨ Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId()); predicates.add(predicate1); Predicate predicate2 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null)); predicates.add(predicate2); String key = String.valueOf(finalParam.get("year")); if (StringUtils.isNotEmpty(key)) { Predicate predicate3 = cb.equal(root.get("year"), key); predicates.add(predicate3); } key = (String) finalParam.get("id"); if (StringUtils.isNotEmpty(key)) { Predicate predicate4 = cb.equal(root.get("id"), key); predicates.add(predicate4); } key = (String) finalParam.get("customerId"); if (StringUtils.isNotEmpty(key)) { Predicate predicate5 = cb.equal(root.get("customerId"), key); predicates.add(predicate5); } key = (String) finalParam.get("completeStatus"); if (StringUtils.isNotEmpty(key)) { Predicate predicate6 = cb.equal(root.get("completeStatus"), key); predicates.add(predicate6); } key = (String) finalParam.get("foodVariety"); if (StringUtils.isNotEmpty(key)) { Predicate predicate7 = cb.equal(root.get("foodVariety"), key); predicates.add(predicate7); } return cb.and(predicates.toArray(new Predicate[0])); } }; //org.springframework.data.domain.Page<InoutNoticeOut> japPage = inoutNoticeService.queryAllNoticeOut(specification, pageable); //page.setEntityCount((int) japPage.getTotalElements()); //page.setEntities(japPage.getContent()); // éæ°å°è£ page.setEntities(corePage.getRecords()); page.setEntityCount(Integer.parseInt(String.valueOf(corePage.getTotal()))); } /** @@ -355,7 +168,7 @@ * @param data * @return */ @Expose @DataResolver public String saveOut(InoutNoticeOut data) { InoutNoticeOut inoutNoticeOut = new InoutNoticeOut(); BeanUtils.copyProperties(data, inoutNoticeOut); @@ -372,60 +185,6 @@ return inoutNoticeService.delDataOut(inoutNoticeOut); } /** * æ ¹æ®ä¸åæ¡ä»¶æ¥è¯¢ * @param param * @return */ public List<InoutNoticeOut> queryNoticeOut(Map<String, Object> param) { if (null == param) { param = new HashMap<>(); } Map<String, Object> finalParam = param; //å¤åæ°å页æ¥è¯¢ Pageable pageable = PageRequest.of(0, 10000, Sort.Direction.ASC, InoutNoticeOut.SORT_PROP); Specification<InoutNoticeOut> specification = new Specification<InoutNoticeOut>() { private static final long serialVersionUID = 1L; public Predicate toPredicate(Root<InoutNoticeOut> root, CriteriaQuery<?> query, CriteriaBuilder cb) { List<Predicate> predicates = new ArrayList<Predicate>(); //ææçæè¨ Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId()); predicates.add(predicate1); Predicate predicate2 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null)); predicates.add(predicate2); Predicate predicate3 = cb.equal(root.get("completeStatus"), "NONE"); predicates.add(predicate3); String key = (String) finalParam.get("customerId"); if (StringUtils.isNotEmpty(key)) { Predicate predicate4 = cb.equal(root.get("customerId"), key); predicates.add(predicate4); } key = (String) finalParam.get("foodVariety"); if (StringUtils.isNotEmpty(key)) { Predicate predicate5 = cb.equal(root.get("foodVariety"), key); predicates.add(predicate5); } key = (String) finalParam.get("depotId"); if (StringUtils.isNotEmpty(key)) { Predicate predicate6 = cb.equal(root.get("depotId"), key); predicates.add(predicate6); } key = (String) finalParam.get("key"); if (StringUtils.isNotEmpty(key)) { Predicate predicate7 = cb.like(root.get("name"), "%" + key + "%"); predicates.add(predicate7); } return cb.and(predicates.toArray(new Predicate[0])); } }; //org.springframework.data.domain.Page<InoutNoticeOut> japPage = inoutNoticeService.queryAllNoticeOut(specification, pageable); //return japPage.getContent(); return null; } /** * éæ°æ ¸ç®åºåºéç¥å宿é @@ -439,7 +198,6 @@ //è·åæææªå®æç¶æçå ¥åºéç¥å String companyId = ContextUtil.getCompanyId(); String deptId = ContextUtil.subDeptId(null); List<InoutNoticeOut> noticeOutList = inoutNoticeService.getUnComNoticeOut(companyId); fzzy-igdss-view/src/main/java/com/fzzy/igds/QuantityConfPR.java
@@ -6,10 +6,12 @@ import com.fzzy.igds.domain.QuantityConf; import com.fzzy.igds.service.DepotService; import com.fzzy.igds.service.QuantityService; import com.fzzy.igds.utils.ContextUtil; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.util.List; /** * @Description * @Author CZT @@ -30,7 +32,7 @@ */ @DataProvider public List<QuantityConf> getConfList() { return quantityService.getConfList(null, null); return quantityService.getConfList(null, ContextUtil.subDeptId(null)); } /** fzzy-igdss-view/src/main/java/com/fzzy/igds/SecCamera.view.xml
@@ -571,7 +571,7 @@ </AutoFormElement> <Button> <ClientEvent name="onClick">var param = view.get("#dsParam.data");
 view.get("#dsMain").set("parameter",param.toJSON()).flushAsync();</ClientEvent> view.get("#dsMain").set("parameter",param).flushAsync();</ClientEvent> <Property name="caption">æç´¢</Property> <Property name="iconClass">fa fa-search</Property> <Property name="exClassName">btn-q1</Property> @@ -705,13 +705,13 @@ <Editor/> </DataColumn> </DataGrid> </Container> <Container layoutConstraint="bottom"> <Property name="className">c-bottom</Property> <DataPilot layoutConstraint="right"> <Property name="dataSet">dsMain</Property> <Property name="itemCodes">pageSize,pages</Property> </DataPilot> <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> @@ -1199,9 +1199,5 @@ </Children> <Tools/> </Dialog> <AjaxAction id="ajaxRemoteMedia"> <Property name="confirmMessage">ç¡®å®è¦åæ¥ä¹ï¼</Property> <Property name="service">secCameraPR#flushByMedia</Property> </AjaxAction> </View> </ViewConfig> fzzy-igdss-view/src/main/java/com/fzzy/igds/SecCameraPR.java
@@ -7,23 +7,11 @@ import com.fzzy.igds.domain.Camera; import com.fzzy.igds.service.SecCameraService; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Component; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * @Description @@ -43,61 +31,19 @@ * @param param */ @DataProvider public void listPageCamera(Page<Camera> page, Map<String, Object> param) { org.springframework.data.domain.Page<Camera> japPage = pageCamera(page, param); page.setEntityCount((int) japPage.getTotalElements()); page.setEntities(japPage.getContent()); } public void listPageCamera(Page<Camera> page, Camera param) { com.baomidou.mybatisplus.extension.plugins.pagination.Page<Camera> corePage = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(page.getPageNo(), page.getPageSize()); public org.springframework.data.domain.Page<Camera> pageCamera(Page<Camera> page, Map<String, Object> param) { if (null == param) { param = new HashMap<>(); if(null == param) { param = new Camera(); } Map<String, Object> finalParam = param; Camera camera = new Camera(); BeanUtils.copyProperties(param, camera); secCameraService.listPageCamera(corePage, camera); //å¤åæ°å页æ¥è¯¢ Pageable pageable = PageRequest.of(page.getPageNo() - 1, page.getPageSize(), Sort.Direction.ASC, Camera.SORT_PROP); Specification<Camera> specification = new Specification<Camera>() { private static final long serialVersionUID = 1L; public Predicate toPredicate(Root<Camera> root, CriteriaQuery<?> query, CriteriaBuilder cb) { List<Predicate> predicates = new ArrayList<Predicate>(); //ææçæè¨ Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId()); predicates.add(predicate1); Predicate predicate2 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null)); predicates.add(predicate2); String key = (String) finalParam.get("bizType"); if (StringUtils.isNotEmpty(key)) { Predicate predicate3 = cb.equal(root.get("bizType"), key); predicates.add(predicate3); } key = (String) finalParam.get("name"); if (StringUtils.isNotEmpty(key)) { Predicate predicate4 = cb.like(root.get("name"), "%" + key + "%"); predicates.add(predicate4); } key = (String) finalParam.get("brand"); if (StringUtils.isNotEmpty(key)) { Predicate predicate5 = cb.equal(root.get("brand"), key); predicates.add(predicate5); } key = (String) finalParam.get("spjklx"); if (StringUtils.isNotEmpty(key)) { Predicate predicate5 = cb.equal(root.get("spjklx"), key); predicates.add(predicate5); } key = (String) finalParam.get("spdwlx"); if (StringUtils.isNotEmpty(key)) { Predicate predicate5 = cb.equal(root.get("spdwlx"), key); predicates.add(predicate5); } return cb.and(predicates.toArray(new Predicate[0])); } }; org.springframework.data.domain.Page<Camera> japPage = secCameraService.findAll(specification, pageable); return japPage; // éæ°å°è£ page.setEntities(corePage.getRecords()); page.setEntityCount(Integer.parseInt(String.valueOf(corePage.getTotal()))); } /** @@ -107,7 +53,7 @@ */ @DataProvider public List<Camera> listCamera() { return secCameraService.listCamera(); return secCameraService.listCamera(ContextUtil.getCompanyId(),ContextUtil.subDeptId(null)); } /** @@ -143,41 +89,6 @@ public String refreshCache() { secCameraService.refreshCache(ContextUtil.getCompanyId()); return null; } /*** * securityPR#flushByMedia * * è·åæå头åè¡¨ä¿¡æ¯ * @return */ @Expose public String flushByMedia(String playType) { if (null == playType){ return "没æéæ©ææ¾æ¹å¼ï¼æ§è¡å¤±è´¥"; } // try { // if (CameraUtil.PLAY_TYPE_MEDIA_HIK.equals(playType)) { // ApiCameraData apiCameraData = new ApiCameraData(); // apiCameraData.setCompanyId(ContextUtil.getCompanyId()); // apiCameraData.setDeptId(ContextUtil.subDeptId(null)); // apiCameraData.setPlayType(playType); // List<SecCameraDto> list = apiCameraManager.getApiCameraService(playType).searchCamera(apiCameraData); // if(list == null){ // return "åæ¥å¤±è´¥ï¼"; // }else { // return "忥æåï¼"; // } // } return "å½åææ¾æ¹å¼æ²¡ææ¤åè½ï¼"; // // }catch (Exception e){ // log.error("-----忥æå头å表失败-----åå ={}", e.toString()); // return "è¿ç¨æ¥å£æå¡å¼å¸¸ï¼è¯·æ ¸æ¥åéè¯ï¼"; // } } } fzzy-igdss-view/src/main/java/com/fzzy/igds/SelectDeptPR.java
@@ -25,6 +25,7 @@ private CoreCompanyService companyService; @Resource private CoreDeptService deptService; /** * selectDeptPR#listCompany * æ ¹æ®è¡æ¿åºå代ç è·å ä¼ä¸ä¿¡æ¯å表 @@ -37,11 +38,11 @@ SysUser user = ContextUtil.getLoginUser(); if(FrameworkConfig.getCompanyId().equals(user.getCompanyId())){ //ç³»ç»çç®¡è´¦å· return companyService.getAllData(user.getCompanyId()); //ç³»ç»ç管账å·ï¼è·åç»ç»ä¸ææå ¬å¸ä¿¡æ¯ return companyService.listCompany(null, user.getCompanyId(), null); }else { //æ¶å¨å ¬å¸è´¦å· return companyService.getDataById(user.getCompanyId()); //æ¶å¨å ¬å¸è´¦å·ï¼åªè·åå½åå ¬å¸ä¿¡æ¯ return companyService.listCompany(user.getCompanyId(), null, null); } } @@ -49,11 +50,11 @@ /** * è·åå ¬å¸ä¸å±åºåºå表 * selectDeptPR#listArea * @param id * @param parentId * @return */ @DataProvider public List<Dept> listArea(String id){ return deptService.getDataByParentId(id); public List<Dept> listArea(String parentId){ return deptService.listDept(null,null, parentId); } } fzzy-igdss-view/src/main/java/models/core.model.xml
@@ -919,12 +919,17 @@ <PropertyDef name="companyId"> <Property/> </PropertyDef> <PropertyDef name="depotId"> <Property/> </PropertyDef> <PropertyDef name="deptId"> <Property/> </PropertyDef> <PropertyDef name="depotId"> <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="customerName"> <Property/> @@ -933,6 +938,11 @@ <PropertyDef name="foodVariety"> <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="contractId"> <Property/> @@ -958,6 +968,22 @@ <PropertyDef name="completeStatus"> <Property/> <Property name="label">å®æç¶æ</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="name">æªå®æ</Property> <Property name="code">NONE</Property> </Entity> <Entity> <Property name="name">已宿</Property> <Property name="code">COMPLETE</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="storageReal"> <Property name="dataType">Double</Property> fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/system/SysDeptNewController.java
@@ -85,11 +85,11 @@ if(i > 0){ if (Constant.DEPT_TYPE_10.equals(dept.getType())) { //æ°å¢å ¬å¸ä¿¡æ¯ coreCompanyService.saveOrUpdate(dept); coreCompanyService.saveOrUpdate(dept, true); } if (Constant.DEPT_TYPE_20.equals(dept.getType())) { //æ°å¢åºåºä¿¡æ¯ coreDeptService.saveOrUpdate(dept); coreDeptService.saveOrUpdate(dept, true); } } return toAjax(i); @@ -132,11 +132,11 @@ if(i > 0){ if (Constant.DEPT_TYPE_10.equals(dept.getType())) { //æ°å¢å ¬å¸ä¿¡æ¯ coreCompanyService.saveOrUpdate(dept); coreCompanyService.saveOrUpdate(dept, false); } if (Constant.DEPT_TYPE_20.equals(dept.getType())) { //æ°å¢åºåºä¿¡æ¯ coreDeptService.saveOrUpdate(dept); coreDeptService.saveOrUpdate(dept, false); } } return toAjax(i); fzzy-igdss-web/src/main/resources/static/eoms/eoms.css
ÎļþÒÑɾ³ý fzzy-igdss-web/src/main/resources/static/eoms/index.js
ÎļþÒÑɾ³ý fzzy-igdss-web/src/main/resources/templates/eoms/index.html
ÎļþÒÑɾ³ý fzzy-igdss-web/src/main/resources/templates/inout/inout-register.html
@@ -295,7 +295,7 @@ <h3>ç§°éæ°æ®<span id="text-param"></span></h3> <div style="float: right;margin-top: -35px"> <button class="rkbk-quick-btn layui-btn" onclick="selectByHand()"> <i><img th:src="@{/img/web/inout/icon-hyd.png}"/></i>éæ©è½¦è¾ <i><img th:src="@{/img/web/inout/icon-hyd.png}"/></i>éæ©è½¦è¾ç§°é </button> <button class="rkbk-quick-btn layui-btn btn-blue" onclick="weight()"> <i><img th:src="@{/img/web/inout/icon-chengzhong.png}"/></i>æ¥éª¤1ï¼ç§°éåææ fzzy-igdss-web/src/main/resources/templates/inout/inout-weight.html
@@ -174,9 +174,10 @@ <div class="qyzj-btnbox layui-clear"> <div class="rkbk-quick fl"> <button class="rkbk-quick-btn layui-btn btn-blue" onclick="weight()"> <button class="rkbk-quick-btn layui-btn" onclick="selectByHand()"> <i><img th:src="@{/img/web/inout/icon-hyd.png}"/></i>éæ©è½¦è¾ç§°é </button> <button class="rkbk-quick-btn layui-btn btn-blue" onclick="weight()"> <i><img th:src="@{/img/web/inout/icon-chengzhong.png}"/></i>æ¥éª¤1ï¼ç§°éç¡®è®¤åææ </button> <button class="rkbk-quick-btn layui-btn btn-green" onclick="submit()"> @@ -184,9 +185,6 @@ </button> <button class="rkbk-quick-btn layui-btn btn-blue" onclick="printBill()"> <i><img th:src="@{/img/web/inout/icon-dayin.png}"/></i>æ¥éª¤3ï¼æå°è¿ç£ å </button> <button class="rkbk-quick-btn layui-btn" onclick="showCheck()"> <i><img th:src="@{/img/web/inout/icon-hyd.png}"/></i>è´¨æ£è¯¦ç» </button> <button class="rkbk-quick-btn layui-btn btn-violet" onclick="flushPage()"> <i><img th:src="@{/img/web/inout/icon-shuaxin2.png}"/></i>å·æ°é¡µé¢