| | |
| | | |
| | | <properties> |
| | | <java.version>1.8</java.version> |
| | | <cool.version>3.4.0</cool.version> |
| | | <cool.version>3.4.5</cool.version> |
| | | <mysql-driver.version>5.1.47</mysql-driver.version> |
| | | <mybatis-plus.version>2.3.2</mybatis-plus.version> |
| | | <mybatis-plus.version>3.4.2</mybatis-plus.version> |
| | | <fastjson.version>1.2.58</fastjson.version> |
| | | <springfox.version>2.7.0</springfox.version> |
| | | </properties> |
| | |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <finalName>lktwcs</finalName> |
| | | <finalName>bjycwcs</finalName> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | |
| | | vo.setCrnStatus(CrnStatusType.MACHINE_ERROR); |
| | | } else { |
| | | if (crnProtocol.getTaskNo()>0) { |
| | | WrkMast wrkMast = wrkMastService.selectById(crnProtocol.getTaskNo()); |
| | | WrkMast wrkMast = wrkMastService.getById(crnProtocol.getTaskNo()); |
| | | if (wrkMast != null) { |
| | | vo.setCrnStatus(CrnStatusType.process(wrkMast.getIoType())); |
| | | } else { |
| | |
| | | if (null != devpThread) { |
| | | StaProtocol staProtocol = devpThread.getStation().get(siteId); |
| | | if (staProtocol != null) { |
| | | BasDevp basDevp = basDevpService.selectById(siteId); |
| | | BasDevp basDevp = basDevpService.getById(siteId); |
| | | if (basDevp == null) { |
| | | return R.error("数据库维护异常"); |
| | | } |
| | |
| | | vo.setWorkNo(staProtocol.getWorkNo()); // 工作号 |
| | | |
| | | if (staProtocol.getWorkNo() > 0) { |
| | | WrkMast wrkMast = wrkMastService.selectById(staProtocol.getWorkNo()); |
| | | WrkMast wrkMast = wrkMastService.getById(staProtocol.getWorkNo()); |
| | | if (wrkMast != null) { |
| | | vo.setWrkSts(wrkMast.getWrkSts$()); // 工作状态 |
| | | vo.setIoType(wrkMast.getIoType$()); // 入出库类型 |
| | |
| | | } |
| | | |
| | | if (crnProtocol.getTaskNo() > 0) { |
| | | WrkMast wrkMast = wrkMastService.selectById(crnProtocol.getTaskNo()); |
| | | WrkMast wrkMast = wrkMastService.getById(crnProtocol.getTaskNo()); |
| | | if (wrkMast != null) { |
| | | vo.setSourceStaNo(wrkMast.getSourceStaNo$()); |
| | | vo.setStaNo(wrkMast.getStaNo$()); |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | |
| | | @ManagerAuth(memo = "堆垛机信息表") |
| | | public R crnStateTable(){ |
| | | List<CrnStateTableVo> list = new ArrayList<>(); |
| | | List<BasCrnp> crnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().orderBy("crn_no")); |
| | | List<BasCrnp> crnps = basCrnpService.list(new QueryWrapper<BasCrnp>().orderByAsc("crn_no")); |
| | | for (BasCrnp basCrnp : crnps) { |
| | | // 表格行 |
| | | CrnStateTableVo vo = new CrnStateTableVo(); |
| | |
| | | @ManagerAuth(memo = "堆垛机数据表") |
| | | public R crnMsgTable(){ |
| | | List<CrnMsgTableVo> list = new ArrayList<>(); |
| | | List<BasCrnp> crnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().orderBy("crn_no")); |
| | | List<BasCrnp> crnps = basCrnpService.list(new QueryWrapper<BasCrnp>().orderByAsc("crn_no")); |
| | | for (BasCrnp basCrnp : crnps) { |
| | | // 表格行 |
| | | CrnMsgTableVo vo = new CrnMsgTableVo(); |
| | |
| | | |
| | | vo.setWorkNo(crnProtocol.getTaskNo()); // 任务号 |
| | | if (crnProtocol.getTaskNo()>0) { |
| | | WrkMast wrkMast = wrkMastService.selectById(crnProtocol.getTaskNo()); |
| | | WrkMast wrkMast = wrkMastService.getById(crnProtocol.getTaskNo()); |
| | | if (wrkMast != null) { |
| | | vo.setStatus(CrnStatusType.process(wrkMast.getIoType()).getDesc()); // 模式状态 |
| | | vo.setSourceStaNo(wrkMast.getSourceStaNo$()); // 源站 |
| | |
| | | command.setDestinationPosX(param.getRow()); // 目标库位排 |
| | | command.setDestinationPosY(param.getBay()); // 目标库位列 |
| | | command.setDestinationPosZ(param.getLev()); // 目标库位层 |
| | | LocMast sourceLoc = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", command.getSourcePosX()) |
| | | LocMast sourceLoc = locMastService.getOne(new QueryWrapper<LocMast>().eq("row1", command.getSourcePosX()) |
| | | .eq("bay1", command.getSourcePosY()).eq("lev1", command.getSourcePosZ())); |
| | | LocMast loc = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", command.getDestinationPosX()) |
| | | LocMast loc = locMastService.getOne(new QueryWrapper<LocMast>().eq("row1", command.getDestinationPosX()) |
| | | .eq("bay1", command.getDestinationPosY()).eq("lev1", command.getDestinationPosZ())); |
| | | VersionUtils.locMoveCheckLocType(sourceLoc, loc); |
| | | return crnControl(command)?R.ok():R.error(); |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.domain.vo.PlcErrorTableVo; |
| | | import com.zy.asrs.domain.vo.SiteTableVo; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.OutputQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | |
| | | import com.zy.core.model.Task; |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.thread.SiemensDevpThread; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | station.putAll(devpThread.getStation()); |
| | | } |
| | | // 持久数据 |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<BasDevp>().orderBy("dev_no")); |
| | | List<BasDevp> basDevps = basDevpService.list(new QueryWrapper<BasDevp>().orderByAsc("dev_no")); |
| | | for (BasDevp devp : basDevps) { |
| | | SiteTableVo vo = new SiteTableVo(); |
| | | vo.setDevNo(devp.getDevNo()); // 站点编号 |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasDevpService; |
| | |
| | | |
| | | public String getFrmLocno$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.frmLocno); |
| | | LocMast locMast = service.getById(this.frmLocno); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | |
| | | |
| | | public String getFrmSta$(){ |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.frmSta); |
| | | BasDevp basDevp = service.getById(this.frmSta); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | |
| | | |
| | | public String getToSta$(){ |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.toSta); |
| | | BasDevp basDevp = service.getById(this.toSta); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | |
| | | |
| | | public String getToLocno$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.toLocno); |
| | | LocMast locMast = service.getById(this.toLocno); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.LocMastService; |
| | |
| | | |
| | | public String getLocNo$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.locNo); |
| | | LocMast locMast = service.getById(this.locNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasCrnpService; |
| | |
| | | * 入出库类型 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型") |
| | | @TableId(value = "type_no", type = IdType.INPUT) |
| | | @TableField("type_no") |
| | | private Integer typeNo; |
| | | |
| | |
| | | * 作业站点 |
| | | */ |
| | | @ApiModelProperty(value= "作业站点") |
| | | @TableId(value = "stn_no", type = IdType.INPUT) |
| | | @TableField("stn_no") |
| | | private Integer stnNo; |
| | | |
| | |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机号") |
| | | @TableId(value = "crn_no", type = IdType.INPUT) |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | |
| | | |
| | | public String getStnNo$(){ |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.stnNo); |
| | | BasDevp basDevp = service.getById(this.stnNo); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | |
| | | |
| | | public String getCrnNo$(){ |
| | | BasCrnpService service = SpringUtils.getBean(BasCrnpService.class); |
| | | BasCrnp basCrnp = service.selectById(this.crnNo); |
| | | BasCrnp basCrnp = service.getById(this.crnNo); |
| | | if (!Cools.isEmpty(basCrnp)){ |
| | | return String.valueOf(basCrnp.getCrnNo()); |
| | | } |
| | |
| | | |
| | | public String getCrnStn$(){ |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.crnStn); |
| | | BasDevp basDevp = service.getById(this.crnStn); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.mapper.BasWrkIotypeMapper; |
| | |
| | | |
| | | public String getCrnNo$(){ |
| | | BasCrnpService service = SpringUtils.getBean(BasCrnpService.class); |
| | | BasCrnp basCrnp = service.selectById(this.crnNo); |
| | | BasCrnp basCrnp = service.getById(this.crnNo); |
| | | if (!Cools.isEmpty(basCrnp)){ |
| | | return String.valueOf(basCrnp.getCrnNo()); |
| | | } |
| | |
| | | |
| | | public String getLocNo$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.locNo); |
| | | LocMast locMast = service.getById(this.locNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | |
| | | |
| | | public String getStaNo$(){ |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.staNo); |
| | | BasDevp basDevp = service.getById(this.staNo); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | |
| | | |
| | | public String getSourceStaNo$(){ |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.sourceStaNo); |
| | | BasDevp basDevp = service.getById(this.sourceStaNo); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | |
| | | |
| | | public String getSourceLocNo$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.sourceLocNo); |
| | | LocMast locMast = service.getById(this.sourceLocNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasCrnError; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasCrnOpt; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasCrnp; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasErrLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasPlcerror; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasWrkIotype; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasWrkStatus; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.MatCode; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.RowLastno; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.StaDesc; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.WrkDetl; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.WrkLastno; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import org.apache.ibatis.annotations.*; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | WrkMast selectPakInStep11(@Param("sourceStaNo")Integer sourceStaNo); |
| | | |
| | | // 入库第二步,当托盘物料在堆垛机入库站时时查询 |
| | | // @Select("select top 1 * from dbo.asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and wrk_no=#{workNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC") |
| | | // @Select("select top 1 * from asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and wrk_no=#{workNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC") |
| | | WrkMast selectPakInStep2(@Param("crnNo")Integer crnNo, @Param("workNo")Integer workNo, @Param("staNo")Integer staNo); |
| | | |
| | | // 入库第三步,当堆垛机把货放入库位时 |
| | | // @Select("select top 1 from dbo.asr_wrk_mast where wrk_no=#{workNo}") |
| | | // @Select("select top 1 from asr_wrk_mast where wrk_no=#{workNo}") |
| | | WrkMast selectPakInStep3(@Param("workNo")Integer workNo); |
| | | |
| | | // 拣料再入库时,站点有物且需求时查询 |
| | |
| | | WrkMast selectPickStep(@Param("barcode")String barcode); |
| | | |
| | | // 出库第一步,从库位到堆垛机出库站 |
| | | // @Select("select top 1 * from dbo.asr_wrk_mast where crn_no=#{crnNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc") |
| | | // @Select("select top 1 * from asr_wrk_mast where crn_no=#{crnNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc") |
| | | WrkMast selectPakOutStep1(@Param("crnNo")Integer crnNO, @Param("sourceStaNo")Integer sourceStaNo); |
| | | |
| | | // 出库第二步,从堆垛机出库站到目标出库站,堆垛机出库站有物时执行 |
| | | // @Select("select top 1 * from dbo.asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=12 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC") |
| | | // @Select("select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=12 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC") |
| | | WrkMast selectPakOutStep2(@Param("sourceStaNo")Integer sourceStaNo); |
| | | |
| | | // 库位移转工作档,在进行一次入出库作业后紧跟库位移转 |
| | | // @Select("select top 1 * from dbo.asr_wrk_mast where wrk_sts=11 and (io_type=11 or io_type=110) and crn_no=#{crnNo} order by io_time,wrk_no") |
| | | // @Select("select top 1 * from asr_wrk_mast where wrk_sts=11 and (io_type=11 or io_type=110) and crn_no=#{crnNo} order by io_time,wrk_no") |
| | | WrkMast selectLocMove(@Param("crnNo")Integer crnNo); |
| | | |
| | | WrkMast selectLocMoving(@Param("crnNo")Integer crnNo); |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.BasCrnOpt; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface BasCrnOptService extends IService<BasCrnOpt> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.BasCrnp; |
| | | |
| | | public interface BasCrnpService extends IService<BasCrnp> { |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | |
| | | import java.util.List; |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasErrLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface BasErrLogService extends IService<BasErrLog> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | |
| | | import java.util.List; |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.LocMast; |
| | | |
| | | import java.util.List; |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.MatCode; |
| | | |
| | | public interface MatCodeService extends IService<MatCode> { |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.RowLastno; |
| | | |
| | | public interface RowLastnoService extends IService<RowLastno> { |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.StaDesc; |
| | | |
| | | public interface StaDescService extends IService<StaDesc> { |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import com.zy.asrs.entity.WrkDetl; |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.WrkLastno; |
| | | |
| | | public interface WrkLastnoService extends IService<WrkLastno> { |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | |
| | | import java.util.List; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.mapper.BasCrnOptMapper; |
| | | import com.zy.asrs.entity.BasCrnOpt; |
| | | import com.zy.asrs.service.BasCrnOptService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basCrnOptService") |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasCrnp; |
| | |
| | | |
| | | @Override |
| | | public BasCrnp checkSiteStatus(Integer crnId) { |
| | | BasCrnp crnp = this.selectById(crnId); |
| | | BasCrnp crnp = this.baseMapper.selectById(crnId); |
| | | if (Cools.isEmpty(crnp)) { |
| | | throw new CoolException(crnId + "号堆垛机不存在"); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public boolean checkSiteError(Integer crnNo, boolean pakin) { |
| | | BasCrnp crnp = this.selectById(crnNo); |
| | | BasCrnp crnp = this.baseMapper.selectById(crnNo); |
| | | if (Cools.isEmpty(crnp)) { |
| | | News.error("{}号堆垛机不存在", crnNo); |
| | | return false; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.mapper.BasDevpMapper; |
| | |
| | | |
| | | @Override |
| | | public BasDevp checkSiteStatus(Integer devpNo, boolean put) { |
| | | BasDevp station = selectById(devpNo); |
| | | BasDevp station = this.baseMapper.selectById(devpNo); |
| | | if (station == null){ |
| | | throw new CoolException(devpNo+"站点不存在"); |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.mapper.BasErrLogMapper; |
| | | import com.zy.asrs.entity.BasErrLog; |
| | | import com.zy.asrs.service.BasErrLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | @Override |
| | | public BasErrLog findLatestByTaskNo(Integer crnNo, Integer taskNo) { |
| | | List<BasErrLog> basErrLogs = this.baseMapper.selectList(new EntityWrapper<BasErrLog>().eq("crn_no", crnNo).eq("wrk_no", taskNo).orderBy("start_time", false)); |
| | | List<BasErrLog> basErrLogs = this.baseMapper.selectList(new QueryWrapper<BasErrLog>().eq("crn_no", crnNo).eq("wrk_no", taskNo).orderByDesc("start_time")); |
| | | if (basErrLogs == null || basErrLogs.size() == 0) { |
| | | return null; |
| | | } else { |
| | |
| | | |
| | | @Override |
| | | public BasErrLog findLatest(Integer crnNo) { |
| | | List<BasErrLog> basErrLogs = this.baseMapper.selectList(new EntityWrapper<BasErrLog>().eq("crn_no", crnNo).orderBy("start_time", false)); |
| | | List<BasErrLog> basErrLogs = this.baseMapper.selectList(new QueryWrapper<BasErrLog>().eq("crn_no", crnNo).orderByDesc("start_time")); |
| | | if (basErrLogs == null || basErrLogs.size() == 0) { |
| | | return null; |
| | | } else { |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.mapper.LocDetlMapper; |
| | | import com.zy.asrs.service.LocDetlService; |
| | |
| | | |
| | | @Override |
| | | public Page<LocDetl> getStockOut(Page<LocDetl> page) { |
| | | page.setRecords(baseMapper.getStockOutPage(page.getCondition())); |
| | | page.setTotal(baseMapper.getStockOutPageCount(page.getCondition())); |
| | | // page.setRecords(baseMapper.getStockOutPage(page.getCondition())); |
| | | // page.setTotal(baseMapper.getStockOutPageCount(page.getCondition())); |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateAnfme(Double anfme, String locNo, String matnr) { |
| | | if (anfme <= 0) { |
| | | return delete(new EntityWrapper<LocDetl>().eq("loc_no", locNo).eq("matnr", matnr)); |
| | | return remove(new QueryWrapper<LocDetl>().eq("loc_no", locNo).eq("matnr", matnr)); |
| | | } else { |
| | | int res = baseMapper.updateAnfme(anfme, locNo, matnr); |
| | | return res > 0; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.mapper.LocMastMapper; |
| | |
| | | if (Cools.isEmpty(sourceLocNo)) { |
| | | return null; |
| | | } |
| | | LocMast sourceStock = this.selectById(sourceLocNo); |
| | | LocMast sourceStock = this.baseMapper.selectById(sourceLocNo); |
| | | if (Cools.isEmpty(sourceStock)) { |
| | | return null; |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.exception.CoolException; |
| | |
| | | // log.error("{}号任务数据异常!", wrkMast.getWrkNo()); |
| | | // } |
| | | // 获取目标站 |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | Wrapper<StaDesc> wrapper = new QueryWrapper<StaDesc>() |
| | | .eq("type_no", wrkMast.getIoType() - 50) |
| | | .eq("stn_no", pickSta.getStaNo()) // 作业站点 = 拣料出库的目标站 |
| | | .eq("crn_no", wrkMast.getCrnNo()); // 堆垛机号 |
| | | StaDesc staDesc = staDescService.selectOne(wrapper); |
| | | StaDesc staDesc = staDescService.getOne(wrapper); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | News.error(""+mark+" - 2"+" - 入库路径不存在!type_no={},stn_no={},crn_no={}", wrkMast.getIoType(), pickSta.getStaNo(), wrkMast.getCrnNo()); |
| | | staProtocol.setWorkNo((short) 9989); |
| | |
| | | // 更新明细档io_time (历史档关联使用) |
| | | wrkDetlService.updateIoTime(wrkMast.getWrkNo(), now); |
| | | // 修改库位状态 Q.拣料/盘点/并板再入库 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | LocMast locMast = locMastService.getById(wrkMast.getLocNo()); |
| | | locMast.setLocSts("Q"); |
| | | locMast.setModiTime(new Date()); |
| | | if (!locMastService.updateById(locMast)) { |
| | |
| | | if (crnProtocol == null) { |
| | | continue; |
| | | } |
| | | BasCrnp basCrnp = basCrnpService.selectById(crn.getId()); |
| | | BasCrnp basCrnp = basCrnpService.getById(crn.getId()); |
| | | if (basCrnp == null) { |
| | | News.error(""+mark+" - 1"+" - {}号堆垛机尚未在数据库进行维护!", crn.getId()); |
| | | continue; |
| | |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | // 查询站点详细信息 |
| | | BasDevp staDetl = basDevpService.selectById(crnStn.getStaNo()); |
| | | BasDevp staDetl = basDevpService.getById(crnStn.getStaNo()); |
| | | if (staDetl == null) { |
| | | News.error(""+mark+" - 1"+" - 2"+" - 入库 ===>> 堆垛机站点在数据库不存在, 站点编号={}", crnStn.getStaNo()); |
| | | continue; |
| | |
| | | continue; |
| | | } |
| | | // 获取库位信息 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | LocMast locMast = locMastService.getById(wrkMast.getLocNo()); |
| | | if (locMast == null) { |
| | | News.error(""+mark+" - 1"+" - 5"+" - 查询库存无数据--库位号{}", wrkMast.getLocNo()); |
| | | continue; |
| | |
| | | if (Utils.isDeepLoc(slaveProperties, wrkMast.getLocNo())) { |
| | | News.warnNoLog(""+mark+" - 1"+" - 8"+" - 双深库位且浅库位有货,则需先对浅库位进行库位移转 : 开始执行 任务号={}",wrkMast.getWrkNo()); |
| | | String shallowLocNo = Utils.getShallowLoc(slaveProperties, wrkMast.getLocNo()); |
| | | LocMast shallowLoc = locMastService.selectById(shallowLocNo); |
| | | LocMast shallowLoc = locMastService.getById(shallowLocNo); |
| | | // O.空库位、Q.拣料/盘点/并板再入库、S.入库预约、X.禁用 直接搬! |
| | | if (shallowLoc.getLocSts().equals("P") || shallowLoc.getLocSts().equals("R")) { |
| | | News.warnNoLog(""+mark+" - 1"+" - 9"+" - // O.空库位、Q.拣料/盘点/并板再入库、S.入库预约、X.禁用 直接搬!库位状态={}",shallowLoc.getLocSts()); |
| | |
| | | continue; |
| | | } |
| | | // 获取源库位信息 |
| | | LocMast sourceSta = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | LocMast sourceSta = locMastService.getById(wrkMast.getSourceLocNo()); |
| | | if (!sourceSta.getLocSts().equals("R") && !sourceSta.getLocSts().equals("P")) { |
| | | News.error(""+mark+" - 2"+" - 2"+" - 出库操作库位状态不符合--状态, 库位号={},库位状态={}", wrkMast.getLocNo(), sourceSta.getLocSts()); |
| | | continue; |
| | |
| | | // } |
| | | |
| | | // 查询站点详细信息 |
| | | BasDevp staDetl = basDevpService.selectById(crnStn.getStaNo()); |
| | | BasDevp staDetl = basDevpService.getById(crnStn.getStaNo()); |
| | | if (staDetl == null) { |
| | | News.error(""+mark+" - 2"+" - 5"+" - 出库 ===>> 堆垛机站点在数据库不存在, 站点编号={}", crnStn.getStaNo()); |
| | | break; |
| | |
| | | if (Utils.isDeepLoc(slaveProperties, wrkMast.getSourceLocNo())) { |
| | | News.warnNoLog(""+mark+" - 2"+" - 6"+" - 双深库位且浅库位有货,则需先对浅库位进行库位移转 : 开始执行 任务号={}",wrkMast.getWrkNo()); |
| | | String shallowLocNo = Utils.getShallowLoc(slaveProperties, wrkMast.getSourceLocNo()); |
| | | LocMast shallowLoc = locMastService.selectById(shallowLocNo); |
| | | LocMast shallowLoc = locMastService.getById(shallowLocNo); |
| | | // O.空库位、Q.拣料/盘点/并板再入库、S.入库预约、X.禁用 直接搬! |
| | | if (shallowLoc.getLocSts().equals("P") || shallowLoc.getLocSts().equals("R")) { |
| | | News.warnNoLog(""+mark+" - 2"+" - 7"+" - // O.空库位、Q.拣料/盘点/并板再入库、S.入库预约、X.禁用 直接搬!库位状态={}",shallowLoc.getLocSts()); |
| | |
| | | } |
| | | News.warnNoLog(""+mark+" - 3"+" - 0"+" - 堆垛机入出库作业下发:执行库位移转"); |
| | | // 获取源库位信息 |
| | | LocMast sourceSta = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | LocMast sourceSta = locMastService.getById(wrkMast.getSourceLocNo()); |
| | | if (null == sourceSta) { |
| | | News.error(""+mark+" - 3"+" - 1"+" - 工作档库位移转失败,原因:检索源库位失败!工作号={},源库位={}", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); |
| | | return; |
| | |
| | | return; |
| | | } |
| | | // 获取目标库位信息 |
| | | LocMast sta = locMastService.selectById(wrkMast.getLocNo()); |
| | | LocMast sta = locMastService.getById(wrkMast.getLocNo()); |
| | | if (null == sta) { |
| | | News.error(""+mark+" - 3"+" - 2"+" - 工作档库位移转失败,原因:检索目标库位失败!工作号={},源库位={}", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | return; |
| | | } |
| | | // 获取堆垛机信息 并 判断是否可入出 |
| | | BasCrnp basCrnp = basCrnpService.selectById(slave.getId()); |
| | | BasCrnp basCrnp = basCrnpService.getById(slave.getId()); |
| | | if (!basCrnp.getInEnable().equals("Y") && !basCrnp.getOutEnable().equals("Y")) { |
| | | return; |
| | | } |
| | |
| | | null, // 修改人员 |
| | | "任务中异常" // 备注 |
| | | ); |
| | | if (!basErrLogService.insert(basErrLog)) { |
| | | if (!basErrLogService.save(basErrLog)) { |
| | | News.error(""+mark+" - 2"+" - 堆垛机plc异常记录失败 ===>> [id:{}] [error:{}]", crn.getId(), errName); |
| | | } |
| | | } |
| | |
| | | null, // 修改人员 |
| | | "无任务异常" // 备注 |
| | | ); |
| | | if (!basErrLogService.insert(basErrLog)) { |
| | | if (!basErrLogService.save(basErrLog)) { |
| | | News.error(""+mark+" - 5"+" - 堆垛机plc异常记录失败 ===>> [id:{}] [error:{}]", crn.getId(), errName); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Transactional |
| | | public synchronized void moveLocForDeepLocPakin(CrnSlave crn, LocMast shallowLoc, WrkMast pakinWrkMast) { |
| | | LocMast loc = locMastService.selectById(pakinWrkMast.getLocNo()); |
| | | LocMast loc = locMastService.getById(pakinWrkMast.getLocNo()); |
| | | |
| | | // 获取工作号 |
| | | int workNo = commonService.getWorkNo(0); |
| | |
| | | } |
| | | // 工作档明细保存 |
| | | if (shallowLoc.getLocSts().equals("F")) { |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", shallowLoc.getLocNo())); |
| | | List<LocDetl> locDetls = locDetlService.list(new QueryWrapper<LocDetl>().eq("loc_no", shallowLoc.getLocNo())); |
| | | for (LocDetl locDetl : locDetls) { |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetl.setWrkNo(workNo); |
| | |
| | | VersionUtils.setWrkDetl(wrkDetl, locDetl); // 版本控制 |
| | | wrkDetl.setAppeTime(now); |
| | | wrkDetl.setModiTime(now); |
| | | if (!wrkDetlService.insert(wrkDetl)) { |
| | | if (!wrkDetlService.save(wrkDetl)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | } |
| | |
| | | if (loc != null) { |
| | | if (Utils.isDeepLoc(slaveProperties, loc.getLocNo())) { |
| | | String shallowLocNo = Utils.getShallowLoc(slaveProperties, loc.getLocNo()); |
| | | LocMast shallowLoc1 = locMastService.selectById(shallowLocNo); |
| | | LocMast shallowLoc1 = locMastService.getById(shallowLocNo); |
| | | if (!shallowLoc1.getLocSts().equals("O")) { |
| | | loc = null; |
| | | } |
| | |
| | | |
| | | if (null != loc) {//对应深库位非在库状态,不能移库 |
| | | String deepLoc = Utils.getDeepLoc(slaveProperties, loc.getLocNo()); |
| | | LocMast deepLoc1 = locMastService.selectById(deepLoc); |
| | | LocMast deepLoc1 = locMastService.getById(deepLoc); |
| | | if (!deepLoc1.getLocSts().equals("F") && !deepLoc1.getLocSts().equals("D")) { |
| | | loc = null; |
| | | } |
| | |
| | | } |
| | | // 工作档明细保存 |
| | | if (shallowLoc.getLocSts().equals("F")) { |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", shallowLoc.getLocNo())); |
| | | List<LocDetl> locDetls = locDetlService.list(new QueryWrapper<LocDetl>().eq("loc_no", shallowLoc.getLocNo())); |
| | | for (LocDetl locDetl : locDetls) { |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetl.setWrkNo(workNo); |
| | |
| | | VersionUtils.setWrkDetl(wrkDetl, locDetl); // 版本控制 |
| | | wrkDetl.setAppeTime(new Date()); |
| | | wrkDetl.setModiTime(new Date()); |
| | | if (!wrkDetlService.insert(wrkDetl)) { |
| | | if (!wrkDetlService.save(wrkDetl)) { |
| | | News.errorNoLog(""+mark+"moveLocForDeepLoc"+" - 3"+" - 保存工作档明细失败"); |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | |
| | | News.warnNoLog(""+mark+" - 0"+" - 开始执行outOfDevp"); |
| | | } |
| | | for (WrkMast wrkMast : wrkMasts) { |
| | | if (basDevpService.selectCount(new EntityWrapper<BasDevp>().eq("wrk_no", wrkMast.getWrkNo())) == 0) { |
| | | if (basDevpService.count(new QueryWrapper<BasDevp>().eq("wrk_no", wrkMast.getWrkNo())) == 0) { |
| | | wrkMast.setCtnNo("Y"); |
| | | if (wrkMastMapper.updateById(wrkMast) == 0) { |
| | | News.error(""+mark+" - 1"+" - 修改{}工作档失败,ctn_no", wrkMast.getWrkNo()); |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.MatCode; |
| | | import com.zy.asrs.mapper.MatCodeMapper; |
| | | import com.zy.asrs.service.MatCodeService; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.RowLastno; |
| | | import com.zy.asrs.mapper.RowLastnoMapper; |
| | | import com.zy.asrs.service.RowLastnoService; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.StaDesc; |
| | | import com.zy.asrs.mapper.StaDescMapper; |
| | | import com.zy.asrs.service.StaDescService; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.MatCode; |
| | |
| | | return; |
| | | } |
| | | for (WaitPakin waitPakin : waitPakins) { |
| | | MatCode matCode = matCodeService.selectById(waitPakin.getMatnr()); |
| | | MatCode matCode = matCodeService.getById(waitPakin.getMatnr()); |
| | | if (Cools.isEmpty(matCode)){ |
| | | throw new CoolException("物料条码数据为空"); |
| | | } |
| | |
| | | wrkDetl.setZpallet(barcode); // 托盘条码 |
| | | wrkDetl.setAppeTime(new Date()); |
| | | wrkDetl.setModiTime(new Date()); |
| | | if (!this.insert(wrkDetl)) { |
| | | if (!this.save(wrkDetl)) { |
| | | throw new CoolException("保存工作明细失败"); |
| | | } |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.WrkLastno; |
| | | import com.zy.asrs.mapper.WrkLastnoMapper; |
| | | import com.zy.asrs.service.WrkLastnoService; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.mapper.WrkMastMapper; |
| | | import com.zy.asrs.service.WrkMastService; |
| | |
| | | |
| | | @Override |
| | | public int getWorkingMast(Integer devpNo) { |
| | | return selectCount(new EntityWrapper<WrkMast>().eq("source_sta_no", devpNo).in("wrk_sts", 1, 6)); |
| | | return this.baseMapper.selectCount(new QueryWrapper<WrkMast>().eq("source_sta_no", devpNo).in("wrk_sts", 1, 6)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public int getOutToStn182(Integer devpNo) { |
| | | return selectCount(new EntityWrapper<WrkMast>().eq("sta_no", devpNo).in("wrk_sts",11,12)); |
| | | return this.baseMapper.selectCount(new QueryWrapper<WrkMast>().eq("sta_no", devpNo).in("wrk_sts",11,12)); |
| | | } |
| | | } |
| | |
| | | package com.zy.common.config; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | private boolean check(HttpServletRequest request, HttpServletResponse response, String memo) { |
| | | try { |
| | | String token = request.getHeader("token"); |
| | | UserLogin userLogin = userLoginService.selectOne(new EntityWrapper<UserLogin>().eq("token", token)); |
| | | UserLogin userLogin = userLoginService.getOne(new QueryWrapper<UserLogin>().eq("token", token)); |
| | | if (null == userLogin){ |
| | | Http.response(response, BaseRes.DENIED); |
| | | return false; |
| | | } |
| | | User user = userService.selectById(userLogin.getUserId()); |
| | | User user = userService.getById(userLogin.getUserId()); |
| | | String deToken = Cools.deTokn(token, user.getPassword()); |
| | | long timestamp = Long.parseLong(deToken.substring(0, 13)); |
| | | // 1天后过期 |
| | |
| | | Permission permission = new Permission(); |
| | | permission.setAction(action); |
| | | permission.setStatus((short) 1); |
| | | Permission one = permissionService.selectOne(new EntityWrapper<>(permission)); |
| | | Permission one = permissionService.getOne(new QueryWrapper<>(permission)); |
| | | if (!Cools.isEmpty(one)) { |
| | | RolePermission rolePermission = rolePermissionService.selectOne(new EntityWrapper<>(new RolePermission(user.getRoleId(), permission.getId()))); |
| | | RolePermission rolePermission = rolePermissionService.getById(new QueryWrapper<>(new RolePermission(user.getRoleId(), permission.getId()))); |
| | | return !Cools.isEmpty(rolePermission); |
| | | } |
| | | return true; |
| | |
| | | package com.zy.common.entity; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.Config; |
| | |
| | | */ |
| | | public static Parameter reset() { |
| | | ConfigService configService = SpringUtils.getBean(ConfigService.class); |
| | | List<Config> configs = configService.selectList(new EntityWrapper<Config>().eq("status", "1")); |
| | | List<Config> configs = configService.list(new QueryWrapper<Config>().eq("status", "1")); |
| | | Map<String, Object> data = new HashMap<>(); |
| | | for (Config config : configs) { |
| | | if (config.getType() == 1) { |
| | |
| | | package com.zy.common.service; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Arith; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | |
| | | * @return workNo(工作号) |
| | | */ |
| | | public int getWorkNo(Integer wrkMk) { |
| | | WrkLastno wrkLastno = wrkLastnoService.selectById(wrkMk); |
| | | WrkLastno wrkLastno = wrkLastnoService.getById(wrkMk); |
| | | if (Cools.isEmpty(wrkLastno)) { |
| | | throw new CoolException("数据异常,请联系管理员"); |
| | | } |
| | |
| | | int eNo = wrkLastno.getENo(); |
| | | workNo = workNo>=eNo ? sNo : workNo+1; |
| | | while (true) { |
| | | WrkMast wrkMast = wrkMastService.selectById(workNo); |
| | | WrkMast wrkMast = wrkMastService.getById(workNo); |
| | | if (null != wrkMast) { |
| | | workNo = workNo>=eNo ? sNo : workNo+1; |
| | | } else { |
| | |
| | | if (workNo == 0) { |
| | | throw new CoolException("生成工作号失败,请联系管理员"); |
| | | } else { |
| | | if (wrkMastService.selectById(workNo)!=null) { |
| | | if (wrkMastService.getById(workNo)!=null) { |
| | | throw new CoolException("生成工作号" + workNo + "在工作档中已存在"); |
| | | } |
| | | } |
| | |
| | | default: |
| | | throw new CoolException("库位排号分配错误, 源站号:" + sourceStaNo); |
| | | } |
| | | RowLastno rowLastno = rowLastnoService.selectById(whsType); |
| | | RowLastno rowLastno = rowLastnoService.getById(whsType); |
| | | if (Cools.isEmpty(rowLastno)) { |
| | | throw new CoolException("数据异常,请联系管理员"); |
| | | } |
| | |
| | | } |
| | | String shallowLocNo = Utils.getShallowLoc(slaveProperties, locNo); |
| | | // 检测目标库位是否为空库位 |
| | | LocMast shallowLoc = locMastService.selectById(shallowLocNo); |
| | | LocMast shallowLoc = locMastService.getById(shallowLocNo); |
| | | if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) { |
| | | if (basCrnpService.checkSiteError(shallowLoc.getCrnNo(), true)) { |
| | | if (VersionUtils.locMoveCheckLocType(shallowLoc, locTypeDto)) { |
| | |
| | | |
| | | // 靠近摆放规则 --- 空托 |
| | | if (staDescId == 10) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow)); |
| | | List<LocMast> locMasts = locMastService.list(new QueryWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow)); |
| | | if (locMasts.size() > 0) { |
| | | for (LocMast loc : locMasts) { |
| | | if (Utils.isShallowLoc(slaveProperties, loc.getLocNo())) { |
| | |
| | | } |
| | | String shallowLocNo = Utils.getShallowLoc(slaveProperties, loc.getLocNo()); |
| | | // 检测目标库位是否为空库位 |
| | | LocMast shallowLoc = locMastService.selectById(shallowLocNo); |
| | | LocMast shallowLoc = locMastService.getById(shallowLocNo); |
| | | if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) { |
| | | if (basCrnpService.checkSiteError(shallowLoc.getCrnNo(), true)) { |
| | | locMast = shallowLoc; |
| | |
| | | throw new CoolException("没有可用的堆垛机"); |
| | | } |
| | | // 获取目标站 |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | Wrapper<StaDesc> wrapper = new QueryWrapper<StaDesc>() |
| | | .eq("type_no", staDescId) |
| | | .eq("stn_no", sourceStaNo) |
| | | .eq("crn_no", crnNo); |
| | | StaDesc staDesc = staDescService.selectOne(wrapper); |
| | | StaDesc staDesc = staDescService.getOne(wrapper); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | News.error("type_no={},stn_no={},crn_no={}", staDescId, sourceStaNo, crnNo); |
| | | throw new CoolException("入库路径不存在"); |
| | | } |
| | | BasDevp staNo = basDevpService.selectById(staDesc.getCrnStn()); |
| | | BasDevp staNo = basDevpService.getById(staDesc.getCrnStn()); |
| | | if (!staNo.getAutoing().equals("Y")) { |
| | | throw new CoolException("目标站"+staDesc.getCrnStn()+"不可用"); |
| | | } |
| | |
| | | } |
| | | // 目标库位 ===>> 浅库位, 则校验其深库位是否为 F D X |
| | | if (null != locMast && Utils.isShallowLoc(slaveProperties, locMast.getLocNo())) { |
| | | LocMast deepLoc = locMastService.selectById(Utils.getDeepLoc(slaveProperties, locMast.getLocNo())); |
| | | LocMast deepLoc = locMastService.getById(Utils.getDeepLoc(slaveProperties, locMast.getLocNo())); |
| | | if (!deepLoc.getLocSts().equals("F") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X")) { |
| | | locMast = null; |
| | | } |
| | | } |
| | | // 目标库位 ===>> 深库位, 则校验其浅库位是否为 O |
| | | if (null != locMast && Utils.isDeepLoc(slaveProperties, locMast.getLocNo())) { |
| | | LocMast shallowLoc = locMastService.selectById(Utils.getShallowLoc(slaveProperties, locMast.getLocNo())); |
| | | LocMast shallowLoc = locMastService.getById(Utils.getShallowLoc(slaveProperties, locMast.getLocNo())); |
| | | if (!shallowLoc.getLocSts().equals("O")) { |
| | | locMast = null; |
| | | } |
| | |
| | | package com.zy.common.web; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | |
| | | res.put("token", Cools.enToken(System.currentTimeMillis() + mobile, superPwd)); |
| | | return R.ok(res); |
| | | } |
| | | EntityWrapper<User> userWrapper = new EntityWrapper<>(); |
| | | QueryWrapper<User> userWrapper = new QueryWrapper<>(); |
| | | userWrapper.eq("mobile", mobile); |
| | | User user = userService.selectOne(userWrapper); |
| | | User user = userService.getOne(userWrapper); |
| | | if (Cools.isEmpty(user)){ |
| | | return R.parse(CodeRes.USER_10001); |
| | | } |
| | |
| | | return R.parse(CodeRes.USER_10003); |
| | | } |
| | | String token = Cools.enToken(System.currentTimeMillis() + mobile, user.getPassword()); |
| | | userLoginService.delete(new EntityWrapper<UserLogin>().eq("user_id", user.getId())); |
| | | userLoginService.remove(new QueryWrapper<UserLogin>().eq("user_id", user.getId())); |
| | | UserLogin userLogin = new UserLogin(); |
| | | userLogin.setUserId(user.getId()); |
| | | userLogin.setToken(token); |
| | | userLoginService.insert(userLogin); |
| | | userLoginService.save(userLogin); |
| | | Map<String, Object> res = new HashMap<>(); |
| | | res.put("username", user.getUsername()); |
| | | res.put("token", token); |
| | |
| | | @RequestMapping("/user/detail/auth") |
| | | @ManagerAuth |
| | | public R userDetail(){ |
| | | return R.ok(userService.selectById(getUserId())); |
| | | return R.ok(userService.getById(getUserId())); |
| | | } |
| | | |
| | | @RequestMapping("/menu/auth") |
| | | @ManagerAuth(memo = "首页菜单") |
| | | public R menu(){ |
| | | // 获取所有一级菜单 |
| | | List<Resource> oneLevel = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 1).eq("status", 1).orderBy("sort")); |
| | | List<Resource> oneLevel = resourceService.list(new QueryWrapper<Resource>().eq("level", 1).eq("status", 1).orderByAsc("sort")); |
| | | User user = null; |
| | | Wrapper<Resource> resourceWrapper; |
| | | if (getUserId() == 9527) { |
| | | resourceWrapper = new EntityWrapper<Resource>().eq("level", 2).eq("status", 1).orderBy("sort"); |
| | | resourceWrapper = new QueryWrapper<Resource>().eq("level", 2).eq("status", 1).orderByAsc("sort"); |
| | | } else { |
| | | // 获取当前用户的所有二级菜单 |
| | | user = userService.selectById(getUserId()); |
| | | List<RoleResource> roleResources = roleResourceService.selectList(new EntityWrapper<RoleResource>().eq("role_id", user.getRoleId())); |
| | | user = userService.getById(getUserId()); |
| | | List<RoleResource> roleResources = roleResourceService.list(new QueryWrapper<RoleResource>().eq("role_id", user.getRoleId())); |
| | | List<Long> resourceIds = new ArrayList<>(); |
| | | roleResources.forEach(roleResource -> resourceIds.add(roleResource.getResourceId())); |
| | | if (resourceIds.isEmpty()){ |
| | | return R.ok(); |
| | | } |
| | | resourceWrapper = new EntityWrapper<Resource>().in("id", resourceIds).eq("level", 2).eq("status", 1).orderBy("sort"); |
| | | resourceWrapper = new QueryWrapper<Resource>().in("id", resourceIds).eq("level", 2).eq("status", 1).orderByAsc("sort"); |
| | | } |
| | | List<Resource> twoLevel = resourceService.selectList(resourceWrapper); |
| | | List<Resource> twoLevel = resourceService.list(resourceWrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Resource menu : oneLevel) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | |
| | | // 是否拥有查看权限 |
| | | if (getUserId() != 9527) { |
| | | Resource view = resourceService.selectOne(new EntityWrapper<Resource>().eq("resource_id", resource.getId()).like("code", "view")); |
| | | Resource view = resourceService.getOne(new QueryWrapper<Resource>().eq("resource_id", resource.getId()).like("code", "view")); |
| | | if (!Cools.isEmpty(view)){ |
| | | RoleResource param = new RoleResource(); |
| | | param.setResourceId(view.getId()); |
| | | param.setRoleId(user.getRoleId()); |
| | | if (null == roleResourceService.selectOne(new EntityWrapper<>(param))){ |
| | | if (null == roleResourceService.getOne(new QueryWrapper<>(param))){ |
| | | continue; |
| | | } |
| | | } |
| | |
| | | @RequestMapping("/power/list/auth") |
| | | @ManagerAuth |
| | | public R powerList(){ |
| | | List<Resource> oneLevels = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 1).eq("status", 1).orderBy("sort")); |
| | | List<Resource> oneLevels = resourceService.list(new QueryWrapper<Resource>().eq("level", 1).eq("status", 1).orderByAsc("sort")); |
| | | List<Map> result = new ArrayList<>(); |
| | | // 一级 |
| | | for (Resource oneLevel : oneLevels){ |
| | |
| | | oneLevelMap.put("id", oneLevel.getId()); |
| | | oneLevelMap.put("spread", true); |
| | | oneLevelMap.put("children", twoLevelsList); |
| | | List<Resource> twoLevels = resourceService.selectList(new EntityWrapper<Resource>().eq("resource_id", oneLevel.getId()).eq("level", 2).eq("status", 1).orderBy("sort")); |
| | | List<Resource> twoLevels = resourceService.list(new QueryWrapper<Resource>().eq("resource_id", oneLevel.getId()).eq("level", 2).eq("status", 1).orderByAsc("sort")); |
| | | // 二级 |
| | | for (Resource twoLevel : twoLevels){ |
| | | Map<String, Object> twoLevelMap = new HashMap<>(); |
| | |
| | | List<Map> threeLevelsList = new ArrayList<>(); |
| | | twoLevelMap.put("children", threeLevelsList); |
| | | // 三级 |
| | | List<Resource> threeLevels = resourceService.selectList(new EntityWrapper<Resource>().eq("resource_id", twoLevel.getId()).eq("level", 3).eq("status", 1).orderBy("sort")); |
| | | List<Resource> threeLevels = resourceService.list(new QueryWrapper<Resource>().eq("resource_id", twoLevel.getId()).eq("level", 3).eq("status", 1).orderByAsc("sort")); |
| | | for (Resource threeLevel : threeLevels){ |
| | | Map<String, Object> threeLevelMap = new HashMap<>(); |
| | | threeLevelMap.put("title", threeLevel.getName()); |
| | |
| | | functions.put("spread", true); |
| | | List<Map> funcs = new ArrayList<>(); |
| | | functions.put("children", funcs); |
| | | List<Permission> permissions = permissionService.selectList(new EntityWrapper<Permission>().eq("status", 1)); |
| | | List<Permission> permissions = permissionService.list(new QueryWrapper<Permission>().eq("status", 1)); |
| | | for (Permission permission : permissions) { |
| | | Map<String, Object> func = new HashMap<>(); |
| | | func.put("title", permission.getName()); |
| | |
| | | public R get(@PathVariable("roleId") Long roleId) { |
| | | List<Object> result = new ArrayList<>(); |
| | | // 菜单 |
| | | List<RoleResource> roleResources = roleResourceService.selectList(new EntityWrapper<RoleResource>().eq("role_id", roleId)); |
| | | List<RoleResource> roleResources = roleResourceService.list(new QueryWrapper<RoleResource>().eq("role_id", roleId)); |
| | | for (RoleResource roleResource : roleResources){ |
| | | Resource resource = resourceService.selectById(roleResource.getResourceId()); |
| | | Resource resource = resourceService.getById(roleResource.getResourceId()); |
| | | if (!Cools.isEmpty(resource)){ |
| | | if (resource.getLevel() == 3){ |
| | | result.add(resource.getId()); |
| | |
| | | } |
| | | } |
| | | // 功能 |
| | | List<RolePermission> rolePermissions = rolePermissionService.selectList(new EntityWrapper<RolePermission>().eq("role_id", roleId)); |
| | | List<RolePermission> rolePermissions = rolePermissionService.list(new QueryWrapper<RolePermission>().eq("role_id", roleId)); |
| | | for (RolePermission rolePermission : rolePermissions){ |
| | | Permission permission = permissionService.selectById(rolePermission.getPermissionId()); |
| | | Permission permission = permissionService.getById(rolePermission.getPermissionId()); |
| | | if (!Cools.isEmpty(permission)){ |
| | | result.add(permission.getAction()); |
| | | } |
| | |
| | | @ManagerAuth(memo = "授权") |
| | | @Transactional |
| | | public R power(Long roleId, String powers){ |
| | | Role role = roleService.selectById(roleId); |
| | | Role role = roleService.getById(roleId); |
| | | Long leaderId = role.getLeader(); |
| | | roleResourceService.delete(new EntityWrapper<RoleResource>().eq("role_id", roleId)); |
| | | rolePermissionService.delete(new EntityWrapper<RolePermission>().eq("role_id", roleId)); |
| | | roleResourceService.remove(new QueryWrapper<RoleResource>().eq("role_id", roleId)); |
| | | rolePermissionService.remove(new QueryWrapper<RolePermission>().eq("role_id", roleId)); |
| | | if (!Cools.isEmpty(powers)){ |
| | | List<PowerDto> dtos = JSON.parseArray(powers, PowerDto.class); |
| | | for (PowerDto dto : dtos) { |
| | | Resource resource = resourceService.selectOne(new EntityWrapper<Resource>().eq("id", dto.getTwo()).eq("level", 2)); |
| | | Resource resource = resourceService.getOne(new QueryWrapper<Resource>().eq("id", dto.getTwo()).eq("level", 2)); |
| | | if (!Cools.isEmpty(resource)) { |
| | | // 校验上级权限 |
| | | if (leaderId != null) { |
| | | RoleResource roleResource = roleResourceService.selectOne(new EntityWrapper<RoleResource>().eq("role_id", leaderId).eq("resource_id", resource.getId())); |
| | | RoleResource roleResource = roleResourceService.getOne(new QueryWrapper<RoleResource>().eq("role_id", leaderId).eq("resource_id", resource.getId())); |
| | | if (null == roleResource) { |
| | | throw new CoolException(resource.getName().concat("无法授权给").concat(role.getName())); |
| | | } |
| | |
| | | RoleResource roleResource = new RoleResource(); |
| | | roleResource.setRoleId(roleId); |
| | | roleResource.setResourceId(resource.getId()); |
| | | roleResourceService.insert(roleResource); |
| | | roleResourceService.save(roleResource); |
| | | } else { |
| | | Permission permission = permissionService.selectOne(new EntityWrapper<Permission>().eq("action", dto.getTwo())); |
| | | Permission permission = permissionService.getOne(new QueryWrapper<Permission>().eq("action", dto.getTwo())); |
| | | if (!Cools.isEmpty(permission)){ |
| | | RolePermission rolePermission = new RolePermission(); |
| | | rolePermission.setRoleId(roleId); |
| | | rolePermission.setPermissionId(permission.getId()); |
| | | rolePermissionService.insert(rolePermission); |
| | | rolePermissionService.save(rolePermission); |
| | | } |
| | | } |
| | | for (String three : dto.getThree()){ |
| | | Resource resource1 = resourceService.selectOne(new EntityWrapper<Resource>().eq("id", three).eq("level", 3)); |
| | | Resource resource1 = resourceService.getOne(new QueryWrapper<Resource>().eq("id", three).eq("level", 3)); |
| | | if (!Cools.isEmpty(resource1)) { |
| | | // 校验上级权限 |
| | | if (leaderId != null) { |
| | | RoleResource roleResource = roleResourceService.selectOne(new EntityWrapper<RoleResource>().eq("role_id", leaderId).eq("resource_id", resource1.getId())); |
| | | RoleResource roleResource = roleResourceService.getOne(new QueryWrapper<RoleResource>().eq("role_id", leaderId).eq("resource_id", resource1.getId())); |
| | | if (null == roleResource) { |
| | | throw new CoolException(resource.getName().concat("的").concat(resource1.getName().concat("无法授权给").concat(role.getName()))); |
| | | } |
| | |
| | | RoleResource roleResource = new RoleResource(); |
| | | roleResource.setRoleId(roleId); |
| | | roleResource.setResourceId(resource1.getId()); |
| | | roleResourceService.insert(roleResource); |
| | | roleResourceService.save(roleResource); |
| | | } |
| | | } |
| | | } |
| | |
| | | public R buttonResource(@PathVariable("resourceId") Long resourceId) { |
| | | List<Resource> resources; |
| | | if (getUserId() == 9527) { |
| | | resources = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 3).eq("resource_id", resourceId)); |
| | | resources = resourceService.list(new QueryWrapper<Resource>().eq("level", 3).eq("resource_id", resourceId)); |
| | | } else { |
| | | resources = roleResourceService.getMenuButtomResource(resourceId, getUserId()); |
| | | } |
| | |
| | | } |
| | | |
| | | protected User getUser(){ |
| | | User user = userService.selectById(getUserId()); |
| | | User user = userService.getById(getUserId()); |
| | | if (null == user) { |
| | | throw new CoolException(BaseRes.DENIED); |
| | | } |
| | |
| | | null, // 修改时间 |
| | | null // 修改人员 |
| | | ); |
| | | bean.insert(basCrnOpt); |
| | | bean.save(basCrnOpt); |
| | | } catch (Exception ignore) {} |
| | | |
| | | if (result != null && result.IsSuccess) { |
| | |
| | | null, // 修改时间 |
| | | null // 修改人员 |
| | | ); |
| | | bean.insert(basCrnOpt); |
| | | bean.save(basCrnOpt); |
| | | } catch (Exception ignore) {} |
| | | |
| | | if (result != null && result.IsSuccess) { |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/api/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(apiService.selectById(String.valueOf(id))); |
| | | return R.ok(apiService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/api/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<Api> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Api> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(apiService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderByDesc("id"); |
| | | return R.ok(apiService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == api.getId()){ |
| | | apiService.insert(api); |
| | | apiService.save(api); |
| | | } else { |
| | | apiService.updateById(api); |
| | | } |
| | |
| | | @RequestMapping(value = "/api/add/auth") |
| | | @ManagerAuth |
| | | public R add(Api api) { |
| | | apiService.insert(api); |
| | | apiService.save(api); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | apiService.deleteBatchIds(Arrays.asList(ids)); |
| | | apiService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Api> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Api> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("api")); |
| | | convert(map, wrapper); |
| | | List<Api> list = apiService.selectList(wrapper); |
| | | List<Api> list = apiService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/apiQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Api> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Api> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<Api> page = apiService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<Api> page = apiService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Api api : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/config/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(configService.selectById(String.valueOf(id))); |
| | | return R.ok(configService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/config/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<Config> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Config> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(configService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderByDesc("id"); |
| | | return R.ok(configService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | } |
| | | } |
| | | if (null == config.getId()){ |
| | | configService.insert(config); |
| | | configService.save(config); |
| | | } else { |
| | | configService.updateById(config); |
| | | Parameter.reset(); |
| | |
| | | return R.error("json解析失败"); |
| | | } |
| | | } |
| | | configService.insert(config); |
| | | configService.save(config); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | configService.deleteBatchIds(Arrays.asList(ids)); |
| | | configService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Config> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Config> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("config")); |
| | | convert(map, wrapper); |
| | | List<Config> list = configService.selectList(wrapper); |
| | | List<Config> list = configService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/configQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Config> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Config> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<Config> page = configService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<Config> page = configService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Config config : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Arith; |
| | | import com.core.common.R; |
| | |
| | | @RequestMapping("/top") |
| | | @ManagerAuth |
| | | public R top(){ |
| | | int logTotal = operateLogService.selectCount(new EntityWrapper<>()); |
| | | int logTotal = operateLogService.count(new QueryWrapper<>()); |
| | | int logWeek = operateLogService.selectCountByCurrentWeek(); |
| | | int userTotal = userService.selectCount(new EntityWrapper<>()); |
| | | int userTotal = userService.count(new QueryWrapper<>()); |
| | | int loginWeek = userLoginService.selectCountByCurrentWeek(); |
| | | |
| | | Map<String, Object> result = new HashMap<>(); |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/host/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(hostService.selectById(String.valueOf(id))); |
| | | return R.ok(hostService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/host/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<Host> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Host> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(hostService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderByDesc("id"); |
| | | return R.ok(hostService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == host.getId()){ |
| | | hostService.insert(host); |
| | | hostService.save(host); |
| | | } else { |
| | | hostService.updateById(host); |
| | | } |
| | |
| | | @RequestMapping(value = "/host/add/auth") |
| | | @ManagerAuth |
| | | public R add(Host host) { |
| | | hostService.insert(host); |
| | | hostService.save(host); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | hostService.deleteBatchIds(Arrays.asList(ids)); |
| | | hostService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Host> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Host> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("host")); |
| | | convert(map, wrapper); |
| | | List<Host> list = hostService.selectList(wrapper); |
| | | List<Host> list = hostService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/hostQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Host> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Host> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("name", condition); |
| | | Page<Host> page = hostService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<Host> page = hostService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Host host : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/operateLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(operateLogService.selectById(String.valueOf(id))); |
| | | return R.ok(operateLogService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/operateLog/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<OperateLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<OperateLog> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(operateLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderByDesc("id"); |
| | | return R.ok(operateLogService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == operateLog.getId()){ |
| | | operateLogService.insert(operateLog); |
| | | operateLogService.save(operateLog); |
| | | } else { |
| | | operateLogService.updateById(operateLog); |
| | | } |
| | |
| | | @RequestMapping(value = "/operateLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(OperateLog operateLog) { |
| | | operateLogService.insert(operateLog); |
| | | operateLogService.save(operateLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | operateLogService.deleteBatchIds(Arrays.asList(ids)); |
| | | operateLogService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<OperateLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<OperateLog> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("operateLog")); |
| | | convert(map, wrapper); |
| | | List<OperateLog> list = operateLogService.selectList(wrapper); |
| | | List<OperateLog> list = operateLogService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/operateLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<OperateLog> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<OperateLog> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<OperateLog> page = operateLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<OperateLog> page = operateLogService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (OperateLog operateLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/permission/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(permissionService.selectById(String.valueOf(id))); |
| | | return R.ok(permissionService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/permission/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<Permission> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Permission> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(permissionService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderByDesc("id"); |
| | | return R.ok(permissionService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == permission.getId()){ |
| | | permissionService.insert(permission); |
| | | permissionService.save(permission); |
| | | } else { |
| | | permissionService.updateById(permission); |
| | | } |
| | |
| | | @RequestMapping(value = "/permission/add/auth") |
| | | @ManagerAuth |
| | | public R add(Permission permission) { |
| | | permissionService.insert(permission); |
| | | permissionService.save(permission); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | permissionService.deleteBatchIds(Arrays.asList(ids)); |
| | | permissionService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Permission> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Permission> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("permission")); |
| | | convert(map, wrapper); |
| | | List<Permission> list = permissionService.selectList(wrapper); |
| | | List<Permission> list = permissionService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/permissionQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Permission> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Permission> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("name", condition); |
| | | Page<Permission> page = permissionService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<Permission> page = permissionService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Permission permission : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/resource/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(resourceService.selectById(String.valueOf(id))); |
| | | return R.ok(resourceService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/resource/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<Resource> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Resource> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(resourceService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderByDesc("id"); |
| | | return R.ok(resourceService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | if (resource.getSort() == null){ |
| | | resource.setSort(999); |
| | | } |
| | | resourceService.insert(resource); |
| | | resourceService.save(resource); |
| | | } else { |
| | | resourceService.updateById(resource); |
| | | } |
| | |
| | | @RequestMapping(value = "/resource/add/auth") |
| | | @ManagerAuth(memo = "菜单添加") |
| | | public R add(Resource resource) { |
| | | resourceService.insert(resource); |
| | | resourceService.save(resource); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | resourceService.deleteBatchIds(Arrays.asList(ids)); |
| | | resourceService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth(memo = "菜单导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Resource> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Resource> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("resource")); |
| | | convert(map, wrapper); |
| | | List<Resource> list = resourceService.selectList(wrapper); |
| | | List<Resource> list = resourceService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/resourceQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Resource> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Resource> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("name", condition); |
| | | Page<Resource> page = resourceService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<Resource> page = resourceService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Resource resource : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/role/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(roleService.selectById(String.valueOf(id))); |
| | | return R.ok(roleService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/role/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<Role> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Role> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | wrapper.orderByDesc("id"); |
| | | |
| | | if (9527 == getUserId()) { |
| | | return R.ok(roleService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | return R.ok(roleService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | Long roleId = getUser().getRoleId(); |
| | | Role role = roleService.selectById(roleId); |
| | | Role role = roleService.getById(roleId); |
| | | Long leaderId = role.getLeader(); |
| | | if (null != leaderId) { |
| | | List<Long> leaderIds = new ArrayList<>(); |
| | | leaderIds.add(roleId); |
| | | while (leaderId != null) { |
| | | Role leader = roleService.selectById(leaderId); |
| | | Role leader = roleService.getById(leaderId); |
| | | leaderIds.add(leader.getId()); |
| | | leaderId = leader.getLeader(); |
| | | } |
| | |
| | | // if (null != role.getLevel()) { |
| | | // wrapper.gt("level", role.getLevel()); |
| | | // } |
| | | return R.ok(roleService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | return R.ok(roleService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == role.getId()){ |
| | | roleService.insert(role); |
| | | roleService.save(role); |
| | | } else { |
| | | roleService.updateById(role); |
| | | } |
| | |
| | | @RequestMapping(value = "/role/add/auth") |
| | | @ManagerAuth(memo = "角色添加") |
| | | public R add(Role role) { |
| | | roleService.insert(role); |
| | | roleService.save(role); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | roleService.deleteBatchIds(Arrays.asList(ids)); |
| | | roleService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth(memo = "角色导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Role> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Role> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("role")); |
| | | convert(map, wrapper); |
| | | List<Role> list = roleService.selectList(wrapper); |
| | | List<Role> list = roleService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/roleQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Role> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<Role> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("name", condition); |
| | | // 上下级管理 |
| | | if (9527 != getUserId()) { |
| | | Long roleId = getUser().getRoleId(); |
| | | Role role = roleService.selectById(roleId); |
| | | Role role = roleService.getById(roleId); |
| | | Long leaderId = role.getLeader(); |
| | | if (null != leaderId) { |
| | | List<Long> leaderIds = new ArrayList<>(); |
| | | while (leaderId != null) { |
| | | Role leader = roleService.selectById(leaderId); |
| | | Role leader = roleService.getById(leaderId); |
| | | leaderIds.add(leader.getId()); |
| | | leaderId = leader.getLeader(); |
| | | } |
| | |
| | | // } |
| | | } |
| | | |
| | | Page<Role> page = roleService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<Role> page = roleService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Role role : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/user/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(userService.selectById(String.valueOf(id))); |
| | | return R.ok(userService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/user/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<User> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<User> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | wrapper.orderByDesc("id"); |
| | | if (9527 == getUserId()) { |
| | | return R.ok(userService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | return R.ok(userService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | Long roleId = getUser().getRoleId(); |
| | | Role role = roleService.selectById(roleId); |
| | | Role role = roleService.getById(roleId); |
| | | Long leaderId = role.getLeader(); |
| | | if (null != leaderId) { |
| | | List<Long> leaderIds = new ArrayList<>(); |
| | | leaderIds.add(role.getId()); |
| | | while (leaderId != null) { |
| | | Role leader = roleService.selectById(leaderId); |
| | | Role leader = roleService.getById(leaderId); |
| | | leaderIds.add(leader.getId()); |
| | | leaderId = leader.getLeader(); |
| | | } |
| | | wrapper.notIn("role_id", leaderIds); |
| | | } |
| | | |
| | | return R.ok(userService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | return R.ok(userService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == user.getId()){ |
| | | userService.insert(user); |
| | | userService.save(user); |
| | | } else { |
| | | userService.updateById(user); |
| | | } |
| | |
| | | @RequestMapping(value = "/user/add/auth") |
| | | @ManagerAuth(memo = "系统用户添加") |
| | | public R add(User user) { |
| | | userService.insert(user); |
| | | userService.save(user); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(user) || null==user.getId()){ |
| | | return R.error(); |
| | | } |
| | | User entity = userService.selectById(user.getId()); |
| | | User entity = userService.getById(user.getId()); |
| | | if (user.getPassword()!=null) { |
| | | entity.setPassword(user.getPassword()); |
| | | } |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | userService.deleteBatchIds(Arrays.asList(ids)); |
| | | userService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth(memo = "系统用户导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<User> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<User> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("user")); |
| | | convert(map, wrapper); |
| | | List<User> list = userService.selectList(wrapper); |
| | | List<User> list = userService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/userQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<User> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<User> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("username", condition); |
| | | Page<User> page = userService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<User> page = userService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (User user : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | @RequestMapping(value = "/userLogin/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(userLoginService.selectById(String.valueOf(id))); |
| | | return R.ok(userLoginService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/userLogin/list/auth") |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<UserLogin> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<UserLogin> wrapper = new QueryWrapper<>(); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(userLoginService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | wrapper.orderByDesc("id"); |
| | | return R.ok(userLoginService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | private void convert(Map<String, Object> map, QueryWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().endsWith(">")) { |
| | | wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == userLogin.getId()){ |
| | | userLoginService.insert(userLogin); |
| | | userLoginService.save(userLogin); |
| | | } else { |
| | | userLoginService.updateById(userLogin); |
| | | } |
| | |
| | | @RequestMapping(value = "/userLogin/add/auth") |
| | | @ManagerAuth |
| | | public R add(UserLogin userLogin) { |
| | | userLoginService.insert(userLogin); |
| | | userLoginService.save(userLogin); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | userLoginService.deleteBatchIds(Arrays.asList(ids)); |
| | | userLoginService.removeByIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<UserLogin> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<UserLogin> wrapper = new QueryWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("userLogin")); |
| | | convert(map, wrapper); |
| | | List<UserLogin> list = userLoginService.selectList(wrapper); |
| | | List<UserLogin> list = userLoginService.list(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/userLoginQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<UserLogin> wrapper = new EntityWrapper<>(); |
| | | QueryWrapper<UserLogin> wrapper = new QueryWrapper<>(); |
| | | wrapper.like("token", condition); |
| | | Page<UserLogin> page = userLoginService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<UserLogin> page = userLoginService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (UserLogin userLogin : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | |
| | | |
| | | public String getUserId$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.userId); |
| | | User user = service.getById(this.userId); |
| | | if (!Cools.isEmpty(user)){ |
| | | return user.getUsername(); |
| | | } |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.ResourceService; |
| | |
| | | |
| | | public String getResourceName(){ |
| | | ResourceService service = SpringUtils.getBean(ResourceService.class); |
| | | Resource resource = service.selectById(this.resourceId); |
| | | Resource resource = service.getById(this.resourceId); |
| | | if (!Cools.isEmpty(resource)){ |
| | | return resource.getName(); |
| | | } |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.ResourceService; |
| | |
| | | |
| | | public String getResourceName(){ |
| | | ResourceService service = SpringUtils.getBean(ResourceService.class); |
| | | Resource resource = service.selectById(this.resourceId); |
| | | Resource resource = service.getById(this.resourceId); |
| | | if (!Cools.isEmpty(resource)){ |
| | | return resource.getName(); |
| | | } |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.RoleService; |
| | |
| | | |
| | | public String getLeader$(){ |
| | | RoleService service = SpringUtils.getBean(RoleService.class); |
| | | Role role = service.selectById(this.leader); |
| | | Role role = service.getById(this.leader); |
| | | if (!Cools.isEmpty(role)){ |
| | | return String.valueOf(role.getName()); |
| | | } |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.PermissionService; |
| | |
| | | |
| | | public String getRoleName(){ |
| | | RoleService service = SpringUtils.getBean(RoleService.class); |
| | | Role role = service.selectById(this.roleId); |
| | | Role role = service.getById(this.roleId); |
| | | if (!Cools.isEmpty(role)){ |
| | | return role.getName(); |
| | | } |
| | |
| | | |
| | | public String getPermissionName(){ |
| | | PermissionService service = SpringUtils.getBean(PermissionService.class); |
| | | Permission permission = service.selectById(this.permissionId); |
| | | Permission permission = service.getById(this.permissionId); |
| | | if (!Cools.isEmpty(permission)){ |
| | | return permission.getName(); |
| | | } |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.HostService; |
| | |
| | | |
| | | public String getHostName() { |
| | | HostService service = SpringUtils.getBean(HostService.class); |
| | | Host host = service.selectById(this.hostId); |
| | | Host host = service.getById(this.hostId); |
| | | if (!Cools.isEmpty(host)){ |
| | | return host.getName(); |
| | | } |
| | |
| | | |
| | | public String getRoleName(){ |
| | | RoleService service = SpringUtils.getBean(RoleService.class); |
| | | Role role = service.selectById(this.roleId); |
| | | Role role = service.getById(this.roleId); |
| | | if (!Cools.isEmpty(role)){ |
| | | return role.getName(); |
| | | } |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | |
| | | |
| | | public String getUserUsername(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.userId); |
| | | User user = service.getById(this.userId); |
| | | if (!Cools.isEmpty(user)){ |
| | | return user.getUsername(); |
| | | } |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.Api; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.Config; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.Host; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.OperateLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.Permission; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.Resource; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.Role; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.RolePermission; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.Resource; |
| | | import com.zy.system.entity.RoleResource; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.UserLogin; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.system.entity.User; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.Api; |
| | | |
| | | public interface ApiService extends IService<Api> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.Config; |
| | | |
| | | public interface ConfigService extends IService<Config> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.Host; |
| | | |
| | | public interface HostService extends IService<Host> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.OperateLog; |
| | | |
| | | import java.util.List; |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.Permission; |
| | | |
| | | public interface PermissionService extends IService<Permission> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.Resource; |
| | | |
| | | public interface ResourceService extends IService<Resource> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.RolePermission; |
| | | |
| | | public interface RolePermissionService extends IService<RolePermission> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.Resource; |
| | | import com.zy.system.entity.RoleResource; |
| | | |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.Role; |
| | | |
| | | public interface RoleService extends IService<Role> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.UserLogin; |
| | | |
| | | public interface UserLoginService extends IService<UserLogin> { |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.system.entity.User; |
| | | |
| | | public interface UserService extends IService<User> { |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.Api; |
| | | import com.zy.system.mapper.ApiMapper; |
| | | import com.zy.system.service.ApiService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.mapper.ConfigMapper; |
| | | import com.zy.system.service.ConfigService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.Host; |
| | | import com.zy.system.mapper.HostMapper; |
| | | import com.zy.system.service.HostService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.zy.system.entity.OperateLog; |
| | | import com.zy.system.mapper.OperateLogMapper; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.Permission; |
| | | import com.zy.system.mapper.PermissionMapper; |
| | | import com.zy.system.service.PermissionService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.Resource; |
| | | import com.zy.system.mapper.ResourceMapper; |
| | | import com.zy.system.service.ResourceService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.RolePermission; |
| | | import com.zy.system.mapper.RolePermissionMapper; |
| | | import com.zy.system.service.RolePermissionService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.Resource; |
| | | import com.zy.system.entity.RoleResource; |
| | | import com.zy.system.mapper.RoleResourceMapper; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.Role; |
| | | import com.zy.system.mapper.RoleMapper; |
| | | import com.zy.system.service.RoleService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.UserLogin; |
| | | import com.zy.system.mapper.UserLoginMapper; |
| | | import com.zy.system.service.UserLoginService; |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.mapper.UserMapper; |
| | | import com.zy.system.service.UserService; |
| | |
| | | application: |
| | | name: @pom.build.finalName@ |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://192.168.4.15:1433;databasename=sxlktasrs |
| | | username: sa |
| | | password: sa@123 |
| | | driver-class-name: com.oscar.Driver |
| | | url: jdbc:oscar://localhost:2003/osrdb?CURRENTSCHEMA=BJYCWMS |
| | | username: SYSDBA |
| | | password: szoscar55 |
| | | mvc: |
| | | static-path-pattern: /** |
| | | redis: |
| | |
| | | select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=2 and barcode=#{barcode} and (io_type=1 or io_type=10) order by io_pri desc,io_time,wrk_no ASC |
| | | </select> |
| | | <select id="selectPakInStepBarcode" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where barcode = #{barcode} |
| | | select top 1 * from asr_wrk_mast where barcode = #{barcode} |
| | | </select> |
| | | |
| | | <select id="selectPakInStep11" resultMap="BaseResultMap"> |
| | |
| | | </select> |
| | | |
| | | <select id="selectPakInStep2" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and wrk_no=#{workNo} and sta_no=#{staNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC |
| | | select top 1 * from asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and wrk_no=#{workNo} and sta_no=#{staNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC |
| | | </select> |
| | | |
| | | <select id="selectPakInStep3" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where wrk_no=#{workNo} |
| | | select top 1 * from asr_wrk_mast where wrk_no=#{workNo} |
| | | </select> |
| | | |
| | | <select id="selectPickStep" resultMap="BaseResultMap"> |
| | |
| | | </select> |
| | | |
| | | <select id="selectPakOutStep1" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc |
| | | select top 1 * from asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc |
| | | </select> |
| | | |
| | | <select id="selectPakOutStep2" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=12 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC |
| | | select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=12 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC |
| | | </select> |
| | | |
| | | <select id="selectLocMove" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where wrk_sts=11 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no |
| | | select top 1 * from asr_wrk_mast where wrk_sts=11 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no |
| | | </select> |
| | | |
| | | <select id="selectLocMoving" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where wrk_sts=12 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no |
| | | select top 1 * from asr_wrk_mast where wrk_sts=12 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no |
| | | </select> |
| | | |
| | | <select id="selectWorking" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where 1=1 and (wrk_sts=3 or wrk_sts=12) and crn_no=#{crnNo} order by io_time,wrk_no |
| | | select top 1 * from asr_wrk_mast where 1=1 and (wrk_sts=3 or wrk_sts=12) and crn_no=#{crnNo} order by io_time,wrk_no |
| | | </select> |
| | | |
| | | <!-- <!– 入库任务 –>--> |
| | | <!-- <select id="selectWorkingPakin" resultMap="BaseResultMap">--> |
| | | <!-- select top 1 * from dbo.asr_wrk_mast where wrk_sts in (2,3,4) and io_type != 11 and source_sta_no = 180 order by io_time,wrk_no--> |
| | | <!-- select top 1 * from asr_wrk_mast where wrk_sts in (2,3,4) and io_type != 11 and source_sta_no = 180 order by io_time,wrk_no--> |
| | | <!-- </select>--> |
| | | |
| | | <!-- <!– 出库任务 –>--> |
| | | <!-- <select id="selectWorkingPakout" resultMap="BaseResultMap">--> |
| | | <!-- select top 1 *--> |
| | | <!-- from dbo.asr_wrk_mast--> |
| | | <!-- from asr_wrk_mast--> |
| | | <!-- where (wrk_sts in (11,12)--> |
| | | <!-- or (wrk_sts in (14,15) and wrk_no in--> |
| | | <!-- (--> |
| | |
| | | <!-- </select>--> |
| | | |
| | | <select id="selectCrnWorking" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts in (3,4,11,12) and crn_no=#{crnNo} order by io_time,wrk_no |
| | | select top 1 * from asr_wrk_mast where 1=1 and wrk_sts in (3,4,11,12) and crn_no=#{crnNo} order by io_time,wrk_no |
| | | </select> |
| | | |
| | | <select id="selectDevWorking" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts=2 and crn_no=#{crnNo} order by io_time,wrk_no |
| | | select top 1 * from asr_wrk_mast where 1=1 and wrk_sts=2 and crn_no=#{crnNo} order by io_time,wrk_no |
| | | </select> |
| | | |
| | | <select id="selectPick" resultMap="BaseResultMap"> |
| | | select * from dbo.asr_wrk_mast where 1=1 and wrk_sts = 14 and io_type in (103,104,107) |
| | | select * from asr_wrk_mast where 1=1 and wrk_sts = 14 and io_type in (103,104,107) |
| | | </select> |
| | | |
| | | <select id="selectPakOutStep11" resultMap="BaseResultMap"> |
| | | select * from dbo.asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc |
| | | select * from asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc |
| | | </select> |
| | | |
| | | <!-- 入出库模式相关 --> |
| | | <select id="selectWorkingPakin" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where wrk_sts in (2,3,4) and io_type != 11 and source_sta_no = #{sourceStaNo} order by io_time,wrk_no |
| | | select top 1 * from asr_wrk_mast where wrk_sts in (2,3,4) and io_type != 11 and source_sta_no = #{sourceStaNo} order by io_time,wrk_no |
| | | </select> |
| | | |
| | | <select id="selectWorkingPakout" resultMap="BaseResultMap"> |
| | | select top 1 * |
| | | from dbo.asr_wrk_mast |
| | | from asr_wrk_mast |
| | | where (wrk_sts in (11,12) |
| | | or (wrk_sts in (14,15) and wrk_no in |
| | | ( |
| | |
| | | order by io_time,wrk_no |
| | | </select> |
| | | <select id="selectPakoutEmpty" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where io_type = 110 and sta_no = #{staNo} order by io_time,wrk_no |
| | | select top 1 * from asr_wrk_mast where io_type = 110 and sta_no = #{staNo} order by io_time,wrk_no |
| | | </select> |
| | | </mapper> |
| | |
| | | var baseUrl = "/lktwcs"; |
| | | var baseUrl = "/bjycwcs"; |
| | | |
| | | // 赋值 |
| | | function setVal(el, val) { |
| | |
| | | mapInfo = { |
| | | "mapName": "LKTWCS", |
| | | "mapName": "BJYCWCS", |
| | | "rackCount": 4, |
| | | "crnCount": 3, |
| | | "stbCount": 13, |