85个文件已修改
2个文件已删除
10个文件已添加
| | |
| | | <option name="url" value="https://repo1.maven.org/maven2" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="central" /> |
| | | <option name="name" value="Central Repository" /> |
| | | <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="jboss.community" /> |
| | | <option name="name" value="JBoss Community repository" /> |
| | | <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="central" /> |
| | | <option name="name" value="Central Repository" /> |
| | | <option name="url" value="https://maven.aliyun.com/repository/public" /> |
| | | </remote-repository> |
| | | </component> |
| | | </project> |
| | |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.annotation.Excel; |
| | |
| | | |
| | | /** 日志主键 */ |
| | | @Excel(name = "操作序号", cellType = ColumnType.NUMERIC) |
| | | @TableField(value = "oper_id") |
| | | private Long operId; |
| | | |
| | | /** 操作模块 */ |
| | | @Excel(name = "操作模块") |
| | | private String title; |
| | | |
| | | /** 业务类型(0其它 1新增 2修改 3删除) */ |
| | | @Excel(name = "业务类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据") |
| | | private Integer businessType; |
| | | |
| | | /** 业务类型数组 */ |
| | | @TableField(exist = false) |
| | | private Integer[] businessTypes; |
| | | |
| | | /** 请求方法 */ |
| | | @Excel(name = "请求方法") |
| | | private String method; |
| | | |
| | | /** 请求方式 */ |
| | | @Excel(name = "请求方式") |
| | | private String requestMethod; |
| | | |
| | | /** 操作类别(0其它 1后台用户 2手机端用户) */ |
| | | @Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户") |
| | | private Integer operator_type; |
| | | |
| | | /** 操作人员 */ |
| | | @Excel(name = "操作人员") |
| | | @TableField(value = "oper_name") |
| | | private String operName; |
| | | |
| | | /** 部门名称 */ |
| | | @Excel(name = "部门名称") |
| | | @TableField(value = "dept_name") |
| | | private String deptName; |
| | | |
| | | /** 请求url */ |
| | | @Excel(name = "请求地址") |
| | | private String operUrl; |
| | | |
| | | /** 操作地址 */ |
| | | @Excel(name = "操作地址") |
| | | private String operIp; |
| | | |
| | | /** 请求参数 */ |
| | | @Excel(name = "请求参数") |
| | | private String operParam; |
| | | |
| | | /** 返回参数 */ |
| | | @Excel(name = "返回参数") |
| | | private String jsonResult; |
| | | |
| | | /** 操作状态(0正常 1异常) */ |
| | | @Excel(name = "状态", readConverterExp = "0=正常,1=异常") |
| | | private Integer status; |
| | | |
| | | /** 错误消息 */ |
| | | @Excel(name = "错误消息") |
| | | private String errorMsg; |
| | | |
| | | /** 操作时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(value = "oper_time") |
| | | private Date operTime; |
| | | |
| | | /** 消耗时间 */ |
| | | @Excel(name = "消耗时间", suffix = "毫秒") |
| | | private Long costTime; |
| | | |
| | | @Excel(name = "电话") |
| | | private String phone; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | * |
| | | */ |
| | | @ApiModelProperty(value = "角色类型 1=平台 2=省级 3=市州级 4=市县级,5 乡镇级,6 经营单位", hidden = true) |
| | | @TableField("roleType") |
| | | private Integer roleType; |
| | | |
| | | @Excel(name = "密码修改时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT) |
| | | @TableField("passWordUpdate") |
| | | private Date passWordUpdate; |
| | | |
| | | @ApiModelProperty(value = "对象ID") |
| | | @TableField("objectId") |
| | | private Integer objectId; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "角色名称") |
| | |
| | | R<Boolean> updateSysUser(@RequestBody SysUser sysUser); |
| | | |
| | | |
| | | |
| | | @PostMapping("/user/getUserSupplierList") |
| | | R<List<SysUser>> getUserSupplierList(@RequestBody getVolumeProductionRkQuery getVolumeProductionRkQuery); |
| | | |
| | |
| | | recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "用户已停用,请联系管理员"); |
| | | throw new ServiceException("对不起,您的账号:" + username + " 已停用"); |
| | | } |
| | | if (user.getUserType().equals("02")){ |
| | | throw new ServiceException("登录失败,登录账号权限不足"); |
| | | } |
| | | // if (user.getUserType().equals("02")){ |
| | | // throw new ServiceException("登录失败,登录账号权限不足"); |
| | | // } |
| | | |
| | | if (org.springframework.util.StringUtils.hasLength(seBei) && user.getUserType().equals("03")){ |
| | | SeBei se=new SeBei(); |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | server-addr: 192.168.110.235:8848 |
| | | server-addr: 127.0.0.1:8848 |
| | | service: ${spring.application.name} |
| | | group: DEFAULT_GROUP |
| | | namespace: 689e0f09-d102-460c-ac5c-5ea50a3174be |
| | | config: |
| | | # 配置中心地址 |
| | | server-addr: 192.168.110.235:8848 |
| | | server-addr: 127.0.0.1:8848 |
| | | namespace: 689e0f09-d102-460c-ac5c-5ea50a3174be |
| | | group: DEFAULT_GROUP |
| | | name: ${spring.application.name} |
| | |
| | | { |
| | | private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class); |
| | | |
| | | @Value("${spring.servlet.multipart.max-file-size:4MB}") |
| | | private String maxFileSize; |
| | | @Value("${spring.servlet.multipart.max-request-size:100MB}") |
| | | private String maxRequestSize; |
| | | |
| | | |
| | | /** |
| | |
| | | @ExceptionHandler(MaxUploadSizeExceededException.class) |
| | | public AjaxResult fileUpLoad(MaxUploadSizeExceededException e) { |
| | | log.error("上传文件异常 => : {}", e.getMessage()); |
| | | return AjaxResult.error("文件识别大小超出限制,允许的大小在" + maxFileSize); |
| | | return AjaxResult.error("文件识别大小超出限制,允许的大小在" + "500MB"); |
| | | } |
| | | } |
| | |
| | | profiles: |
| | | # 环境配置 |
| | | active: dev |
| | | #maxFileSize 单个数据大小 |
| | | servlet: |
| | | multipart: |
| | | max-file-size: 500MB |
| | | #maxRequestSize 是总数据大小 |
| | | max-request-size: 500MB |
| | | --- |
| | | spring: |
| | | config: |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | server-addr: 192.168.110.235:8848 |
| | | server-addr: 192.168.110.64:8848 |
| | | service: ${spring.application.name} |
| | | group: DEFAULT_GROUP |
| | | namespace: 689e0f09-d102-460c-ac5c-5ea50a3174be |
| | | config: |
| | | # 配置中心地址 |
| | | server-addr: 192.168.110.235:8848 |
| | | server-addr: 192.168.110.64:8848 |
| | | namespace: 689e0f09-d102-460c-ac5c-5ea50a3174be |
| | | group: DEFAULT_GROUP |
| | | name: ${spring.application.name} |
| | |
| | | eager: true |
| | | transport: |
| | | # 控制台地址 |
| | | dashboard: 192.168.110.188:8718 |
| | | dashboard: 192.168.110.64:8718 |
| | | # nacos配置持久化 |
| | | datasource: |
| | | ds1: |
| | | nacos: |
| | | server-addr: 192.168.110.235:8848 |
| | | server-addr: 192.168.110.64:8848 |
| | | dataId: sentinel-ruoyi-gateway |
| | | groupId: DEFAULT_GROUP |
| | | data-type: json |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | server-addr: 192.168.110.235:8848 |
| | | server-addr: 192.168.110.64:8848 |
| | | service: ${spring.application.name} |
| | | group: DEFAULT_GROUP |
| | | namespace: 689e0f09-d102-460c-ac5c-5ea50a3174be |
| | | config: |
| | | # 配置中心地址 |
| | | server-addr: 192.168.110.235:8848 |
| | | server-addr: 192.168.110.64:8848 |
| | | namespace: 689e0f09-d102-460c-ac5c-5ea50a3174be |
| | | group: DEFAULT_GROUP |
| | | name: ${spring.application.name} |
| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.management.domain.InventoriesSupplies; |
| | | import com.ruoyi.management.domain.InventoriesSuppliesInfo; |
| | | import com.ruoyi.management.domain.dto.InventoriesSuppDTO; |
| | | import com.ruoyi.management.domain.dto.InventoriesSuppliesInfoDTO; |
| | | import com.ruoyi.management.domain.dto.InventoriesSuppliesInfoQuery; |
| | | import com.ruoyi.management.domain.dto.InventoriesSuppliesQuery; |
| | | import com.ruoyi.management.domain.SlStoreManagement; |
| | | import com.ruoyi.management.domain.dto.*; |
| | | import com.ruoyi.management.domain.vo.InventoriesSuppliesInfoVO; |
| | | import com.ruoyi.management.domain.vo.InventoriesSuppliesVO; |
| | | import com.ruoyi.management.domain.vo.PdInfoVO; |
| | | import com.ruoyi.management.mapper.SlVolumeProductionRkMapper; |
| | | import com.ruoyi.management.service.InventoriesSuppliesInfoService; |
| | | import com.ruoyi.management.service.InventoriesSuppliesService; |
| | | import com.ruoyi.management.service.SlGoodsMaterialsService; |
| | | import com.ruoyi.management.service.SlStoreManagementService; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @RequestMapping("/inventories-supplies-info") |
| | | @Api(value = "物资盘点详情接口", tags = "物资盘点详情接口", description = "物资盘点详情接口") |
| | | public class InventoriesSuppliesInfoController { |
| | | @Resource |
| | | private SysUserClient sysUserClient; |
| | | |
| | | @Autowired |
| | | private SlGoodsMaterialsService slGoodsMaterialsService; |
| | | @Resource |
| | | private InventoriesSuppliesInfoService inventoriesSuppliesInfoService; |
| | | @Resource |
| | | private InventoriesSuppliesService inventoriesSuppliesService; |
| | | @Autowired |
| | | private SlStoreManagementService slStoreManagementService; |
| | | @GetMapping("/getInfoById") |
| | | @ApiOperation(value = "根据盘点id获取盘点信息") |
| | | public R<PdInfoVO> inventoriesSuppliesInfoService(Long id) { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | InventoriesSupplies byId = inventoriesSuppliesService.getById(id); |
| | | String format = simpleDateFormat.format(byId.getPdTime()); |
| | | SlStoreManagement byId1 = slStoreManagementService.getById(byId.getMaterialsId()); |
| | | PdInfoVO pdInfoVO = new PdInfoVO(); |
| | | pdInfoVO.setManagementName(byId1.getStoreManagementName()); |
| | | pdInfoVO.setPdName(byId.getPdrName()); |
| | | pdInfoVO.setPdTime(format); |
| | | return R.ok(pdInfoVO); |
| | | } |
| | | @PostMapping("/getInventoriesSuppliesInfoList") |
| | | @ApiOperation(value = "分页获物资盘点详情") |
| | | public R<PageDTO<InventoriesSuppliesInfoVO>> inventoriesSuppliesInfoService(@RequestBody InventoriesSuppliesInfoQuery inventoriesSuppliesInfoQuery) { |
| | |
| | | |
| | | @PostMapping("/submitInventoriesSuppliesInfo") |
| | | @ApiOperation(value = "提交物资盘点数据") |
| | | public R submitInventoriesSuppliesInfo(@RequestBody InventoriesSuppliesInfoDTO inventoriesSuppliesInfoDTO) { |
| | | inventoriesSuppliesInfoService.submitInventoriesSuppliesInfo(inventoriesSuppliesInfoDTO); |
| | | return R.ok(); |
| | | public R submitInventoriesSuppliesInfo(@RequestBody ADDPdDTO dto) { |
| | | |
| | | return R.ok(inventoriesSuppliesInfoService.submitInventoriesSuppliesInfo(dto)); |
| | | } |
| | | |
| | | @PostMapping("/accomplishInventoriesSuppliesInfo") |
| | | @ApiOperation(value = "完成物资盘点数据") |
| | | @ApiOperation(value = "完成物资盘点数据--更新库存") |
| | | public R accomplishInventoriesSuppliesInfo(@RequestBody InventoriesSuppliesInfoDTO inventoriesSuppliesInfoDTO) { |
| | | inventoriesSuppliesInfoService.accomplishInventoriesSuppliesInfo(inventoriesSuppliesInfoDTO); |
| | | return R.ok(); |
| | |
| | | package com.ruoyi.management.controller; |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.management.util.ObsUploadUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @GetMapping("/scanCodes") |
| | | @ApiOperation(value = "安卓扫描传输数据") |
| | | public R scanCodes(String rkNumber) { |
| | | public R scanCodes(String rkNumber,String code) { |
| | | inventoriesSuppliesService.scanCodes(rkNumber); |
| | | return R.ok(); |
| | | } |
| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.management.domain.SlEquipment; |
| | | import com.ruoyi.management.domain.dto.InventoriesSuppDTO; |
| | | import com.ruoyi.management.domain.dto.InventoriesSuppliesQuery; |
| | |
| | | |
| | | @PostMapping("/addSlEquipment") |
| | | @ApiOperation(value = "添加设备管理") |
| | | public R addSlEquipment(@RequestBody SlEquipmentDTO slEquipmentDTO) { |
| | | public AjaxResult addSlEquipment(@RequestBody SlEquipmentDTO slEquipmentDTO) { |
| | | slEquipmentService.addSlEquipment(slEquipmentDTO); |
| | | return R.ok(); |
| | | return slEquipmentService.addSlEquipment(slEquipmentDTO); |
| | | } |
| | | |
| | | @ApiOperation("删除设备管理") |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | |
| | | import com.ruoyi.management.domain.vo.SlGoodsShelfVO; |
| | | import com.ruoyi.management.domain.vo.StoreManagementGoodSmaterialsVO; |
| | | import com.ruoyi.management.mapper.ManagementGoodsMaterialsMapper; |
| | | import com.ruoyi.management.mapper.SlVolumeProductionCkMapper; |
| | | import com.ruoyi.management.mapper.SlVolumeProductionRkMapper; |
| | | import com.ruoyi.management.mapper.SlVolumeProductionZyMapper; |
| | | import com.ruoyi.management.service.ManagementGoodsMaterialsService; |
| | | import com.ruoyi.management.service.SlGoodsMaterialsService; |
| | | import com.ruoyi.management.service.SlStoreManagementService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | |
| | | @RequestMapping("/sl-goods-materials") |
| | | @Api(value = "物资管理接口", tags = "物资管理接口", description = "物资管理接口") |
| | | public class SlGoodsMaterialsController { |
| | | @Resource |
| | | private SlGoodsMaterialsService slGoodsMaterialsService; |
| | | |
| | | @Resource |
| | | private ManagementGoodsMaterialsMapper managementGoodsMaterialsMapper; |
| | | |
| | | @PostMapping("/getGoodSmaterialsList") |
| | | @ApiOperation(value = "分页获物资管理") |
| | |
| | | slGoodsMaterialsService.addSlGoodsShelf(slGoodsMaterialsDTO); |
| | | return R.ok(); |
| | | } |
| | | @Resource |
| | | private SlGoodsMaterialsService slGoodsMaterialsService; |
| | | |
| | | @Resource |
| | | private ManagementGoodsMaterialsMapper managementGoodsMaterialsMapper; |
| | | @Resource |
| | | private SlVolumeProductionRkMapper slVolumeProductionRkMapper; |
| | | @Resource |
| | | private SlVolumeProductionCkMapper slVolumeProductionCkMapper; |
| | | @Resource |
| | | private SlVolumeProductionZyMapper slVolumeProductionZyMapper; |
| | | @Resource |
| | | private SlStoreManagementService storeManagementService; |
| | | @ApiOperation("删除物资管理") |
| | | @DeleteMapping("/{id}") |
| | | public R<?> delStoreManagement( |
| | | @ApiParam(name = "id", value = "货架管理id", required = true) @PathVariable("id") Long id) { |
| | | // 判断当前物资有没有存在于入库 出库 转移记录 和库存 |
| | | List<ManagementGoodsMaterials> goodsMaterialsId = managementGoodsMaterialsMapper.selectList(new QueryWrapper<ManagementGoodsMaterials>() |
| | | .eq("goods_materials_id", id) |
| | | .eq("del_flag",0)); |
| | | |
| | | if (!goodsMaterialsId.isEmpty()){ |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | for (ManagementGoodsMaterials managementGoodsMaterials : goodsMaterialsId) { |
| | | if (managementGoodsMaterials.getManagementId() != null) { |
| | | SlStoreManagement byId1 = storeManagementService.getById(managementGoodsMaterials.getManagementId()); |
| | | stringBuilder.append(byId1.getStoreManagementName()).append(","); |
| | | } |
| | | } |
| | | // 去除最后一位字符 |
| | | stringBuilder.deleteCharAt(stringBuilder.length() - 1); |
| | | return R.fail("删除失败," + stringBuilder + "仓库还有当前物资"); |
| | | } |
| | | SlGoodsMaterials byId = slGoodsMaterialsService.getById(id); |
| | | byId.setDelFlag("1"); |
| | | slGoodsMaterialsService.updateById(byId); |
| | |
| | | import com.ruoyi.management.service.SlRegionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.imageio.spi.RegisterableService; |
| | |
| | | } |
| | | |
| | | |
| | | @PostMapping("/getcityRegione") |
| | | @GetMapping("/getcityRegione") |
| | | @ApiOperation(value = "获取城市") |
| | | public R<List<SlRegion>> getcityRegione(RegionQuery regionQuery) { |
| | | return R.ok(regionService.getcityRegione(regionQuery)); |
| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.management.domain.SlStoreManagement; |
| | | import com.ruoyi.management.domain.dto.QStoreManagementQuery; |
| | | import com.ruoyi.management.domain.dto.StoreManagementDTO; |
| | |
| | | |
| | | @PostMapping("/addStoreManagement") |
| | | @ApiOperation(value = "添加/修改仓库管理") |
| | | public R addStoreManagement(@RequestBody StoreManagementDTO storeManagementDTO) { |
| | | slStoreManagementService.addStoreManagement(storeManagementDTO); |
| | | return R.ok(); |
| | | public AjaxResult addStoreManagement(@RequestBody StoreManagementDTO storeManagementDTO) { |
| | | |
| | | return slStoreManagementService.addStoreManagement(storeManagementDTO); |
| | | } |
| | | |
| | | @ApiOperation("删除仓库管理") |
| | |
| | | @PostMapping("/addStoreManagementimg") |
| | | @ApiOperation(value = "添加/修改仓库管理平面圖") |
| | | public R addStoreManagementimg(@RequestBody StoreManagementimgDTO storeManagementimgDTO) { |
| | | slStoreManagementImgService.addStoreManagementimg(storeManagementimgDTO); |
| | | return R.ok(); |
| | | |
| | | return R.ok(slStoreManagementImgService.addStoreManagementimg(storeManagementimgDTO)); |
| | | } |
| | | |
| | | @PostMapping("/getStoreManagementimgOne") |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.management.domain.SlVolumeProductionCk; |
| | | import com.ruoyi.management.domain.SlVolumeProductionCkgl; |
| | | import com.ruoyi.management.domain.dto.*; |
| | | import com.ruoyi.management.domain.vo.InventoriesSuppliesInfoVO; |
| | | import com.ruoyi.management.domain.vo.ManagementimgSlVolumeProductionCkVO; |
| | | import com.ruoyi.management.domain.vo.ManagementimgVolumeProductionCkVO; |
| | | import com.ruoyi.management.domain.vo.ManagementimgVolumeProductionRkVO; |
| | | import com.ruoyi.management.service.SlVolumeProductionCkService; |
| | | import com.ruoyi.management.service.SlVolumeProductionCkglService; |
| | | import com.ruoyi.management.service.impl.SlVolumeProductionCkServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | slVolumeProductionCkService.updSlVolumeProductionCk(addckgldto.getAddSlVolumeProductionCkDTO()); |
| | | return R.ok(); |
| | | } |
| | | @Autowired |
| | | private SlVolumeProductionCkglService ckglService; |
| | | @GetMapping("/auditAgain") |
| | | @ApiOperation(value = "出库管理重新审核") |
| | | public R auditAgain(Long ckglId) { |
| | | SlVolumeProductionCkgl byId1 = ckglService.getById(ckglId); |
| | | byId1.setAuditStatus(1); |
| | | byId1.setPresentState(1); |
| | | byId1.setReasonsRefusal(""); |
| | | ckglService.updateById(byId1); |
| | | return R.ok(); |
| | | } |
| | | @PostMapping("/updSlVolumeProductionCk1") |
| | | @ApiOperation(value = "修改出库 不变更状态") |
| | | public R updSlVolumeProductionCk1(@RequestBody ADDCKGLDTO addckgldto ) { |
| | | slVolumeProductionCkService.updSlVolumeProductionCk1(addckgldto.getAddSlVolumeProductionCkDTO()); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/getSlVolumeProductionCkList") |
| | | @ApiOperation(value = "分页获取通过出库管理ID当前出库的物资") |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.management.domain.SlAudit; |
| | | import com.ruoyi.management.domain.SlAuditRecord; |
| | | import com.ruoyi.management.domain.SlVolumeProductionCkgl; |
| | | import com.ruoyi.management.domain.SlVolumeProductionRkgl; |
| | | import com.ruoyi.management.domain.dto.VolumeProductionCkglDTO; |
| | |
| | | import com.ruoyi.management.domain.dto.getslVolumeProductionCkglQuery; |
| | | import com.ruoyi.management.domain.vo.*; |
| | | import com.ruoyi.management.mapper.SlAuditMapper; |
| | | import com.ruoyi.management.mapper.SlAuditRecordMapper; |
| | | import com.ruoyi.management.service.SlVolumeProductionCkglService; |
| | | import com.ruoyi.system.api.domain.getVolumeProductionRkQuery; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @Resource |
| | | private SlAuditMapper slAuditMapper; |
| | | @Resource |
| | | private SlAuditRecordMapper slAuditRecordMapper; |
| | | |
| | | @PostMapping("/getslVolumeProductionCkglList") |
| | | @ApiOperation(value = "分页获取出库管理") |
| | |
| | | wrapper.eq(SlAudit::getRkId,id); |
| | | SlAudit slAudit = slAuditMapper.selectOne(wrapper); |
| | | slAudit.setState(6); |
| | | slAuditRecordMapper.delete(new QueryWrapper<SlAuditRecord>() |
| | | .eq("audit_id",slAudit.getId())); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | |
| | | return R.ok(slVolumeProductionRkService.codeInfo(id)); |
| | | } |
| | | @PostMapping("/codeInfo1") |
| | | @ApiOperation(value = "转移数据获取二维码样式") |
| | | public R<List<QRCodeVO>> codeInfo( Long id,Long zyglId) throws Exception { |
| | | |
| | | return R.ok(slVolumeProductionRkService.codeInfo1(id,zyglId)); |
| | | } |
| | | |
| | | @PostMapping("/getSlvolumeVolumeProductionRkList") |
| | | @ApiOperation(value = "分页获取通过入库管理ID当前批次入库的物资") |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.management.domain.SlAudit; |
| | | import com.ruoyi.management.domain.SlAuditRecord; |
| | | import com.ruoyi.management.domain.SlVolumeProductionRkgl; |
| | | import com.ruoyi.management.domain.dto.SlGoodsShelfDTO; |
| | | import com.ruoyi.management.domain.dto.SupplierVolumeProductionRkglQuery; |
| | |
| | | import com.ruoyi.management.domain.vo.VolumeProductionRkgInfoVO; |
| | | import com.ruoyi.management.domain.vo.VolumeProductionRkgInventoryVO; |
| | | import com.ruoyi.management.mapper.SlAuditMapper; |
| | | import com.ruoyi.management.mapper.SlAuditRecordMapper; |
| | | import com.ruoyi.management.service.SlVolumeProductionRkglService; |
| | | import com.ruoyi.system.api.domain.getVolumeProductionRkQuery; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @Resource |
| | | private SlAuditMapper slAuditMapper; |
| | | @Resource |
| | | private SlAuditRecordMapper slAuditRecordMapper; |
| | | |
| | | |
| | | |
| | |
| | | @PostMapping("/addVolumeProductionRkgl") |
| | | @ApiOperation(value = "添加/修改入库管理") |
| | | public R<Long> addVolumeProductionRkgl(@RequestBody VolumeProductionRkglDTO volumeProductionRkglDTO) { |
| | | slVolumeProductionRkglService.addVolumeProductionRkgl(volumeProductionRkglDTO); |
| | | return R.ok(); |
| | | |
| | | return R.ok(slVolumeProductionRkglService.addVolumeProductionRkgl(volumeProductionRkglDTO)); |
| | | } |
| | | |
| | | @ApiOperation("取消入库管理") |
| | |
| | | if (slAudit!=null){ |
| | | slAudit.setState(6); |
| | | slAuditMapper.updateById(slAudit); |
| | | slAuditRecordMapper.delete(new QueryWrapper<SlAuditRecord>() |
| | | .eq("audit_id",slAudit.getId())); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | package com.ruoyi.management.controller; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.google.common.collect.Lists; |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.management.domain.SlGoodsShelf; |
| | | import com.ruoyi.management.domain.SlVolumeProductionZy; |
| | | import com.ruoyi.management.domain.dto.*; |
| | | import com.ruoyi.management.domain.dto.ManagementimgVolumeProductionZyVO; |
| | | import com.ruoyi.management.domain.vo.*; |
| | | import com.ruoyi.management.service.SlGoodsShelfService; |
| | | import com.ruoyi.management.service.SlStoreManagementService; |
| | | import com.ruoyi.management.service.SlVolumeProductionZyService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Resource |
| | | private SlVolumeProductionZyService slVolumeProductionZyService; |
| | | @Autowired |
| | | private SlGoodsShelfService slGoodsShelfService; |
| | | @Autowired |
| | | private SlStoreManagementService storeManagementService; |
| | | |
| | | @PostMapping("/getNumberAndShelfByManagementId") |
| | | @ApiOperation(value = "根据仓库id 查询楼层和货架") |
| | | public R<NumberAndShelfVO> getNumberAndShelfByManagementId(@RequestBody QueryDTO dto) { |
| | | return R.ok(slVolumeProductionZyService.getNumberAndShelfByManagementId(dto)); |
| | | } |
| | | @GetMapping("/getNumberAndShelf") |
| | | @ApiOperation(value = "根据仓库Id 获取楼层数量和所有货架数组") |
| | | public R<GetNumberAndShelfVO> getNumberAndShelf(Long managementId) { |
| | | GetNumberAndShelfVO getNumberAndShelfVO = new GetNumberAndShelfVO(); |
| | | getNumberAndShelfVO.setManagementNumber(storeManagementService.getById(managementId).getStoreManagementNumber()); |
| | | List<SlGoodsShelf> list = slGoodsShelfService.list(new QueryWrapper<SlGoodsShelf>() |
| | | .eq("del_flag", 0) |
| | | .eq("store_management_id", managementId)); |
| | | getNumberAndShelfVO.setList(list); |
| | | return R.ok(getNumberAndShelfVO); |
| | | } |
| | | @PostMapping("/getVolumeProductionzyCode") |
| | | @ApiOperation(value = "获取转移管理二维码") |
| | |
| | | slVolumeProductionZyService.addSlVolumeProductionZy(addzydto); |
| | | return R.ok(); |
| | | } |
| | | @PostMapping("/deleteSlVolumeProductionZyUpdate") |
| | | @ApiOperation(value = "编辑时删除转移数据") |
| | | public R addSlVolumeProductionZy(@RequestBody DeleteCKDTO dto) { |
| | | QueryWrapper<SlVolumeProductionZy> slVolumeProductionZyQueryWrapper = new QueryWrapper<>(); |
| | | slVolumeProductionZyQueryWrapper.eq("del_flag","0"); |
| | | slVolumeProductionZyQueryWrapper.eq("rk_id",dto.getRkId()); |
| | | slVolumeProductionZyQueryWrapper.eq("zygl_id",dto.getId()); |
| | | slVolumeProductionZyQueryWrapper.eq("shelf_id",dto.getShelfId()); |
| | | slVolumeProductionZyQueryWrapper.eq("store_management_number",dto.getStoreManagementNumber()); |
| | | SlVolumeProductionZy one = slVolumeProductionZyService.getOne(slVolumeProductionZyQueryWrapper); |
| | | if (one!=null){ |
| | | slVolumeProductionZyService.removeById(one.getId()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/updSlVolumeProductionZy") |
| | | @ApiOperation(value = "修改转移") |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.management.domain.SlAudit; |
| | | import com.ruoyi.management.domain.SlVolumeProductionCk; |
| | | import com.ruoyi.management.domain.SlVolumeProductionRkgl; |
| | | import com.ruoyi.management.domain.SlVolumeProductionZygl; |
| | | import com.ruoyi.management.domain.*; |
| | | import com.ruoyi.management.domain.dto.*; |
| | | import com.ruoyi.management.domain.vo.*; |
| | | import com.ruoyi.management.mapper.ManagementGoodsMaterialsMapper; |
| | | import com.ruoyi.management.mapper.SlAuditMapper; |
| | | import com.ruoyi.management.service.SlVolumeProductionZyService; |
| | | import com.ruoyi.management.service.SlVolumeProductionZyglService; |
| | | import com.ruoyi.management.service.*; |
| | | import com.ruoyi.management.service.impl.SlVolumeProductionZyServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import io.swagger.annotations.Authorization; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | @Resource |
| | | private SlVolumeProductionZyglService slVolumeProductionZyglService; |
| | | @Resource |
| | | private SlVolumeProductionZyService slVolumeProductionZyService; |
| | | @Autowired |
| | | private SlVolumeProductionRkService slVolumeProductionRkService; |
| | | @Autowired |
| | | private SlGoodsMaterialsService slGoodsMaterialsService; |
| | | @Resource |
| | | private ManagementGoodsMaterialsMapper managementGoodsMaterialsMapper; |
| | | @PostMapping("/getVolumeProductionZyglCode") |
| | | @ApiOperation(value = "获取转移管理打印二维码列表") |
| | | public R<PageDTO<getVolumeProductionRkgCodeVO>> getVolumeProductionRkgCode(@RequestBody VolumeProductionZyglCodeQuery volumeProductionRkgCodeQuery) { |
| | | // 通过转移管理获取 转移列表 获取入库id |
| | | Page<SlVolumeProductionZy> page = new Page<>(volumeProductionRkgCodeQuery.getPageCurr(), volumeProductionRkgCodeQuery.getPageSize()); |
| | | LambdaQueryWrapper< SlVolumeProductionZy> wrapper1= Wrappers.lambdaQuery(); |
| | | wrapper1.eq(SlVolumeProductionZy::getZyglId,volumeProductionRkgCodeQuery.getVolumeProductionZyglId()); |
| | | wrapper1.eq( SlVolumeProductionZy::getDelFlag,"0"); |
| | | if (volumeProductionRkgCodeQuery.getManagementNumber() != null){ |
| | | wrapper1.eq(SlVolumeProductionZy::getShelfId,volumeProductionRkgCodeQuery.getShelfId()); |
| | | } |
| | | if (volumeProductionRkgCodeQuery.getManagementNumber() != null){ |
| | | wrapper1.eq(SlVolumeProductionZy::getStoreManagementNumber,volumeProductionRkgCodeQuery.getManagementNumber()); |
| | | } |
| | | wrapper1.orderByDesc(SlVolumeProductionZy::getCreateTime); |
| | | Page<SlVolumeProductionZy> page2 = slVolumeProductionZyService.page(page, wrapper1); |
| | | PageDTO<getVolumeProductionRkgCodeVO> SlGoodsShelfDTO = PageDTO.of(page2, getVolumeProductionRkgCodeVO.class); |
| | | List<getVolumeProductionRkgCodeVO> list2 = SlGoodsShelfDTO.getList(); |
| | | for(getVolumeProductionRkgCodeVO list:list2) { |
| | | SlGoodsMaterials slGoodsMaterials = slGoodsMaterialsService.getById(list.getMaterialsId()); |
| | | list.setGoodsMaterialsName(slGoodsMaterials.getGoodsMaterialsName()); |
| | | list.setIsConsume(slGoodsMaterials.getIsConsume()); |
| | | list.setErwmNum(slVolumeProductionRkService.getById(list.getScrkId()).getErwmNum()); |
| | | } |
| | | // 将list2中的数据 如果字段erwmNum为空 优先展示在前面 |
| | | list2.sort((o1, o2) -> { |
| | | if (o1.getErwmNum() == null) { |
| | | return -1; |
| | | } |
| | | if (o2.getErwmNum() == null) { |
| | | return 1; |
| | | } |
| | | return 0; |
| | | }); |
| | | return R.ok(SlGoodsShelfDTO); |
| | | } |
| | | @PostMapping("/updateQrCodeNum") |
| | | @ApiOperation(value = "批量修改转移二维码生成数量") |
| | | public R updateQrCodeNum(@RequestBody UpdateZyQrCodeDTO dto) { |
| | | for (UpdateQrCodeNumDTO updateQrCodeNumDTO : dto.getList()) { |
| | | SlVolumeProductionZy byId = slVolumeProductionZyService.getById(updateQrCodeNumDTO.getId()); |
| | | if (byId == null){ |
| | | continue; |
| | | } |
| | | Long scrkId = byId.getScrkId(); |
| | | SlVolumeProductionRk byId1 = slVolumeProductionRkService.getById(scrkId); |
| | | if (byId1 == null){ |
| | | continue; |
| | | } |
| | | byId1.setErwmNum(updateQrCodeNumDTO.getErwmNum()); |
| | | byId1.setRkModel(getLetter(updateQrCodeNumDTO.getErwmNum())); |
| | | slVolumeProductionRkService.updateById(byId1); |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | public static String getLetter(int num) { |
| | | String[] str = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}; |
| | | // 如果num大于26 那么往后叠加对应的字母 比如27 那么就是AA |
| | | if (num > 26) { |
| | | int a = num / 26; |
| | | int b = num % 26; |
| | | if (b == 0) { |
| | | a = a - 1; |
| | | b = 26; |
| | | } |
| | | return getLetter(a) + getLetter(b); |
| | | } |
| | | |
| | | return str[num - 1]; |
| | | } |
| | | @PostMapping("/getVolumeProductionzZyglList") |
| | | @ApiOperation(value = "分页获取转移管理") |
| | | public R<PageDTO<VolumeProductionzZyglVO>> getVolumeProductionzZyglList(@RequestBody SlVolumeProductionZyQuery slVolumeProductionZyQuery) { |
| | |
| | | return R.ok(slVolumeProductionZyglService.addsVolumeProductionzZygl(slVolumeProductionZyDTO)); |
| | | } |
| | | |
| | | @GetMapping("/getVolumeProductionzZyglnfo") |
| | | @PostMapping("/getVolumeProductionzZyglnfo") |
| | | @ApiOperation(value = "获取转移管理详情") |
| | | public R<VolumeProductionZyglInfoVO> getVolumeProductionzZyglnfo(@RequestBody ManagementimgVolumeProductionZyQuery managementimgVolumeProductionZyQuery) { |
| | | return R.ok(slVolumeProductionZyglService.getVolumeProductionzZyglnfo(managementimgVolumeProductionZyQuery)); |
| | |
| | | |
| | | @GetMapping("/getVolumeProductionZyglnventory/{id}") |
| | | @ApiOperation(value = "获取转移管理打印清单") |
| | | public R<VolumeProductionZyglInventoryVO> getVolumeProductionZyglnventory(@ApiParam(name = "id", value = "转移管理id", required = true) @PathVariable("id") Integer id) { |
| | | public R<VolumeProductionZyglInventoryVO> getVolumeProductionZyglnventory(@ApiParam(name = "id", value = "转移管理id", required = true) @PathVariable("id") String id) { |
| | | return R.ok(slVolumeProductionZyglService.getVolumeProductionZyglnventory(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("取转移管理") |
| | | @ApiOperation("取消转移管理") |
| | | @GetMapping("/{id}") |
| | | public R<?> delStoreManagement( |
| | | @ApiParam(name = "id", value = "转移管理id", required = true) @PathVariable("id") Integer id) { |
| | | @ApiParam(name = "id", value = "转移管理id", required = true) @PathVariable("id") Long id) { |
| | | SlVolumeProductionZygl byId = slVolumeProductionZyglService.getById(id); |
| | | byId.setPresentState(5); |
| | | byId.setAuditStatus(7); |
| | | slVolumeProductionZyglService.updateById(byId); |
| | | |
| | | LambdaQueryWrapper<SlAudit> wrapper= Wrappers.lambdaQuery(); |
| | | wrapper.eq(SlAudit::getType,1); |
| | | wrapper.eq(SlAudit::getType,3); |
| | | wrapper.eq( SlAudit::getDelFlag,0); |
| | | wrapper.eq(SlAudit::getRkId,id); |
| | | SlAudit slAudit = slAuditMapper.selectOne(wrapper); |
| | | slAudit.setState(6); |
| | | List<SlVolumeProductionZy> list = slVolumeProductionZyService.list(new QueryWrapper<SlVolumeProductionZy>() |
| | | .eq("zygl_id", id) |
| | | .eq("del_flag", "0")); |
| | | List<Long> collect = list.stream().map(SlVolumeProductionZy::getScrkId).collect(Collectors.toList()); |
| | | // 回滚入库记录库存 |
| | | for (SlVolumeProductionZy slVolumeProductionZy : list) { |
| | | SlVolumeProductionRk byId1 = slVolumeProductionRkService.getById(slVolumeProductionZy.getRkId()); |
| | | byId1.setRepertoryZhai(byId1.getRepertoryZhai()+slVolumeProductionZy.getZyNum()); |
| | | slVolumeProductionRkService.updateById(byId1); |
| | | // 回滚中间表记录库存 |
| | | LambdaQueryWrapper<ManagementGoodsMaterials> wrapper2 = Wrappers.lambdaQuery(); |
| | | wrapper2.eq(ManagementGoodsMaterials::getGoodsMaterialsId,slVolumeProductionZy.getMaterialsId()); |
| | | wrapper2.eq(ManagementGoodsMaterials::getManagementId,byId.getBmanagementId()); |
| | | wrapper2.eq(ManagementGoodsMaterials::getDelFlag, 0); |
| | | ManagementGoodsMaterials managementGoodsMaterials = managementGoodsMaterialsMapper.selectOne(wrapper2); |
| | | if (managementGoodsMaterials!=null){ |
| | | Long repertorySum = managementGoodsMaterials.getRepertorySum(); |
| | | Long repertoryZhai = managementGoodsMaterials.getRepertoryZhai(); |
| | | Long re=repertorySum+Long.valueOf(slVolumeProductionZy.getZyNum()); |
| | | Long re1=repertoryZhai+Long.valueOf(slVolumeProductionZy.getZyNum()); |
| | | managementGoodsMaterials.setRepertorySum(re); |
| | | managementGoodsMaterials.setRepertoryZhai(re1); |
| | | managementGoodsMaterials.setRepertoryChu(0); |
| | | managementGoodsMaterialsMapper.updateById(managementGoodsMaterials); |
| | | }else{ |
| | | ManagementGoodsMaterials managementGoodsMaterials1=new ManagementGoodsMaterials(); |
| | | managementGoodsMaterials1.setManagementId(byId.getBmanagementId()); |
| | | managementGoodsMaterials1.setGoodsMaterialsId(slVolumeProductionZy.getMaterialsId()); |
| | | managementGoodsMaterials1.setRepertoryZhai(Long.valueOf(slVolumeProductionZy.getZyNum())); |
| | | managementGoodsMaterials1.setRepertorySum(Long.valueOf(slVolumeProductionZy.getZyNum())); |
| | | managementGoodsMaterials1.setRepertoryChu(slVolumeProductionZy.getZyNum()); |
| | | managementGoodsMaterials1.setCreateTime(new Date()); |
| | | managementGoodsMaterialsMapper.insert(managementGoodsMaterials1); |
| | | } |
| | | } |
| | | |
| | | List<SlVolumeProductionRk> list1 = slVolumeProductionRkService.list(new QueryWrapper<SlVolumeProductionRk>() |
| | | .in("id",collect) |
| | | .eq("del_flag","0")); |
| | | |
| | | // 删除入库记录 |
| | | slVolumeProductionRkService.remove(new QueryWrapper<SlVolumeProductionRk>().in("id",collect)); |
| | | // 取消后删除转移记录 |
| | | QueryWrapper<SlVolumeProductionZy> wrapper1 = new QueryWrapper<>(); |
| | | wrapper1.eq("zygl_id",id); |
| | | slVolumeProductionZyService.remove(wrapper1); |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation("转移管理入库") |
| | | @GetMapping("/zy/{id}") |
| | | public R<?> zy(@ApiParam(name = "id", value = "转移管理id", required = true) @PathVariable("id") Integer id) { |
| | | slVolumeProductionZyglService.zy(id); |
| | | @PostMapping("/zy") |
| | | public R<?> zy(@RequestBody ZyRkDTO dto) { |
| | | slVolumeProductionZyglService.zy(dto.getCkglId(),dto.getAuthorizationUrl()); |
| | | return R.ok(); |
| | | } |
| | | @Autowired |
| | | private SlAuditService slAuditRecordService; |
| | | @ApiOperation("查询审核拒绝原因") |
| | | @GetMapping("/getRefuseReason") |
| | | public R<?> getRefuseReason(Long auditId) { |
| | | SlAudit byId = slAuditRecordService.getById(auditId); |
| | | return R.ok(byId.getCause()); |
| | | } |
| | | } |
| | |
| | | @TableField("zymanagement_id") |
| | | private Long zymanagementId; |
| | | |
| | | @ApiModelProperty("点击审核的人id") |
| | | @TableField("audit_user_id") |
| | | private String auditUserId; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("审核人名称") |
| | | @TableField("shenh_name") |
| | | private String shenhName; |
| | | @ApiModelProperty("审核这条数据的人是否是平台管理员") |
| | | @TableField(exist = false) |
| | | private Integer isPlatform; |
| | | @ApiModelProperty("如果审核被拒 返回拒绝理由") |
| | | @TableField(exist = false) |
| | | private String refuseReason; |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("判断是不是新增的数据") |
| | | private String newAddTime; |
| | | |
| | | |
| | | @ApiModelProperty("物资名称") |
| | | @TableField(exist = false) |
| | | private String goodsMaterialsName; |
| | | @ApiModelProperty("物资类型") |
| | | @TableField(exist = false) |
| | | private Integer isConsume; |
| | | @ApiModelProperty("应放楼层") |
| | | @TableField(exist = false) |
| | | private Integer managementNumber; |
| | | @ApiModelProperty("应放货架") |
| | | @TableField(exist = false) |
| | | private String shelfName; |
| | | } |
New file |
| | |
| | | package com.ruoyi.management.domain; |
| | | |
| | | 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 io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 发起入库管理 |
| | | * </p> |
| | | * |
| | | * @author hjl |
| | | * @since 2024-06-25 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @ApiModel(value = "SlVolumeProductionRk返回对象", description = "发起入库管理") |
| | | public class SlVolumeProductionRkVO { |
| | | |
| | | @TableId(value = "id", type = IdType.ASSIGN_ID) |
| | | private String id; |
| | | |
| | | @ApiModelProperty("入管理主表id") |
| | | private String VolumeProductionRkglId; |
| | | |
| | | @ApiModelProperty("物资id") |
| | | private String materialsId; |
| | | |
| | | @ApiModelProperty("入库数量") |
| | | private Long rkNum; |
| | | |
| | | |
| | | @ApiModelProperty("入库编号") |
| | | private String rkNumber; |
| | | |
| | | |
| | | @ApiModelProperty("入库型号") |
| | | private String rkModel; |
| | | |
| | | @ApiModelProperty("入库价格") |
| | | private BigDecimal rkPice; |
| | | |
| | | @ApiModelProperty("在库存的") |
| | | private Long repertoryZhai; |
| | | |
| | | @ApiModelProperty("仓库层数 1代表一层,2代表两层,3代表三层") |
| | | private Integer storeManagementNumber; |
| | | |
| | | @ApiModelProperty("货架id") |
| | | private String shelfId; |
| | | |
| | | @ApiModelProperty("删除标志(0代表存在 2代表删除)") |
| | | private String delFlag; |
| | | |
| | | @ApiModelProperty("创建者") |
| | | private String createBy; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("更新者") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty("更新时间") |
| | | private Date updateTime; |
| | | |
| | | @ApiModelProperty("二维码数量") |
| | | private Integer erwmNum; |
| | | |
| | | @ApiModelProperty("扫描二维码数量") |
| | | private Integer smerwmNum; |
| | | |
| | | |
| | | @ApiModelProperty("仓库ID") |
| | | private String managementId; |
| | | |
| | | @ApiModelProperty("判断是不是新增的数据") |
| | | private String newAddTime; |
| | | |
| | | @ApiModelProperty("物资名称") |
| | | private String goodsMaterialsName; |
| | | @ApiModelProperty("物资类型") |
| | | private Integer isConsume; |
| | | @ApiModelProperty("应放楼层") |
| | | private Integer managementNumber; |
| | | @ApiModelProperty("应放货架") |
| | | private String shelfName; |
| | | } |
| | |
| | | @TableField("management_id") |
| | | private Long managementId; |
| | | |
| | | @ApiModelProperty("被转移仓库ID") |
| | | @ApiModelProperty("被转移入仓库ID") |
| | | @TableField("bmanagement_id") |
| | | private Long bmanagementId; |
| | | |
| | |
| | | package com.ruoyi.management.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("添加出库DTO") |
| | | @ApiModel("修改出库DTO") |
| | | public class ADDCKGLDTO { |
| | | private List<AddSlVolumeProductionCkDTO> addSlVolumeProductionCkDTO; |
| | | } |
New file |
| | |
| | | package com.ruoyi.management.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("添加盘点数据DTO") |
| | | public class ADDPdDTO { |
| | | private List<InventoriesSuppliesInfoDTO> list; |
| | | |
| | | @ApiModelProperty(value = "仓库id") |
| | | private Long managementId; |
| | | } |
| | |
| | | @Data |
| | | @ApiModel("添加出库库批次数据传输对象") |
| | | public class AddSlVolumeProductionCkDTO { |
| | | @ApiModelProperty("出库管理id") |
| | | @ApiModelProperty("出库id") |
| | | private Long ckgl_id; |
| | | |
| | | @ApiModelProperty("入库批次") |
New file |
| | |
| | | package com.ruoyi.management.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("添加出库DTO") |
| | | public class DeleteCKDTO { |
| | | @ApiModelProperty("出库管理id") |
| | | private Long id; |
| | | @ApiModelProperty("入库id") |
| | | private Long rkId; |
| | | @ApiModelProperty("shelfId") |
| | | private Long shelfId; |
| | | @ApiModelProperty("楼层") |
| | | private Integer storeManagementNumber; |
| | | |
| | | } |
| | |
| | | private String materialsName; |
| | | @ApiModelProperty("物资类型 1消耗 2非消耗") |
| | | private Integer isConsume; |
| | | @ApiModelProperty("仓库层数 1代表一层,2代表两层,3代表三层") |
| | | private Integer storeManagementNumber; |
| | | @ApiModelProperty("货架id") |
| | | private Long shelfId; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(" 盘点数量") |
| | | private Long suppliesNum; |
| | | @ApiModelProperty(" 在库数量") |
| | | private Long zkNum; |
| | | @ApiModelProperty(" 仓库id") |
| | | private Long managementId; |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModel("通过出库管理拿出库记录的数据取对象") |
| | | public class ManagementimgVolumeProductionCkQuery extends BasePage { |
| | | |
| | | @ApiModelProperty("入管理主表id") |
| | | @ApiModelProperty("出库管理主表id") |
| | | private Long VolumeProductionCKglId; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("物资名称") |
| | | private String goodsMaterialsName; |
| | | @ApiModelProperty("货架Id") |
| | | private Long shelfId; |
| | | @ApiModelProperty("物资Id") |
| | | private Long materialsId; |
| | | |
| | | @ApiModelProperty("货架名称") |
| | | private String goodsShelfName; |
| | |
| | | @ApiModelProperty("入库批次") |
| | | private Long rkId; |
| | | |
| | | @ApiModelProperty("入库编号") |
| | | @ApiModelProperty("入库批次") |
| | | private String rkNumber; |
| | | @ApiModelProperty("转移批次") |
| | | private String zyNumber; |
| | | |
| | | @ApiModelProperty("转移入库批次") |
| | | @ApiModelProperty("转移入库批次id") |
| | | private Long scrkId; |
| | | |
| | | @ApiModelProperty("转移入库编号") |
| | | private String zyrkNumber; |
| | | @ApiModelProperty("在库存的") |
| | | private Long zkNum; |
| | | |
| | | @ApiModelProperty("1 是非消耗,2是消耗 ") |
| | | private Integer isConsume; |
New file |
| | |
| | | package com.ruoyi.management.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("修改转移库批次数据传输对象") |
| | | public class UpdateQrCodeNumDTO { |
| | | // 入库id |
| | | private Long id; |
| | | // 二维码生成数量 |
| | | private Integer erwmNum; |
| | | } |
New file |
| | |
| | | package com.ruoyi.management.domain.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.ruoyi.management.domain.SlVolumeProductionZy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("修改转移生成二维码数量") |
| | | public class UpdateZyQrCodeDTO { |
| | | |
| | | private List<UpdateQrCodeNumDTO> list; |
| | | } |
| | |
| | | public class VolumeProductionRkgCodeQuery extends BasePage { |
| | | @ApiModelProperty("入库管理主表id") |
| | | private Long VolumeProductionRkglId; |
| | | @ApiModelProperty("物资名称") |
| | | private String goodsMaterialsName; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.management.domain.dto; |
| | | |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("转移管理二维码生成查询传输对象") |
| | | public class VolumeProductionZyglCodeQuery extends BasePage { |
| | | @ApiModelProperty("转移管理主表id") |
| | | private Long VolumeProductionZyglId; |
| | | @ApiModelProperty("楼层") |
| | | private Integer managementNumber; |
| | | @ApiModelProperty("货架id") |
| | | private Long shelfId; |
| | | } |
New file |
| | |
| | | package com.ruoyi.management.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("添加出库DTO") |
| | | public class ZyRkDTO { |
| | | private Long ckglId; |
| | | private String authorizationUrl; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.management.domain.vo; |
| | | |
| | | import com.ruoyi.management.domain.SlGoodsShelf; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "根据仓库获取楼层数量和所有货架数组", description = " 根据仓库获取楼层数量和所有货架数组") |
| | | public class GetNumberAndShelfVO { |
| | | @ApiModelProperty("楼层1 代表有一层 2代表有 一层 和二层") |
| | | private Integer managementNumber; |
| | | |
| | | @ApiModelProperty("物资名称") |
| | | private List<SlGoodsShelf> list; |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("在库数量") |
| | | private Long zkNum; |
| | | |
| | | @ApiModelProperty("是否匹配 1未匹配,已匹配") |
| | | @ApiModelProperty("是否匹配 1匹配,2未匹配") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("货架名称") |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value = "通过出库管理拿出库物资的数据对象", description = "通过出库管理拿出库物资的数据对象") |
| | |
| | | |
| | | @ApiModelProperty("归还数量") |
| | | private Integer guihNum; |
| | | @ApiModelProperty("归还时间") |
| | | private Date ghTime; |
| | | @ApiModelProperty("是否归还 1否2是") |
| | | private Integer isGh; |
| | | |
| | | @ApiModelProperty("是否匹配 1未匹配,已匹配") |
| | | private String type; |
New file |
| | |
| | | package com.ruoyi.management.domain.vo; |
| | | |
| | | import com.ruoyi.management.domain.SlGoodsShelf; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "根据盘点id获取盘点信息", description = " 根据盘点id获取盘点信息") |
| | | public class PdInfoVO { |
| | | @ApiModelProperty("仓库名称") |
| | | private String managementName; |
| | | @ApiModelProperty("盘点人") |
| | | private String pdName; |
| | | @ApiModelProperty("盘点时间") |
| | | private String pdTime; |
| | | |
| | | } |
| | |
| | | /** 所属街道code */ |
| | | @ApiModelProperty("所属街道code") |
| | | private String townCode; |
| | | @ApiModelProperty("仓库等级") |
| | | private Integer grade; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("1.待审核,2 已拒绝,3 审核通过,4 已完成,5 已取消") |
| | | private Integer presentState; |
| | | @ApiModelProperty("拒绝理由") |
| | | private String reasonsRefusal; |
| | | |
| | | @ApiModelProperty("1 待管理员审核,2 待主管审核,3 待主任审核,4 待出库,5 待从重新提交,6 已出库, 7已完成, 8,已取消") |
| | | private Integer auditStatus; |
| | | @ApiModelProperty("主任id 逗号分割") |
| | | private String zhuren; |
| | | @ApiModelProperty("管理员id 逗号分割") |
| | | private String guanliyuan; |
| | | @ApiModelProperty("主管id 逗号分割") |
| | | private String zhuguan; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("审批单") |
| | | private String authorization; |
| | | @ApiModelProperty("拒绝理由") |
| | | private String reason; |
| | | |
| | | @ApiModelProperty("主任id 逗号分割") |
| | | private String zhuren; |
| | | @ApiModelProperty("管理员id 逗号分割") |
| | | private String guanliyuan; |
| | | @ApiModelProperty("主管id 逗号分割") |
| | | private String zhuguan; |
| | | |
| | | } |
| | |
| | | private List<String> number; |
| | | @ApiModelProperty("货架列表") |
| | | private List<SlGoodsShelf> goodsShelfList; |
| | | @ApiModelProperty("主任id 逗号分割") |
| | | private String zhuren; |
| | | @ApiModelProperty("管理员id 逗号分割") |
| | | private String guanliyuan; |
| | | @ApiModelProperty("主管id 逗号分割") |
| | | private String zhuguan; |
| | | } |
| | |
| | | @JsonInclude(JsonInclude.Include.ALWAYS) |
| | | private String phonenumber; |
| | | |
| | | private Integer id; |
| | | private String id; |
| | | |
| | | @ApiModelProperty("仓库名称") |
| | | @JsonInclude(JsonInclude.Include.ALWAYS) |
| | |
| | | package com.ruoyi.management.domain.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.management.domain.SlGoodsShelf; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "二维码生成数量", description = "二维码生成数量") |
| | |
| | | @ApiModelProperty("1 是非消耗,2是消耗 ") |
| | | private Integer isConsume; |
| | | |
| | | @ApiModelProperty("入库数量") |
| | | private Long rkNum; |
| | | @ApiModelProperty("转移数量") |
| | | private Long zyNum; |
| | | |
| | | @ApiModelProperty("二维码数量") |
| | | @ApiModelProperty("生成二维码数量") |
| | | @TableField("erwm_num") |
| | | private Integer erwmNum; |
| | | |
| | | @ApiModelProperty("物资id") |
| | | private Long materialsId; |
| | | @ApiModelProperty("转移管理新生成入库编号") |
| | | private Long scrkId; |
| | | @ApiModelProperty("入库数量") |
| | | private Integer rkNum; |
| | | |
| | | } |
| | |
| | | public class goodsMaterialsNmVO { |
| | | @ApiModelProperty("物资名称") |
| | | private String goodsMaterialsName; |
| | | @ApiModelProperty("物资id") |
| | | private Long goodsMaterialsId; |
| | | |
| | | @ApiModelProperty("物资数") |
| | | private Long goodsMaterialsNum; |
| | | private Integer goodsMaterialsNum; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.management.domain.InventoriesSupplies; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Mapper |
| | | public interface InventoriesSuppliesMapper extends BaseMapper<InventoriesSupplies> { |
| | | |
| | | InventoriesSupplies getById1(@Param("id") Long suppliesId); |
| | | |
| | | } |
| | |
| | | import com.ruoyi.management.domain.SlGoodsMaterials; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Mapper |
| | | public interface SlGoodsMaterialsMapper extends BaseMapper<SlGoodsMaterials> { |
| | | |
| | | void update1(@Param("req") SlGoodsMaterials byId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.management.domain.InventoriesSuppliesInfo; |
| | | import com.ruoyi.management.domain.dto.ADDPdDTO; |
| | | import com.ruoyi.management.domain.dto.InventoriesSuppliesInfoDTO; |
| | | import com.ruoyi.management.domain.dto.InventoriesSuppliesInfoQuery; |
| | | import com.ruoyi.management.domain.vo.InventoriesSuppliesInfoVO; |
| | |
| | | |
| | | InventoriesSuppliesInfo getInventoriesSuppliesInfo(InventoriesSuppliesInfoDTO inventoriesSuppliesInfoDTO); |
| | | |
| | | void submitInventoriesSuppliesInfo(@RequestBody InventoriesSuppliesInfoDTO inventoriesSuppliesInfoDTO); |
| | | String submitInventoriesSuppliesInfo(@RequestBody ADDPdDTO dto); |
| | | |
| | | void accomplishInventoriesSuppliesInfo(@RequestBody InventoriesSuppliesInfoDTO inventoriesSuppliesInfoDTO); |
| | | |
| | |
| | | package com.ruoyi.management.service; |
| | | |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.management.domain.SlEquipment; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.management.domain.dto.SlEquipmentDTO; |
| | |
| | | public interface SlEquipmentService extends IService<SlEquipment> { |
| | | PageDTO<SlEquipmentVO> getSlEquipmentList(@RequestBody SlEquipmentQuery slEquipmentQuery); |
| | | |
| | | void addSlEquipment(@RequestBody SlEquipmentDTO slEquipmentDTO); |
| | | AjaxResult addSlEquipment(@RequestBody SlEquipmentDTO slEquipmentDTO); |
| | | |
| | | SlEquipmentVO getSlEquipmentOne(@RequestBody SlEquipmentDTO slEquipmentDTO); |
| | | |
| | |
| | | * @since 2024-06-25 |
| | | */ |
| | | public interface SlStoreManagementImgService extends IService<SlStoreManagementImg> { |
| | | void addStoreManagementimg(@RequestBody StoreManagementimgDTO storeManagementimgDTO); |
| | | String addStoreManagementimg(@RequestBody StoreManagementimgDTO storeManagementimgDTO); |
| | | |
| | | SlStoreManagementImg getStoreManagementimgOne(@RequestBody StoreManagementimgQuery storeManagementimgQuery); |
| | | } |
| | |
| | | package com.ruoyi.management.service; |
| | | |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.management.domain.SlStoreManagement; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.management.domain.dto.QStoreManagementQuery; |
| | |
| | | |
| | | PageDTO<SlStoreManagement> getStoreManagementList(StoreManagementQuery storeManagementQuery); |
| | | |
| | | void addStoreManagement(StoreManagementDTO storeManagementDTO); |
| | | AjaxResult addStoreManagement(StoreManagementDTO storeManagementDTO); |
| | | |
| | | List<SlStoreManagement> QueryStoreManagementList(QStoreManagementQuery StoreManagementQuery); |
| | | |
| | |
| | | PageDTO<ManagementimgSlVolumeProductionCkVO> getManagementimgSlVolumeProductionCkList(SlGoodsMaterialsSlVolumeProductionRkQuery slGoodsMaterialsSlVolumeProductionRkQuery); |
| | | |
| | | void updSlVolumeProductionCk(List<AddSlVolumeProductionCkDTO>slVolumeProductionCkDTO); |
| | | void updSlVolumeProductionCk1(List<AddSlVolumeProductionCkDTO>slVolumeProductionCkDTO); |
| | | void addSlVolumeProductionCk(List<AddSlVolumeProductionCkDTO> addSlVolumeProductionCkDTO); |
| | | |
| | | |
| | |
| | | |
| | | PageDTO<getVolumeProductionRkgCodeVO> getVolumeProductionRkgCode(VolumeProductionRkgCodeQuery volumeProductionRkgCodeQuery); |
| | | List<QRCodeVO> codeInfo(Long id) throws Exception; |
| | | List<QRCodeVO> codeInfo1(Long id,Long zyglId) throws Exception; |
| | | |
| | | PageDTO<ManagementimgVolumeProductionRkVO> getroductionRkList(umeProductionRkQuery meProductionRkQuery); |
| | | |
| | |
| | | |
| | | VolumeProductionZyglInfoVO getVolumeProductionzZyglnfo(ManagementimgVolumeProductionZyQuery managementimgVolumeProductionZyQuery); |
| | | |
| | | VolumeProductionZyglInventoryVO getVolumeProductionZyglnventory( Integer id); |
| | | VolumeProductionZyglInventoryVO getVolumeProductionZyglnventory( String id); |
| | | |
| | | void zy(Integer id); |
| | | void zy(Long id,String authorizationUrl); |
| | | } |
| | |
| | | goodsMaterialsNmVO goodsMaterialsNmVO=new goodsMaterialsNmVO(); |
| | | String key = entry.getKey(); |
| | | goodsMaterialsNmVO.setGoodsMaterialsName(key); |
| | | goodsMaterialsNmVO.setGoodsMaterialsId(entry.getValue().get(0).getId()); |
| | | List<homeVO> value = entry.getValue(); |
| | | // 处理键和值 |
| | | Long a=0L; |
| | | int a=0; |
| | | for (homeVO vo : value) { |
| | | if (vo.getGoodsMaterialsNum()== null){ |
| | | vo.setGoodsMaterialsNum(0L); |
| | | } |
| | | a=a+vo.getGoodsMaterialsNum(); |
| | | a=a+vo.getGoodsMaterialsNum().intValue(); |
| | | } |
| | | goodsMaterialsNmVO.setGoodsMaterialsNum(a); |
| | | goodsMaterialsNmVOS.add(goodsMaterialsNmVO); |
| | |
| | | goodsMaterialsNmVO goodsMaterialsNmVO1=new goodsMaterialsNmVO(); |
| | | String key = entry.getKey(); |
| | | goodsMaterialsNmVO1.setGoodsMaterialsName(key); |
| | | goodsMaterialsNmVO1.setGoodsMaterialsId(entry.getValue().get(0).getId()); |
| | | List<homeVO> value = entry.getValue(); |
| | | // 处理键和值 |
| | | Long a=0L; |
| | | int a=0; |
| | | for (homeVO vo : value) { |
| | | if (vo.getGoodsMaterialsNum()== null){ |
| | | vo.setGoodsMaterialsNum(0L); |
| | | } |
| | | a=a+vo.getGoodsMaterialsNum(); |
| | | a=a+vo.getGoodsMaterialsNum().intValue(); |
| | | } |
| | | goodsMaterialsNmVO1.setGoodsMaterialsNum(a); |
| | | goodsMaterialsNmVOS1.add(goodsMaterialsNmVO1); |
| | | } |
| | | |
| | | homeStatisticsVO.setGoodsMaterialsxiaohao(goodsMaterialsNmVOS); |
| | | |
| | | homeStatisticsVO.setGoodsMaterialsxiaohao(goodsMaterialsNmVOS1); |
| | | return homeStatisticsVO; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.management.domain.*; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.management.domain.dto.ADDPdDTO; |
| | | import com.ruoyi.management.domain.dto.InventoriesSuppliesInfoDTO; |
| | | import com.ruoyi.management.domain.dto.InventoriesSuppliesInfoQuery; |
| | | import com.ruoyi.management.domain.vo.InventoriesSuppliesInfoVO; |
| | | import com.ruoyi.management.domain.vo.InventoriesSuppliesVO; |
| | | import com.ruoyi.management.mapper.*; |
| | | import com.ruoyi.management.service.InventoriesSuppliesInfoService; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.model.LoginUser; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.security.Security; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | |
| | | @Resource |
| | | private SlGoodsShelfMapper slGoodsShelfMapper; |
| | | @Autowired |
| | | private InventoriesSuppliesServiceImpl inventoriesSuppliesService; |
| | | @Override |
| | | public PageDTO<InventoriesSuppliesInfoVO> inventoriesSuppliesInfoService(InventoriesSuppliesInfoQuery inventoriesSuppliesInfoQuery) { |
| | | |
| | | Page<InventoriesSuppliesInfo> page = new Page<>(inventoriesSuppliesInfoQuery.getPageCurr(), inventoriesSuppliesInfoQuery.getPageSize()); |
| | | LambdaQueryWrapper< InventoriesSuppliesInfo> wrapper1= Wrappers.lambdaQuery(); |
| | | wrapper1.eq(InventoriesSuppliesInfo::getSuppliesId, inventoriesSuppliesInfoQuery.getSuppliesId()); |
| | | wrapper1.eq( InventoriesSuppliesInfo::getDelFlag,0); |
| | | wrapper1.orderByDesc(InventoriesSuppliesInfo::getCreateTime); |
| | | |
| | | wrapper1.orderByDesc(InventoriesSuppliesInfo::getType); |
| | | Page<InventoriesSuppliesInfo> page2 = this.page(page, wrapper1); |
| | | PageDTO<InventoriesSuppliesInfoVO> slGoodsMaterialsVO = PageDTO.of(page2, InventoriesSuppliesInfoVO.class); |
| | |
| | | InventoriesSuppliesInfo byId = this.getById(m.getId()); |
| | | byId.setSuppliesNum(m.getSuppliesNum()); |
| | | this.updateById(byId); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void submitInventoriesSuppliesInfo(InventoriesSuppliesInfoDTO inventoriesSuppliesInfoDTO) { |
| | | LambdaQueryWrapper< InventoriesSuppliesInfo> wrapper1= Wrappers.lambdaQuery(); |
| | | wrapper1.eq(InventoriesSuppliesInfo::getSuppliesId, inventoriesSuppliesInfoDTO.getSuppliesId()); |
| | | wrapper1.eq( InventoriesSuppliesInfo::getDelFlag,0); |
| | | List<InventoriesSuppliesInfo> page2 = this.list(wrapper1); |
| | | for (InventoriesSuppliesInfo page:page2){ |
| | | if (page.getZkNum()!=page.getSuppliesNum()){ |
| | | page.setType(2); |
| | | public String submitInventoriesSuppliesInfo(ADDPdDTO dto) { |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | // 添加主表 |
| | | InventoriesSupplies inventoriesSupplies = new InventoriesSupplies(); |
| | | inventoriesSupplies.setMaterialsId(dto.getManagementId()); |
| | | inventoriesSupplies.setPdrId(loginUser.getUserid()); |
| | | inventoriesSupplies.setPdTime(new Date()); |
| | | inventoriesSupplies.setPdrName(loginUser.getUsername()); |
| | | inventoriesSupplies.setCreateTime(new Date()); |
| | | inventoriesSupplies.setDelFlag("2"); |
| | | inventoriesSuppliesService.save(inventoriesSupplies); |
| | | for (InventoriesSuppliesInfoDTO temp : dto.getList()) { |
| | | InventoriesSuppliesInfo res = new InventoriesSuppliesInfo(); |
| | | res.setRkId(temp.getRkId()); |
| | | res.setSuppliesId(inventoriesSupplies.getId()); |
| | | res.setSuppliesNum(temp.getSuppliesNum()); |
| | | res.setZkNum(temp.getZkNum()); |
| | | res.setCreateTime(new Date()); |
| | | if (!Objects.equals(temp.getZkNum(), temp.getSuppliesNum())){ |
| | | res.setType(2); |
| | | }else{ |
| | | res.setType(1); |
| | | } |
| | | this.updateById(page); |
| | | this.save(res); |
| | | return inventoriesSupplies.getId().toString(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public void accomplishInventoriesSuppliesInfo(InventoriesSuppliesInfoDTO inventoriesSuppliesInfoDTO) { |
| | | |
| | | InventoriesSupplies byId = inventoriesSuppliesService.getById1(inventoriesSuppliesInfoDTO.getSuppliesId()); |
| | | byId.setDelFlag("0"); |
| | | inventoriesSuppliesService.updateById(byId); |
| | | LambdaQueryWrapper< InventoriesSuppliesInfo> wrapper1= Wrappers.lambdaQuery(); |
| | | wrapper1.eq(InventoriesSuppliesInfo::getSuppliesId, inventoriesSuppliesInfoDTO.getSuppliesId()); |
| | | wrapper1.eq(InventoriesSuppliesInfo::getType, 2); |
| | | wrapper1.eq( InventoriesSuppliesInfo::getDelFlag,0); |
| | | wrapper1.eq( InventoriesSuppliesInfo::getDelFlag,"0"); |
| | | wrapper1.orderByDesc(InventoriesSuppliesInfo::getType); |
| | | List<InventoriesSuppliesInfo> page2 = this.list(wrapper1); |
| | | for (InventoriesSuppliesInfo page:page2){ |
| | | SlVolumeProductionRk slVolumeProductionRk = slVolumeProductionRkMapper.selectById(page.getRkId()); |
| | | slVolumeProductionRk.setRepertoryZhai(page.getSuppliesNum()); |
| | | slVolumeProductionRkMapper.updateById(slVolumeProductionRk); |
| | | |
| | | |
| | | LambdaQueryWrapper<ManagementGoodsMaterials> wrapper2 = Wrappers.lambdaQuery(); |
| | | wrapper2.eq(ManagementGoodsMaterials::getGoodsMaterialsId,slVolumeProductionRk.getMaterialsId()); |
| | | wrapper2.eq(ManagementGoodsMaterials::getManagementId,slVolumeProductionRk.getManagementId()); |
| | | wrapper2.eq(ManagementGoodsMaterials::getDelFlag, 0); |
| | | ManagementGoodsMaterials managementGoodsMaterials = managementGoodsMaterialsMapper.selectOne(wrapper2); |
| | | if (managementGoodsMaterials!=null){ |
| | | long l = page.getZkNum() - page.getSuppliesNum(); |
| | | if (l>0){ |
| | | managementGoodsMaterials.setRepertoryZhai(page.getSuppliesNum()); |
| | | }else if (l<0){ |
| | | managementGoodsMaterials.setRepertoryYishi(Integer.valueOf(String.valueOf(l))); |
| | | } |
| | | managementGoodsMaterials.setCheckNum(Integer.valueOf(String.valueOf(page.getSuppliesNum()))); |
| | | managementGoodsMaterialsMapper.updateById(managementGoodsMaterials); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.enums.ClientTypeEnum; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.management.domain.InventoriesSupplies; |
| | | import com.ruoyi.management.domain.*; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.management.domain.SlGoodsShelf; |
| | | import com.ruoyi.management.domain.SlStoreManagement; |
| | | import com.ruoyi.management.domain.SlVolumeProductionRk; |
| | | import com.ruoyi.management.domain.dto.InventoriesSuppDTO; |
| | | import com.ruoyi.management.domain.dto.InventoriesSuppliesQuery; |
| | | import com.ruoyi.management.domain.dto.ScanCodesDTO; |
| | |
| | | import com.ruoyi.management.mapper.SlStoreManagementMapper; |
| | | import com.ruoyi.management.mapper.SlVolumeProductionRkMapper; |
| | | import com.ruoyi.management.service.InventoriesSuppliesService; |
| | | import com.ruoyi.management.service.SlGoodsMaterialsService; |
| | | import com.ruoyi.management.service.SlGoodsShelfService; |
| | | import com.ruoyi.management.service.SlVolumeProductionRkService; |
| | | import com.ruoyi.system.api.constants.NotificationTypeConstant; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.domain.WebsocketMessageDTO; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import io.swagger.models.auth.In; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Resource |
| | | private SlVolumeProductionRkMapper slVolumeProductionRkMapper; |
| | | |
| | | @Autowired |
| | | private SlGoodsMaterialsService slGoodsMaterialsService; |
| | | @Autowired |
| | | private SlGoodsShelfService slGoodsShelfService; |
| | | @Autowired |
| | | private InventoriesSuppliesMapper inventoriesSuppliesMapper; |
| | | private static final ObjectMapper objectMapper = new ObjectMapper(); |
| | | |
| | | @Override |
| | |
| | | public void scanCodes(String rkNumber) { |
| | | LambdaQueryWrapper< SlVolumeProductionRk> wrapper1= Wrappers.lambdaQuery(); |
| | | wrapper1.eq(SlVolumeProductionRk::getRkNumber,rkNumber); |
| | | wrapper1.eq(SlVolumeProductionRk::getDelFlag,0); |
| | | wrapper1.eq(SlVolumeProductionRk::getDelFlag,"0"); |
| | | wrapper1.orderByDesc(SlVolumeProductionRk::getCreateTime); |
| | | SlVolumeProductionRk page2 = slVolumeProductionRkMapper.selectOne(wrapper1); |
| | | if (page2.getSmerwmNum()>0){ |
| | | Integer i=page2.getSmerwmNum()-1; |
| | | page2.setSmerwmNum(i); |
| | | slVolumeProductionRkMapper.updateById(page2); |
| | | } |
| | | // if (page2.getSmerwmNum()<page2.getErwmNum()){ |
| | | // Integer i=page2.getSmerwmNum()+1; |
| | | // page2.setSmerwmNum(i); |
| | | // slVolumeProductionRkMapper.updateById(page2); |
| | | // } |
| | | SlGoodsMaterials byId = slGoodsMaterialsService.getById(page2.getMaterialsId()); |
| | | |
| | | page2.setGoodsMaterialsName(byId.getGoodsMaterialsName()); |
| | | page2.setIsConsume(byId.getIsConsume()); |
| | | page2.setManagementNumber(page2.getStoreManagementNumber()); |
| | | page2.setShelfName(slGoodsShelfService.getById(page2.getShelfId()).getGoodsShelfName()); |
| | | SlVolumeProductionRkVO slVolumeProductionRkVO = new SlVolumeProductionRkVO(); |
| | | BeanUtils.copyProperties(page2,slVolumeProductionRkVO); |
| | | slVolumeProductionRkVO.setId(page2.getId().toString()); |
| | | // slVolumeProductionRkVO.setVolumeProductionRkglId(page2.getVolumeProductionRkglId().toString()); |
| | | slVolumeProductionRkVO.setMaterialsId(page2.getMaterialsId().toString()); |
| | | slVolumeProductionRkVO.setManagementId(page2.getManagementId().toString()); |
| | | slVolumeProductionRkVO.setShelfId(page2.getShelfId().toString()); |
| | | |
| | | Map<String, Object> map = new ConcurrentHashMap<>(); |
| | | map.put("notification_type", NotificationTypeConstant.SCANCODES); |
| | | map.put("SlVolumeProductionRk",page2); |
| | | map.put("SlVolumeProductionRk",slVolumeProductionRkVO); |
| | | String msg = null; |
| | | try { |
| | | msg = objectMapper.writeValueAsString(map); |
| | |
| | | } |
| | | |
| | | |
| | | public InventoriesSupplies getById1(Long suppliesId) { |
| | | return inventoriesSuppliesMapper.getById1(suppliesId); |
| | | } |
| | | } |
| | |
| | | if (managementGoodsMaterialsQuery.getStoreManagementName()!=null&&managementGoodsMaterialsQuery.getStoreManagementName()!=""){ |
| | | wrapper.like(SlStoreManagement::getStoreManagementName,managementGoodsMaterialsQuery.getStoreManagementName()); |
| | | } |
| | | if (managementGoodsMaterialsQuery.getStoreManagementGrade()!=null){ |
| | | wrapper.eq(SlStoreManagement::getStoreManagementGrade,managementGoodsMaterialsQuery.getStoreManagementGrade()); |
| | | } |
| | | if (managementGoodsMaterialsQuery.getStoreManagementNo()!=null&&managementGoodsMaterialsQuery.getStoreManagementNo()!=""){ |
| | | wrapper.eq(SlStoreManagement::getStoreManagementNo,managementGoodsMaterialsQuery.getStoreManagementNo()); |
| | | } |
| | |
| | | SlGoodsMaterialsList = slGoodsMaterials.stream().map(SlGoodsMaterials::getId) |
| | | .collect(Collectors.toSet()); |
| | | |
| | | |
| | | Page<ManagementGoodsMaterials> page = new Page<>(managementGoodsMaterialsQuery.getPageCurr(), managementGoodsMaterialsQuery.getPageSize()); |
| | | LambdaQueryWrapper< ManagementGoodsMaterials> wrapper3= Wrappers.lambdaQuery(); |
| | | |
| | |
| | | }else{ |
| | | slVolumeProductionIdList=new HashSet<>(); |
| | | slVolumeProductionIdList.add(0L); |
| | | wrapper3.in(ManagementGoodsMaterials::getGoodsMaterialsId,slVolumeProductionIdList); |
| | | wrapper3.in(ManagementGoodsMaterials::getManagementId,slVolumeProductionIdList); |
| | | } |
| | | if (SlGoodsMaterialsList.size()>0){ |
| | | wrapper3.in(ManagementGoodsMaterials::getGoodsMaterialsId,SlGoodsMaterialsList); |
| | |
| | | SlGoodsMaterials slGoodsMaterials1 = slGoodsMaterialsMapper.selectById(li.getGoodsMaterialsId()); |
| | | li.setGoodsMaterialsName(slGoodsMaterials1.getGoodsMaterialsName()); |
| | | li.setIsConsume(slGoodsMaterials1.getIsConsume()); |
| | | li.setRepertory(slGoodsMaterials1.getRepertory()); |
| | | |
| | | SlStoreManagement slStoreManagement = slStoreManagementMapper.selectById(li.getManagementId()); |
| | | li.setProvinceCode(slStoreManagement.getProvinceCode()); |
| | | li.setStoreManagementName(slStoreManagement.getStoreManagementName()); |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.management.domain.*; |
| | | |
| | |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | |
| | | wrapper.eq( SlAuditRecord::getDelFlag,0); |
| | | wrapper.orderByAsc(SlAuditRecord::getType); |
| | | List<SlAuditRecord> page1 = this.list(wrapper); |
| | | for (int i = 0; i < page1.size(); i++) { |
| | | page1.get(i).setIsPlatform(0); |
| | | SlAudit slAudit = slAuditMapper.selectById(page1.get(i).getAuditId()); |
| | | if (slAudit!=null){ |
| | | String shenhId = slAudit.getAuditUserId(); |
| | | if (StringUtils.hasLength(shenhId)){ |
| | | String[] split = shenhId.split(","); |
| | | // 取最后一个 |
| | | shenhId = split[split.length - 1]; |
| | | SysUser data = sysUserClient.getSysUser(Long.valueOf(shenhId)).getData(); |
| | | if (data!=null){ |
| | | // 判断当前审核人是不是平台管理员 |
| | | if (data.getUserType().equals("00")){ |
| | | page1.get(i).setIsPlatform(1); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (page1.get(i).getState() == 3){ |
| | | assert slAudit != null; |
| | | page1.get(i).setRefuseReason(slAudit.getCause()); |
| | | } |
| | | } |
| | | |
| | | return page1; |
| | | } |
| | | |
| | |
| | | SlAuditRecord byId = this.getOne(new QueryWrapper<SlAuditRecord>() |
| | | .eq("type", auditRecordDTO.getType()) |
| | | .eq("audit_id", auditRecordDTO.getAuditId())); |
| | | String auditUserId = slAudit.getAuditUserId(); |
| | | if (StringUtils.hasLength(auditUserId)){ |
| | | slAudit.setAuditUserId(slAudit.getAuditUserId()+","+SecurityUtils.getUserId()); |
| | | }else{ |
| | | slAudit.setAuditUserId(SecurityUtils.getUserId()+""); |
| | | } |
| | | Long userid = SecurityUtils.getUserId(); |
| | | SysUser data = sysUserClient.getSysUser(userid).getData(); |
| | | if (auditRecordDTO.getState()==2){ |
| | |
| | | package com.ruoyi.management.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | |
| | | |
| | | @Override |
| | | public PageDTO<SlAuditVO> getslAuditList(AuditRecordListQuery auditRecordListQuery) { |
| | | List<Long> rkglIds = new ArrayList<>(); |
| | | List<Long> ckglIds = new ArrayList<>(); |
| | | List<Long> zyglIds = new ArrayList<>(); |
| | | List<Long> auditIds = new ArrayList<>(); |
| | | Long userid = SecurityUtils.getUserId(); |
| | | SysUser data = sysUserClient.getSysUser(userid).getData(); |
| | | getVolumeProductionRkQuery getVolumeProductionRkQuer=new getVolumeProductionRkQuery(); |
| | |
| | | goodsSkuIdList1.add(0L); |
| | | wrapper.in(SlAudit::getSysId,goodsSkuIdList1); |
| | | } |
| | | |
| | | switch (auditRecordListQuery.getType()){ |
| | | case 1: |
| | | rkglIds = slVolumeProductionRkglMapper.selectList(new QueryWrapper<SlVolumeProductionRkgl>() |
| | | .ne("audit_status", 7)).stream().map(SlVolumeProductionRkgl::getId).collect(Collectors.toList()); |
| | | wrapper.in(SlAudit::getRkId,rkglIds); |
| | | if (!data.getUserType().equals("00")){ |
| | | wrapper.in(SlAudit::getShenhId,userid); |
| | | // 只查询相关的审核 |
| | | auditIds = slAuditRecordMapper.selectList(new QueryWrapper<SlAuditRecord>() |
| | | .like("shenh_id", data.getUserId())).stream().map(SlAuditRecord::getAuditId).collect(Collectors.toList()); |
| | | wrapper.in(SlAudit::getId,auditIds); |
| | | } |
| | | |
| | | break; |
| | | case 2: |
| | | ckglIds = slVolumeProductionCKglMapper.selectList(new QueryWrapper<SlVolumeProductionCkgl>() |
| | | .ne("audit_status", 8)).stream().map(SlVolumeProductionCkgl::getId).collect(Collectors.toList()); |
| | | wrapper.in(SlAudit::getRkId,ckglIds); |
| | | if (!data.getUserType().equals("00")){ |
| | | // 只查询相关的审核 |
| | | auditIds = slAuditRecordMapper.selectList(new QueryWrapper<SlAuditRecord>() |
| | | .like("shenh_id", data.getUserId())).stream().map(SlAuditRecord::getAuditId).collect(Collectors.toList()); |
| | | wrapper.in(SlAudit::getId,auditIds); |
| | | } |
| | | |
| | | break; |
| | | case 3: |
| | | zyglIds = slVolumeProductionZyglMapper.selectList(new QueryWrapper<SlVolumeProductionZygl>() |
| | | .ne("audit_status", 7)).stream().map(SlVolumeProductionZygl::getId).collect(Collectors.toList()); |
| | | wrapper.in(SlAudit::getRkId,zyglIds); |
| | | if (!data.getUserType().equals("00")){ |
| | | // 只查询相关的审核 |
| | | auditIds = slAuditRecordMapper.selectList(new QueryWrapper<SlAuditRecord>() |
| | | .like("shenh_id", data.getUserId())).stream().map(SlAuditRecord::getAuditId).collect(Collectors.toList()); |
| | | wrapper.in(SlAudit::getId,auditIds); |
| | | } |
| | | |
| | | break; |
| | | } |
| | | wrapper.eq(SlAudit::getType,auditRecordListQuery.getType()); |
| | | wrapper.eq(SlAudit::getDelFlag,0); |
| | | wrapper.orderByDesc(SlAudit::getCreateTime); |
| | | Page<SlAudit> page1 = this.page(page, wrapper); |
| | | |
| | | PageDTO<SlAuditVO> slEquipmentVOPageDTO = PageDTO.of(page1, SlAuditVO.class); |
| | | List<SlAuditVO> list = slEquipmentVOPageDTO.getList(); |
| | | for (SlAuditVO sl:list){ |
| | |
| | | package com.ruoyi.management.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.management.domain.SlEquipment; |
| | | import com.ruoyi.management.domain.SlGoodsMaterials; |
| | | import com.ruoyi.management.domain.SlStoreManagement; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | if(slEquipmentQuery.getEquipmentName()!=null&&slEquipmentQuery.getEquipmentName()!=""){ |
| | | wrapper.like(SlEquipment::getEquipmentName,slEquipmentQuery.getEquipmentName()); |
| | | } |
| | | if(slEquipmentQuery.getEquipmentName()!=null&&slEquipmentQuery.getType()!=0){ |
| | | if(slEquipmentQuery.getType()!=null&&slEquipmentQuery.getType()!=0){ |
| | | wrapper.eq(SlEquipment::getType,slEquipmentQuery.getType()); |
| | | } |
| | | wrapper.eq( SlEquipment::getDelFlag,0); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void addSlEquipment(SlEquipmentDTO slEquipmentDTO) { |
| | | public AjaxResult addSlEquipment(SlEquipmentDTO slEquipmentDTO) { |
| | | |
| | | if (slEquipmentDTO.getId()==null){ |
| | | List<SlEquipment> list = this.list(new QueryWrapper<SlEquipment>() |
| | | .eq("type", slEquipmentDTO.getType()) |
| | | .eq("equipment_num", slEquipmentDTO.getEquipmentNum())); |
| | | if (!list.isEmpty()){ |
| | | return AjaxResult.error("当前设备已存在相同设备编号"); |
| | | } |
| | | SlEquipment slEquipment=new SlEquipment(); |
| | | slEquipment.setEquipmentName(slEquipmentDTO.getEquipmentName()); |
| | | slEquipment.setEquipmentNum(slEquipmentDTO.getEquipmentNum()); |
| | |
| | | this.save(slEquipment); |
| | | }else{ |
| | | SlEquipment byId = this.getById(slEquipmentDTO.getId()); |
| | | List<SlEquipment> list = this.list(new QueryWrapper<SlEquipment>() |
| | | .eq("type", slEquipmentDTO.getType()) |
| | | .ne("id",slEquipmentDTO.getId()) |
| | | .eq("equipment_num", slEquipmentDTO.getEquipmentNum())); |
| | | if (!list.isEmpty()){ |
| | | return AjaxResult.error("当前设备已存在相同设备编号"); |
| | | } |
| | | if (slEquipmentDTO.getEquipmentName()!=null){ |
| | | byId.setEquipmentName(slEquipmentDTO.getEquipmentName()); |
| | | } |
| | |
| | | } |
| | | this.updateById(byId); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | List<Long> arr=new ArrayList<>(); |
| | | wrapper.eq(SlStoreManagement::getDelFlag,0); |
| | | wrapper.eq(SlStoreManagement::getAdministratorId,seBei.getUserId()); |
| | | List<SlStoreManagement> page = slStoreManagementMapper.selectList(wrapper); |
| | | for (SlStoreManagement a:page){ |
| | | List<String> list = Arrays.asList(a.getAdministratorId().split(",")); |
| | | if (list.contains(seBei.getUserId().toString())){ |
| | | arr.add(a.getId()); |
| | | } |
| | | } |
| | | LambdaQueryWrapper< SlStoreManagement> wrapper1= Wrappers.lambdaQuery(); |
| | | wrapper1.eq(SlStoreManagement::getDelFlag,0); |
| | | wrapper1.eq(SlStoreManagement::getCompetentId,seBei.getUserId()); |
| | | List<SlStoreManagement> page1 = slStoreManagementMapper.selectList(wrapper1); |
| | | for (SlStoreManagement a1:page1){ |
| | | List<String> list = Arrays.asList(a1.getCompetentId().split(",")); |
| | | if (list.contains(seBei.getUserId().toString())){ |
| | | arr.add(a1.getId()); |
| | | } |
| | | } |
| | | LambdaQueryWrapper< SlStoreManagement> wrapper2= Wrappers.lambdaQuery(); |
| | | wrapper2.eq(SlStoreManagement::getDelFlag,0); |
| | | wrapper2.eq(SlStoreManagement::getDirectorId,seBei.getUserId()); |
| | | List<SlStoreManagement> page2 = slStoreManagementMapper.selectList(wrapper2); |
| | | for (SlStoreManagement a2:page2){ |
| | | List<String> list = Arrays.asList(a2.getDirectorId().split(",")); |
| | | if (list.contains(seBei.getUserId().toString())){ |
| | | arr.add(a2.getId()); |
| | | } |
| | | } |
| | | Set<Long> set = new HashSet<>(arr); |
| | | arr.clear(); |
| | | arr.addAll(set); |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.management.service.SlVolumeProductionRkService; |
| | | import io.micrometer.core.instrument.binder.BaseUnits; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | |
| | | if (slGoodsMaterialsDTO.getIsConsume()!=null){ |
| | | byId.setIsConsume(slGoodsMaterialsDTO.getIsConsume()); |
| | | } |
| | | this.updateById(byId); |
| | | byId.setId(slGoodsMaterialsDTO.getId()); |
| | | byId.setGoodsMaterialsName(slGoodsMaterialsDTO.getGoodsMaterialsName()); |
| | | byId.setIsConsume(slGoodsMaterialsDTO.getIsConsume()); |
| | | byId.setRepertory(slGoodsMaterialsDTO.getRepertory()); |
| | | byId.setGoodsMaterialsNo(slGoodsMaterialsDTO.getGoodsMaterialsNo()); |
| | | byId.setUpdateTime(new Date()); |
| | | // 手动update |
| | | slGoodsMaterialsMapper.update1(byId); |
| | | } |
| | | } |
| | | |
| | | @Autowired |
| | | private SlGoodsMaterialsMapper slGoodsMaterialsMapper; |
| | | @Override |
| | | public PageDTO<SlGoodsMaterialsVO> getGoodSmaterialsList(SlGoodsMaterialsQuery slGoodsMaterialsQuery) { |
| | | Page<SlGoodsMaterials> page = new Page<>(slGoodsMaterialsQuery.getPageCurr(), slGoodsMaterialsQuery.getPageSize()); |
| | |
| | | LambdaQueryWrapper< ManagementGoodsMaterials> wrapper= Wrappers.lambdaQuery(); |
| | | wrapper.eq(ManagementGoodsMaterials::getGoodsMaterialsId,storeManagementGoodSmaterialsQuery.getGoodsMaterialsId()); |
| | | wrapper.eq( ManagementGoodsMaterials::getDelFlag,0); |
| | | wrapper.eq( ManagementGoodsMaterials::getManagementId,storeManagementGoodSmaterialsQuery.getStoreManagementId()); |
| | | wrapper.orderByDesc(ManagementGoodsMaterials::getCreateTime); |
| | | ManagementGoodsMaterials page1 = managementGoodsMaterialsService.getOne(wrapper); |
| | | StoreManagementGoodSmaterialsVO storeManagementGoodSmaterialsVO = BeanUtils.copyBean(page1, StoreManagementGoodSmaterialsVO.class); |
| | |
| | | slGoodsShelfVO.setCountyCode(byId.getCountyCode()); |
| | | slGoodsShelfVO.setTownCode(byId.getTownCode()); |
| | | slGoodsShelfVO.setTownName(byId.getTownName()); |
| | | |
| | | slGoodsShelfVO.setGrade(byId.getStoreManagementGrade()); |
| | | return slGoodsShelfVO; |
| | | } |
| | | |
| | |
| | | public class SlStoreManagementImgServiceImpl extends ServiceImpl<SlStoreManagementImgMapper, SlStoreManagementImg> implements SlStoreManagementImgService { |
| | | |
| | | @Override |
| | | public void addStoreManagementimg(StoreManagementimgDTO storeManagementimgDTO) { |
| | | public String addStoreManagementimg(StoreManagementimgDTO storeManagementimgDTO) { |
| | | if (storeManagementimgDTO.getId()==null){ |
| | | SlStoreManagementImg slStoreManagementImg=new SlStoreManagementImg(); |
| | | slStoreManagementImg.setStoreManagementId(storeManagementimgDTO.getStoreManagementId()); |
| | | slStoreManagementImg.setStoreManagementNumber(storeManagementimgDTO.getStoreManagementNumber()); |
| | | slStoreManagementImg.setImgUrl(storeManagementimgDTO.getImgUrl()); |
| | | this.save(slStoreManagementImg); |
| | | return slStoreManagementImg.getId().toString(); |
| | | }else { |
| | | SlStoreManagementImg slStoreManagementImg = this.getById(storeManagementimgDTO.getId()); |
| | | if (storeManagementimgDTO.getStoreManagementId()!=null){ |
| | |
| | | slStoreManagementImg.setImgUrl(storeManagementimgDTO.getImgUrl()); |
| | | } |
| | | this.updateById(slStoreManagementImg); |
| | | return slStoreManagementImg.getId().toString(); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | package com.ruoyi.management.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.management.domain.ManagementGoodsMaterials; |
| | | import com.ruoyi.management.domain.SlStoreManagement; |
| | | |
| | |
| | | import com.ruoyi.management.mapper.SlVolumeProductionRkMapper; |
| | | import com.ruoyi.management.mapper.SlVolumeProductionRkglMapper; |
| | | import com.ruoyi.management.service.SlStoreManagementService; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import org.apache.catalina.security.SecurityUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void addStoreManagement(StoreManagementDTO storeManagementDTO) { |
| | | public AjaxResult addStoreManagement(StoreManagementDTO storeManagementDTO) { |
| | | if (storeManagementDTO.getId()==null){ |
| | | List<SlStoreManagement> list = this.list(new QueryWrapper<SlStoreManagement>() |
| | | .eq("store_management_grade", storeManagementDTO.getStoreManagementGrade()) |
| | | .eq("store_management_no", storeManagementDTO.getStoreManagementNo()) |
| | | .eq("del_flag", 0)); |
| | | if (!list.isEmpty()){ |
| | | return AjaxResult.error("当前仓库等级已有相同编号仓库"); |
| | | } |
| | | SlStoreManagement slStoreManagement=new SlStoreManagement(); |
| | | slStoreManagement.setStoreManagementNo(storeManagementDTO.getStoreManagementNo()); |
| | | slStoreManagement.setStoreManagementAdder(storeManagementDTO.getStoreManagementAdder()); |
| | |
| | | this.save(slStoreManagement); |
| | | }else { |
| | | SlStoreManagement slStoreManagement = this.getById(storeManagementDTO.getId()); |
| | | List<SlStoreManagement> list = this.list(new QueryWrapper<SlStoreManagement>() |
| | | .eq("store_management_grade", storeManagementDTO.getStoreManagementGrade()) |
| | | .eq("store_management_no", storeManagementDTO.getStoreManagementNo()) |
| | | .ne("id",slStoreManagement.getId()) |
| | | .eq("del_flag", 0)); |
| | | if (!list.isEmpty()){ |
| | | return AjaxResult.error("当前仓库等级已有相同编号仓库"); |
| | | } |
| | | if (storeManagementDTO.getStoreManagementNo()!=null){ |
| | | slStoreManagement.setStoreManagementNo(storeManagementDTO.getStoreManagementNo()); |
| | | } |
| | |
| | | } |
| | | this.updateById(slStoreManagement); |
| | | } |
| | | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Autowired |
| | | private TokenService tokenService; |
| | | @Resource |
| | | private SysUserClient sysUserClient; |
| | | @Override |
| | | public List<SlStoreManagement> QueryStoreManagementList(QStoreManagementQuery StoreManagementQuery) { |
| | | LambdaQueryWrapper< SlStoreManagement> wrapper= Wrappers.lambdaQuery(); |
| | | if (StoreManagementQuery.getCityCode()!="" && StoreManagementQuery.getCityCode()!=null){ |
| | | if (StoreManagementQuery.getCityCode()!=null && StoreManagementQuery.getCityCode()!=""){ |
| | | wrapper.eq(SlStoreManagement::getCityCode,StoreManagementQuery.getCityCode()); |
| | | } |
| | | if (StoreManagementQuery.getCountyCode()!="" && StoreManagementQuery.getCountyCode()!=null){ |
| | | if (StoreManagementQuery.getCountyCode()!=null && StoreManagementQuery.getCountyCode()!=""){ |
| | | wrapper.eq(SlStoreManagement::getCountyCode,StoreManagementQuery.getCountyCode()); |
| | | } |
| | | if (StoreManagementQuery.getTownCode()!=null && StoreManagementQuery.getTownCode()!=""){ |
| | | wrapper.eq(SlStoreManagement::getTownCode,StoreManagementQuery.getTownCode()); |
| | | } |
| | | if (StoreManagementQuery.getStoreManagementGrade()!=null&&StoreManagementQuery.getStoreManagementGrade()!=0 ){ |
| | | wrapper.eq(SlStoreManagement::getStoreManagementGrade,StoreManagementQuery.getStoreManagementGrade()); |
| | | } |
| | | |
| | | wrapper.eq( SlStoreManagement::getDelFlag,0); |
| | | wrapper.orderByDesc(SlStoreManagement::getCreateTime); |
| | | Long userid = tokenService.getLoginUser().getUserid(); |
| | | SysUser data = sysUserClient.getSysUser(userid).getData(); |
| | | if (data!=null){ |
| | | if (!data.getUserType().equals("00")){ |
| | | // 仓库管理员 根据仓库管理员的等级查询对应的仓库 |
| | | switch (data.getRoleType()){ |
| | | case 3: |
| | | wrapper.ge(SlStoreManagement::getStoreManagementGrade,3); |
| | | break; |
| | | case 4: |
| | | wrapper.ge(SlStoreManagement::getStoreManagementGrade,4); |
| | | break; |
| | | case 5: |
| | | wrapper.ge(SlStoreManagement::getStoreManagementGrade,5); |
| | | break; |
| | | case 6: |
| | | wrapper.eq(SlStoreManagement::getStoreManagementGrade,6); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | List<SlStoreManagement> page1 = this.list(wrapper); |
| | | return page1; |
| | | } |
| | | |
| | | @Override |
| | | public PageDTO<SlStoreManagementInventoryVO> getManagementInventoryList(StoreManagementQuery storeManagementQuery) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | SysUser data = sysUserClient.getSysUser(userId).getData(); |
| | | |
| | | Page<SlStoreManagement> page = new Page<>(storeManagementQuery.getPageCurr(), storeManagementQuery.getPageSize()); |
| | | LambdaQueryWrapper< SlStoreManagement> wrapper= Wrappers.lambdaQuery(); |
| | | if (storeManagementQuery.getStoreManagementName()!=null){ |
| | | wrapper.eq(SlStoreManagement::getStoreManagementName,storeManagementQuery.getStoreManagementName()); |
| | | wrapper.like(SlStoreManagement::getStoreManagementName,storeManagementQuery.getStoreManagementName()); |
| | | } |
| | | if (!data.getUserType().equals("00")){ |
| | | // 不是平台账号 根据角色类型查询对应的仓库 |
| | | switch (data.getRoleType()){ |
| | | case 3: |
| | | wrapper.ge(SlStoreManagement::getStoreManagementGrade,3); |
| | | break; |
| | | case 4: |
| | | wrapper.ge(SlStoreManagement::getStoreManagementGrade,4); |
| | | break; |
| | | case 5: |
| | | wrapper.ge(SlStoreManagement::getStoreManagementGrade,5); |
| | | break; |
| | | case 6: |
| | | wrapper.eq(SlStoreManagement::getStoreManagementGrade,6); |
| | | break; |
| | | } |
| | | } |
| | | if (storeManagementQuery.getStoreManagementNo()!=null){ |
| | | wrapper.eq(SlStoreManagement::getStoreManagementNo,storeManagementQuery.getStoreManagementNo()); |
| | |
| | | import com.ruoyi.management.service.ManagementGoodsMaterialsService; |
| | | import com.ruoyi.management.service.SlVolumeProductionCkService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.management.service.SlVolumeProductionCkglService; |
| | | import com.ruoyi.management.service.SlVolumeProductionRkService; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Resource |
| | | private SlVolumeProductionRkMapper slVolumeProductionRkMapper; |
| | | @Autowired |
| | | private SlVolumeProductionCkglService ckglService; |
| | | |
| | | @Resource |
| | | private SlGoodsMaterialsMapper slGoodsMaterialsMapper; |
| | |
| | | byId.setCkNum(c.getCkNum()); |
| | | byId.setGuihNum(c.getGuihNum()); |
| | | this.updateById(byId); |
| | | |
| | | } |
| | | } |
| | | @Override |
| | | public void updSlVolumeProductionCk1(List<AddSlVolumeProductionCkDTO> slVolumeProductionCkDTO) { |
| | | for (AddSlVolumeProductionCkDTO c:slVolumeProductionCkDTO){ |
| | | SlVolumeProductionCk byId = this.getById(c.getCkgl_id()); |
| | | byId.setCkNum(c.getCkNum()); |
| | | byId.setGuihNum(c.getGuihNum()); |
| | | byId.setIsGh(2); |
| | | this.updateById(byId); |
| | | // Long ckglId = byId.getCkglId(); |
| | | // SlVolumeProductionCkgl byId1 = ckglService.getById(ckglId); |
| | | // byId1.setAuditStatus(1); |
| | | // byId1.setPresentState(1); |
| | | // ckglService.updateById(byId1); |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | PageDTO<ManagementimgVolumeProductionCkVO> SlGoodsShelfDTO = PageDTO.of(page2, ManagementimgVolumeProductionCkVO.class); |
| | | List<ManagementimgVolumeProductionCkVO> list2 = SlGoodsShelfDTO.getList(); |
| | | for(ManagementimgVolumeProductionCkVO list:list2) {{ |
| | | |
| | | for(ManagementimgVolumeProductionCkVO list:list2) { |
| | | { |
| | | SlVolumeProductionRk slVolumeProductionRk = slVolumeProductionRkMapper.selectById(list.getRkId()); |
| | | list.setStoreManagementNumber(slVolumeProductionRk.getStoreManagementNumber()); |
| | | list.setRkNumber(slVolumeProductionRk.getRkNumber()); |
| | |
| | | @Override |
| | | public PageDTO<InventoriesSuppliesInfoVO> getMaterialByManagementIdList(GetMaterialsByManagementIdQuery query) { |
| | | List<InventoriesSuppliesInfoVO> res = new ArrayList<>(); |
| | | |
| | | Page<SlVolumeProductionRk> page = new Page<>(query.getPageCurr(), query.getPageSize()); |
| | | QueryWrapper<ManagementGoodsMaterials> wrapper1 = new QueryWrapper<>(); |
| | | wrapper1.eq("del_flag","0"); |
| | |
| | | wrapper2.eq("is_consume",query.getIsConsume()); |
| | | } |
| | | wrapper2.eq("del_flag","0"); |
| | | if (collect.isEmpty())collect.add(-1L); |
| | | wrapper2.in("id",collect); |
| | | List<Long> collect1 = slGoodsMaterialsMapper.selectList(wrapper2).stream().map(SlGoodsMaterials::getId).collect(Collectors.toList()); |
| | | QueryWrapper<SlVolumeProductionRk> wrapper = new QueryWrapper<>(); |
| | | if (collect1.isEmpty())collect1.add(-1L); |
| | | wrapper.in("materials_id",collect1); |
| | | wrapper.eq("management_id",query.getManagementId()); |
| | | wrapper.eq("del_flag","0"); |
| | | |
| | | Page<SlVolumeProductionRk> page2 = slVolumeProductionRkService.page(page, wrapper); |
| | |
| | | |
| | | @Override |
| | | public VolumeProductionCkglInfoVO getVolumeProductionCkglnfo(Long id) { |
| | | |
| | | SlVolumeProductionCkgl byId = this.getById(id); |
| | | VolumeProductionCkglInfoVO v= BeanUtils.copyBean(byId, VolumeProductionCkglInfoVO.class); |
| | | v.setAuthorization(byId.getAuthorizationUrl()); |
| | | SlStoreManagement slStoreManagement = slStoreManagementMapper.selectById(byId.getManagementId()); |
| | | v.setStoreManagementName(slStoreManagement.getStoreManagementName()); |
| | | v.setZhuren(slStoreManagement.getDirectorId()); |
| | | v.setZhuguan(slStoreManagement.getCompetentId()); |
| | | v.setGuanliyuan(slStoreManagement.getAdministratorId()); |
| | | v.setReasonsRefusal(byId.getReasonsRefusal()); |
| | | SysUser data1 = sysUserClient.getSysUser(Long.valueOf(byId.getSysId())).getData(); |
| | | if (data1!=null){ |
| | | v.setSysName(data1.getNickName()); |
| | | v.setSysPhone(data1.getPhonenumber()); |
| | | } |
| | | return v; |
| | | } |
| | | |
| | |
| | | public VolumeProductionCkglInventoryVO getVolumeProductionCkglInventory(Long id) { |
| | | SlVolumeProductionCkgl byId = this.getById(id); |
| | | VolumeProductionCkglInventoryVO vo = new VolumeProductionCkglInventoryVO(); |
| | | SysUser data = sysUserClient.getSysUser(byId.getId()).getData(); |
| | | SysUser data = sysUserClient.getSysUser(byId.getSysId()).getData(); |
| | | vo.setSysPhone(data.getPhonenumber()); |
| | | vo.setSysName(data.getNickName()); |
| | | vo.setStartiTime(byId.getStartiTime()); |
| | |
| | | wrapper1.orderByDesc(SlVolumeProductionCk::getCreateTime); |
| | | List<SlVolumeProductionCk> page2 = slVolumeProductionCkMapper.selectList(wrapper1); |
| | | for (SlVolumeProductionCk list : page2) { |
| | | list.setCkTime(new Date()); |
| | | slVolumeProductionCkMapper.updateById(list); |
| | | SlVolumeProductionRk slVolumeProductionRk = slVolumeProductionRkMapper.selectById(list.getRkId()); |
| | | Long num =slVolumeProductionRk.getRepertoryZhai()-Long.valueOf(list.getCkNum()); |
| | | slVolumeProductionRk.setRepertoryZhai(num); |
| | | slVolumeProductionRkMapper.updateById(slVolumeProductionRk); |
| | | |
| | | LambdaQueryWrapper<ManagementGoodsMaterials> wrapper2 = Wrappers.lambdaQuery(); |
| | | wrapper2.eq(ManagementGoodsMaterials::getGoodsMaterialsId,list.getMaterialsId()); |
| | | wrapper2.eq(ManagementGoodsMaterials::getManagementId,slVolumeProductionRk.getManagementId()); |
| | |
| | | List<SlVolumeProductionCk> page2 = slVolumeProductionCkMapper.selectList(wrapper1); |
| | | for (SlVolumeProductionCk list : page2) { |
| | | list.setIsGh(2); |
| | | list.setGhTime(new Date()); |
| | | slVolumeProductionCkMapper.updateById(list); |
| | | |
| | | SlVolumeProductionRk slVolumeProductionRk = slVolumeProductionRkMapper.selectById(list.getRkId()); |
| | | Long num =slVolumeProductionRk.getRepertoryZhai()+Long.valueOf(list.getGuihNum()); |
| | | slVolumeProductionRk.setRepertoryZhai(num); |
| | | slVolumeProductionRkMapper.updateById(slVolumeProductionRk); |
| | | |
| | | LambdaQueryWrapper<ManagementGoodsMaterials> wrapper2 = Wrappers.lambdaQuery(); |
| | | wrapper2.eq(ManagementGoodsMaterials::getGoodsMaterialsId,list.getMaterialsId()); |
| | | wrapper2.eq(ManagementGoodsMaterials::getManagementId,slVolumeProductionRk.getManagementId()); |
| | |
| | | import com.alibaba.fastjson2.util.UUIDUtils; |
| | | import com.alibaba.nacos.common.utils.UuidUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | |
| | | import com.ruoyi.management.service.SlVolumeProductionRkService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.management.service.SlVolumeProductionRkglService; |
| | | import com.ruoyi.management.service.SlVolumeProductionZyService; |
| | | import com.ruoyi.management.util.ObsUploadUtil; |
| | | import com.ruoyi.management.util.QRCodeUtil; |
| | | import com.ruoyi.management.util.UUIDUtil; |
| | |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import org.apache.logging.log4j.core.util.UuidUtil; |
| | | import org.apache.tomcat.util.http.fileupload.ByteArrayOutputStream; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.core.io.ByteArrayResource; |
| | | import org.springframework.mock.web.MockMultipartFile; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Resource |
| | | private ManagementGoodsMaterialsMapper managementGoodsMaterialsMapper; |
| | | @Autowired |
| | | private SlVolumeProductionZyService slVolumeProductionZyService; |
| | | |
| | | |
| | | @Autowired |
| | | private SlVolumeProductionZyService slVolumeProductionZyglService; |
| | | |
| | | |
| | | @Override |
| | |
| | | SlGoodsMaterials slGoodsMaterials = slGoodsMaterialsMapper.selectById(list.getMaterialsId()); |
| | | list.setGoodsMaterialsName(slGoodsMaterials.getGoodsMaterialsName()); |
| | | list.setIsConsume(slGoodsMaterials.getIsConsume()); |
| | | if (data!=null){ |
| | | list.setSupplierName(data.getNickName()); |
| | | } |
| | | SlGoodsShelf slGoodsShelf = slGoodsShelfMapper.selectById(list.getShelfId()); |
| | | if (slGoodsShelf!=null){ |
| | | list.setGoodsShelfName(slGoodsShelf.getGoodsShelfName()); |
| | |
| | | SlVolumeProductionRkgl byId = slVolumeProductionRkglMapper.selectById(list.getVolumeProductionRkglId()); |
| | | if (byId!=null){ |
| | | SysUser data = sysUserClient.getSysUser(byId.getSupplierId()).getData(); |
| | | if (data!=null){ |
| | | list.setSupplierName(data.getNickName()); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | @Override |
| | | public void addVolumeProductionRkgl(List<SlVolumeProductionRkListDTO> slVolumeProductionRkListDTO) { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | for (SlVolumeProductionRkListDTO m:slVolumeProductionRkListDTO){ |
| | | SlVolumeProductionRk slVolumeProductionRk=new SlVolumeProductionRk(); |
| | | slVolumeProductionRk.setVolumeProductionRkglId(m.getVolumeProductionRkglId()); |
| | | slVolumeProductionRk.setMaterialsId(m.getMaterialsId()); |
| | | slVolumeProductionRk.setManagementId(m.getManagementId()); |
| | | slVolumeProductionRk.setRkNumber("CD-"+simpleDateFormat.format(new Date())); |
| | | slVolumeProductionRk.setRkNumber("CD-"+simpleDateFormat.format(new Date())+UUIDUtil.getNumberRandom(2)); |
| | | slVolumeProductionRk.setNewAddTime(m.getNewAddTime()); |
| | | if ( m.getErwmNum()!=null){ |
| | | slVolumeProductionRk.setErwmNum( m.getErwmNum()); |
| | |
| | | public void uplSlVolumeProductionRk(List<SlVolumeProductionRkDTO> SlVolumeProductionRkDTO) { |
| | | for (SlVolumeProductionRkDTO a:SlVolumeProductionRkDTO){ |
| | | SlVolumeProductionRk byId = this.getById(a.getId()); |
| | | byId.setSmerwmNum(0); |
| | | if (a.getErwmNum()!=null){ |
| | | byId.setErwmNum(a.getErwmNum()); |
| | | }if (a.getRkPice()!=null){ |
| | |
| | | |
| | | @Override |
| | | public PageDTO<getVolumeProductionRkgCodeVO> getVolumeProductionRkgCode(VolumeProductionRkgCodeQuery volumeProductionRkgCodeQuery) { |
| | | QueryWrapper<SlGoodsMaterials> slGoodsMaterialsQueryWrapper = new QueryWrapper<>(); |
| | | slGoodsMaterialsQueryWrapper.eq("del_flag", 0); |
| | | if (StringUtils.hasLength(volumeProductionRkgCodeQuery.getGoodsMaterialsName())){ |
| | | slGoodsMaterialsQueryWrapper.like("goods_materials_name", volumeProductionRkgCodeQuery.getGoodsMaterialsName()); |
| | | } |
| | | List<Long> collect = slGoodsMaterialsMapper.selectList(slGoodsMaterialsQueryWrapper) |
| | | .stream().map(SlGoodsMaterials::getId).collect(Collectors.toList()); |
| | | if (collect.isEmpty()){ |
| | | collect.add(-1L); |
| | | } |
| | | Page<SlVolumeProductionRk> page = new Page<>(volumeProductionRkgCodeQuery.getPageCurr(), volumeProductionRkgCodeQuery.getPageSize()); |
| | | LambdaQueryWrapper< SlVolumeProductionRk> wrapper1= Wrappers.lambdaQuery(); |
| | | wrapper1.like(SlVolumeProductionRk::getVolumeProductionRkglId,volumeProductionRkgCodeQuery.getVolumeProductionRkglId()); |
| | | wrapper1.eq(SlVolumeProductionRk::getVolumeProductionRkglId,volumeProductionRkgCodeQuery.getVolumeProductionRkglId()); |
| | | wrapper1.eq( SlVolumeProductionRk::getDelFlag,0); |
| | | wrapper1.in( SlVolumeProductionRk::getMaterialsId,collect); |
| | | wrapper1.orderByDesc(SlVolumeProductionRk::getCreateTime); |
| | | Page<SlVolumeProductionRk> page2 = this.page(page, wrapper1); |
| | | PageDTO<getVolumeProductionRkgCodeVO> SlGoodsShelfDTO = PageDTO.of(page2, getVolumeProductionRkgCodeVO.class); |
| | |
| | | |
| | | @Override |
| | | public List<QRCodeVO> codeInfo(Long id) throws Exception { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | List<QRCodeVO> res = new ArrayList<>(); |
| | | LambdaQueryWrapper< SlVolumeProductionRk> wrapper1= Wrappers.lambdaQuery(); |
| | | wrapper1.like(SlVolumeProductionRk::getVolumeProductionRkglId,id); |
| | | wrapper1.eq(SlVolumeProductionRk::getId,id); |
| | | wrapper1.eq( SlVolumeProductionRk::getDelFlag,0); |
| | | wrapper1.orderByDesc(SlVolumeProductionRk::getCreateTime); |
| | | List<SlVolumeProductionRk> list = this.list(wrapper1); |
| | | for (SlVolumeProductionRk byId : list) { |
| | | // 根据生成二维码数量 复制 |
| | | for (int i = 0; i < byId.getErwmNum(); i++) { |
| | | for (int i = 1; i <= byId.getErwmNum(); i++) { |
| | | String blueS = "{\"rkNumber\": "+byId.getRkNumber()+"}"; |
| | | BufferedImage blueImage = QRCodeUtil.createImage(blueS); |
| | | MultipartFile blueFile = convert(blueImage, new Date().getTime() + UUIDUtil.getRandomCode(3) + ".PNG"); |
| | |
| | | vo.setGoodsMaterialsName(slGoodsMaterials.getGoodsMaterialsName()); |
| | | SlVolumeProductionRkgl byId1 = slVolumeProductionRkglMapper.selectById(byId.getVolumeProductionRkglId()); |
| | | SysUser data = sysUserClient.getSysUser(byId1.getSupplierId()).getData(); |
| | | if (data!=null){ |
| | | vo.setSupplierName(data.getNickName()); |
| | | } |
| | | vo.setMaterialsNum(byId.getRkNum()); |
| | | Long materialsId = byId.getMaterialsId(); |
| | | // 查询物资缩写 |
| | | vo.setMaterials(byId.getRkNumber()); |
| | | SlStoreManagement slStoreManagement = slStoreManagementMapper.selectById(byId.getManagementId()); |
| | | vo.setStoreManagementName(slStoreManagement.getStoreManagementName()); |
| | | vo.setQrCode(s); |
| | | res.add(vo); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | return res; |
| | | } |
| | | @Override |
| | | public List<QRCodeVO> codeInfo1(Long id,Long zyId) throws Exception { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | List<QRCodeVO> res = new ArrayList<>(); |
| | | LambdaQueryWrapper< SlVolumeProductionRk> wrapper1= Wrappers.lambdaQuery(); |
| | | wrapper1.eq(SlVolumeProductionRk::getId,id); |
| | | wrapper1.eq( SlVolumeProductionRk::getDelFlag,0); |
| | | wrapper1.orderByDesc(SlVolumeProductionRk::getCreateTime); |
| | | List<SlVolumeProductionRk> list = this.list(wrapper1); |
| | | for (SlVolumeProductionRk byId : list) { |
| | | // 根据生成二维码数量 复制 |
| | | for (int i = 1; i <= byId.getErwmNum(); i++) { |
| | | String blueS = "{\"rkNumber\": "+byId.getRkNumber()+"}"; |
| | | BufferedImage blueImage = QRCodeUtil.createImage(blueS); |
| | | MultipartFile blueFile = convert(blueImage, new Date().getTime() + UUIDUtil.getRandomCode(3) + ".PNG"); |
| | | // 生成的二维码连接 |
| | | String s = ObsUploadUtil.obsUpload(blueFile); |
| | | QRCodeVO vo=new QRCodeVO(); |
| | | String letter = getLetter(i); |
| | | vo.setCategory(letter); |
| | | SlGoodsMaterials slGoodsMaterials = slGoodsMaterialsMapper.selectById(byId.getMaterialsId()); |
| | | vo.setGoodsMaterialsName(slGoodsMaterials.getGoodsMaterialsName()); |
| | | |
| | | SlVolumeProductionZy byId1 = slVolumeProductionZyService.getById(zyId); |
| | | if (byId1.getSupplierId()!=null){ |
| | | SysUser data = sysUserClient.getSysUser(byId1.getSupplierId().longValue()).getData(); |
| | | if (data!=null){ |
| | | vo.setSupplierName(data.getNickName()); |
| | | |
| | | } |
| | | } |
| | | vo.setMaterialsNum(byId.getRkNum()); |
| | | Long materialsId = byId.getMaterialsId(); |
| | | // 查询物资缩写 |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | String blueS = "{\"rkNumber\": CD-1721989472748"+"}"; |
| | | BufferedImage blueImage = QRCodeUtil.createImage(blueS); |
| | | MultipartFile blueFile = convert(blueImage, new Date().getTime() + UUIDUtil.getRandomCode(3) + ".PNG"); |
| | | // 生成的二维码连接 |
| | | String s = ObsUploadUtil.obsUpload(blueFile); |
| | | System.err.println(s); |
| | | // String blueS = "{\"rkNumber\": CD-1721989472748"+"}"; |
| | | // BufferedImage blueImage = QRCodeUtil.createImage(blueS); |
| | | // MultipartFile blueFile = convert(blueImage, new Date().getTime() + UUIDUtil.getRandomCode(3) + ".PNG"); |
| | | // // 生成的二维码连接 |
| | | // String s = ObsUploadUtil.obsUpload(blueFile); |
| | | // System.err.println(s); |
| | | // String letter = getLetter(27); |
| | | // System.err.println(letter); |
| | | |
| | | } |
| | | public static MultipartFile convert(BufferedImage bufferedImage, String fileName) throws IOException { |
| | | // 将 BufferedImage 转换为字节数组 |
| | |
| | | // 根据传入数字是几 返回对应的字母 |
| | | public static String getLetter(int num) { |
| | | String[] str = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}; |
| | | // 如果num大于26 那么往后叠加对应的字母 |
| | | // 如果num大于26 那么往后叠加对应的字母 比如27 那么就是AA |
| | | if (num > 26) { |
| | | int a = num / 26; |
| | | int b = num % 26; |
| | |
| | | } |
| | | return getLetter(a) + getLetter(b); |
| | | } |
| | | |
| | | return str[num - 1]; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public PageDTO<ManagementimgVolumeProductionRkVO> getroductionRkList(umeProductionRkQuery meProductionRkQuery) { |
| | | |
| | |
| | | if (meProductionRkQuery.getGoodsMaterialsName()!=null&&meProductionRkQuery.getGoodsMaterialsName()!=""){ |
| | | wrapper.eq(SlGoodsMaterials::getGoodsMaterialsName,meProductionRkQuery.getGoodsMaterialsName()); |
| | | } |
| | | if (meProductionRkQuery.getIsConsume()!=0){ |
| | | if (meProductionRkQuery.getIsConsume()!=null && meProductionRkQuery.getIsConsume()!=0){ |
| | | wrapper.eq(SlGoodsMaterials::getIsConsume,meProductionRkQuery.getIsConsume()); |
| | | } |
| | | wrapper.eq( SlGoodsMaterials::getDelFlag,0); |
| | |
| | | |
| | | list.setGoodsMaterialsName(slGoodsMaterials.getGoodsMaterialsName()); |
| | | list.setIsConsume(slGoodsMaterials.getIsConsume()); |
| | | if (data!=null){ |
| | | list.setSupplierName(data.getNickName()); |
| | | } |
| | | SlGoodsShelf slGoodsShelf = slGoodsShelfMapper.selectById(list.getShelfId()); |
| | | list.setGoodsShelfName(slGoodsShelf.getGoodsShelfName()); |
| | | } |
| | |
| | | if (gethuojRkQuery.getGoodsMaterialsName()!=null&&gethuojRkQuery.getGoodsMaterialsName()!=""){ |
| | | wrapper.eq(SlGoodsMaterials::getGoodsMaterialsName,gethuojRkQuery.getGoodsMaterialsName()); |
| | | } |
| | | |
| | | wrapper.eq( SlGoodsMaterials::getDelFlag,0); |
| | | List<SlGoodsMaterials> page1 = slGoodsMaterialsMapper.selectList(wrapper); |
| | | |
| | |
| | | } |
| | | wrapper1.eq(SlVolumeProductionRk::getShelfId,gethuojRkQuery.getGoodsShelid()); |
| | | wrapper1.eq( SlVolumeProductionRk::getDelFlag,0); |
| | | // 该字段用于标记是否入库 |
| | | wrapper1.isNotNull(SlVolumeProductionRk::getNewAddTime); |
| | | wrapper1.orderByDesc(SlVolumeProductionRk::getCreateTime); |
| | | Page<SlVolumeProductionRk> page2 = this.page(page, wrapper1); |
| | | PageDTO<gethuojRkVO> SlGoodsShelfDTO = PageDTO.of(page2, gethuojRkVO.class); |
| | |
| | | SlVolumeProductionRkgl byId = slVolumeProductionRkglMapper.selectById(list.getVolumeProductionRkglId()); |
| | | if (byId!=null){ |
| | | SysUser data = sysUserClient.getSysUser(byId.getSupplierId()).getData(); |
| | | if (data!=null){ |
| | | list.setSupplierName(data.getNickName()); |
| | | } |
| | | } |
| | | |
| | | if (slGoodsMaterials!=null){ |
| | | list.setGoodsMaterialsName(slGoodsMaterials.getGoodsMaterialsName()); |
| | |
| | | @Override |
| | | public VolumeProductionRkgInfoVO getVolumeProductionRkgInfo(Long id) { |
| | | SlVolumeProductionRkgl byId = this.getById(id); |
| | | // 根据仓库id 查询仓库管理员 |
| | | VolumeProductionRkgInfoVO v=BeanUtils.copyBean(byId, VolumeProductionRkgInfoVO.class); |
| | | SlStoreManagement slStoreManagement = slStoreManagementMapper.selectById(byId.getManagementId()); |
| | | v.setZhuren(slStoreManagement.getDirectorId()); |
| | | v.setZhuguan(slStoreManagement.getCompetentId()); |
| | | v.setGuanliyuan(slStoreManagement.getAdministratorId()); |
| | | v.setStoreManagementName(slStoreManagement.getStoreManagementName()); |
| | | if (byId.getSupplierId()!=null){ |
| | | SysUser data = sysUserClient.getSysUser(Long.valueOf(byId.getSupplierId())).getData(); |
| | | v.setSupplierId(byId.getSupplierId()); |
| | | if (data!=null){ |
| | | v.setSupplierName(data.getNickName()); |
| | | v.setSupplierPhone(data.getPhonenumber()); |
| | | } |
| | | } |
| | | v.setSupplierId(byId.getSupplierId()); |
| | | if (byId.getSysId()!=null){ |
| | | SysUser data1 = sysUserClient.getSysUser(Long.valueOf(byId.getSysId())).getData(); |
| | | if (data1!=null){ |
| | | v.setSysName(data1.getNickName()); |
| | | v.setSysPhone(data1.getPhonenumber()); |
| | | } |
| | | } |
| | | v.setAuthorization(byId.getAuthorizationUrl()); |
| | | v.setReason(byId.getReasonsRefusal()); |
| | | return v; |
| | | } |
| | | |
| | |
| | | wrapper1.in(SlVolumeProductionRkgl::getSysId,goodsSkuIdList); |
| | | } |
| | | wrapper1.eq( SlVolumeProductionRkgl::getDelFlag,0); |
| | | wrapper1.orderByDesc(SlVolumeProductionRkgl::getCreateTime); |
| | | wrapper1.orderByDesc(SlVolumeProductionRkgl::getStartiTime); |
| | | Page<SlVolumeProductionRkgl> page2 = this.page(page, wrapper1); |
| | | |
| | | PageDTO<SupplierVolumeProductionRkglVO> SlGoodsShelfDTO = PageDTO.of(page2, SupplierVolumeProductionRkglVO.class); |
| | | List<SupplierVolumeProductionRkglVO> list2 = SlGoodsShelfDTO.getList(); |
| | | for(SupplierVolumeProductionRkglVO list:list2){ |
| | |
| | | |
| | | @Override |
| | | public Long addVolumeProductionRkgl(VolumeProductionRkglDTO volumeProductionRkglDTO) { |
| | | SlStoreManagement slStoreManagement = slStoreManagementMapper.selectById(volumeProductionRkglDTO.getManagementId()); |
| | | String directorId = slStoreManagement.getDirectorId(); |
| | | String competentId = slStoreManagement.getCompetentId(); |
| | | String administratorId = slStoreManagement.getAdministratorId(); |
| | | Long userid = SecurityUtils.getUserId(); |
| | | List<String> list1 = Arrays.asList(administratorId.split(",")); |
| | | List<String> list2 = Arrays.asList(competentId.split(",")); |
| | | List<String> list3 = Arrays.asList(directorId.split(",")); |
| | | SlVolumeProductionRkgl slVolumeProductionRkgl=null; |
| | | if (volumeProductionRkglDTO.getId()==null){ |
| | | new SlVolumeProductionRkgl(); |
| | | slVolumeProductionRkgl = new SlVolumeProductionRkgl(); |
| | | slVolumeProductionRkgl.setAttachmentUrl(volumeProductionRkglDTO.getAttachmentUrl()); |
| | | slVolumeProductionRkgl.setAuthorizationUrl(volumeProductionRkglDTO.getAuthorization()); |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setManagementId(volumeProductionRkglDTO.getManagementId()); |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setPresentState(1); |
| | | slVolumeProductionRkgl.setSupplierId(volumeProductionRkglDTO.getSupplierId()); |
| | | slVolumeProductionRkgl.setSource(volumeProductionRkglDTO.getSource()); |
| | | slVolumeProductionRkgl.setStartiTime(new Date()); |
| | | slVolumeProductionRkgl.setSysId(userid); |
| | | slVolumeProductionRkgl.setRemark(volumeProductionRkglDTO.getRemark()); |
| | | // 如果发起人是主任 主管 或 管理员 |
| | | if (list1.contains(userid.toString())){ |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setPresentState(2); |
| | | } |
| | | if (list2.contains(userid.toString())){ |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setPresentState(3); |
| | | } |
| | | if (list3.contains(userid.toString())){ |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setPresentState(4); |
| | | } |
| | | |
| | | this.save(slVolumeProductionRkgl); |
| | | }else{ |
| | | slVolumeProductionRkgl = this.getById(volumeProductionRkglDTO.getId()); |
| | |
| | | } |
| | | if (volumeProductionRkglDTO.getAuthorization()!=null){ |
| | | slVolumeProductionRkgl.setAuthorizationUrl(volumeProductionRkglDTO.getAuthorization()); |
| | | } |
| | | // 如果发起人是主任 主管 或 管理员 |
| | | if (list1.contains(userid.toString())){ |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setPresentState(2); |
| | | } |
| | | if (list2.contains(userid.toString())){ |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setPresentState(3); |
| | | } |
| | | if (list3.contains(userid.toString())){ |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setPresentState(4); |
| | | } |
| | | this.updateById(slVolumeProductionRkgl); |
| | | |
| | |
| | | wrapper1.orderByDesc(SlVolumeProductionRk::getCreateTime); |
| | | List<SlVolumeProductionRk> page2 = slVolumeProductionRkMapper.selectList(wrapper1); |
| | | for (SlVolumeProductionRk list : page2) { |
| | | list.setNewAddTime("1"); |
| | | list.setSmerwmNum(list.getErwmNum()); |
| | | LambdaQueryWrapper<ManagementGoodsMaterials> wrapper2 = Wrappers.lambdaQuery(); |
| | | wrapper2.eq(ManagementGoodsMaterials::getGoodsMaterialsId,list.getMaterialsId()); |
| | | wrapper2.eq(ManagementGoodsMaterials::getManagementId,list.getManagementId()); |
| | |
| | | managementGoodsMaterials1.setRepertory(slGoodsMaterials.getRepertory()); |
| | | managementGoodsMaterialsMapper.insert(managementGoodsMaterials1); |
| | | } |
| | | slVolumeProductionRkMapper.updateById(list); |
| | | } |
| | | SlVolumeProductionRkgl byId = this.getById(id); |
| | | byId.setPresentState(4); |
| | |
| | | import com.ruoyi.management.service.SlStoreManagementService; |
| | | import com.ruoyi.management.service.SlVolumeProductionZyService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.management.util.UUIDUtil; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.domain.getVolumeProductionRkQuery; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | private SlAuditService slAuditService; |
| | | @Resource |
| | | private SlAuditRecordService slAuditRecordService; |
| | | @Resource |
| | | private SlVolumeProductionZyMapper slVolumeProductionZyMapper; |
| | | |
| | | @Resource |
| | | private ManagementGoodsMaterialsMapper managementGoodsMaterialsMapper; |
| | | |
| | | @Override |
| | | public void addSlVolumeProductionZy(ADDZYDTO addaddSlVolumeProductionZyDTO) { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | Long userid = SecurityUtils.getUserId(); |
| | | if (addaddSlVolumeProductionZyDTO.getId()==null){ |
| | | // 新增转移管理 |
| | | Long userid = SecurityUtils.getUserId(); |
| | | SlVolumeProductionZygl slVolumeProductionZygl=new SlVolumeProductionZygl(); |
| | | slVolumeProductionZygl.setAttachmentUrl(addaddSlVolumeProductionZyDTO.getAttachmentUrl()); |
| | | slVolumeProductionZygl.setAuthorizationUrl(addaddSlVolumeProductionZyDTO.getAuthorization()); |
| | |
| | | List<AddZYIdsDTO> rkId = addaddSlVolumeProductionZyDTO.getAddZYIdsDTOS(); |
| | | for (AddZYIdsDTO m:rkId){ |
| | | SlVolumeProductionRk slVolumeProductionRk = slVolumeProductionRkMapper.selectById(m.getRkId()); |
| | | // todo 目前还不知道转移管理存不存供应商id |
| | | // Long volumeProductionRkglId = slVolumeProductionRk.getVolumeProductionRkglId(); |
| | | // SlVolumeProductionRkgl slVolumeProductionRkgl = slVolumeProductionRkglMapper.selectById(volumeProductionRkglId); |
| | | Long volumeProductionRkglId = slVolumeProductionRk.getVolumeProductionRkglId(); |
| | | SlVolumeProductionRkgl slVolumeProductionRkgl = slVolumeProductionRkglMapper.selectById(volumeProductionRkglId); |
| | | SlVolumeProductionZy slVolumeProductionZy=new SlVolumeProductionZy(); |
| | | slVolumeProductionZy.setRkId(m.getRkId()); |
| | | slVolumeProductionZy.setZyglId(slVolumeProductionZygl.getId()); |
| | |
| | | slVolumeProductionZy.setCreateTime(new Date()); |
| | | slVolumeProductionZy.setStoreManagementNumber(m.getStoreManagementNumber()); |
| | | slVolumeProductionZy.setShelfId(m.getShelfId()); |
| | | slVolumeProductionZy.setSysId(userid); |
| | | slVolumeProductionZy.setRkId(m.getRkId()); |
| | | // slVolumeProductionZy.setSupplierId(slVolumeProductionRkgl.getSupplierId()); |
| | | if (slVolumeProductionRkgl!=null){ |
| | | if (slVolumeProductionRkgl.getSupplierId()!=null){ |
| | | slVolumeProductionZy.setSupplierId(Integer.valueOf(slVolumeProductionRkgl.getSupplierId().toString())); |
| | | |
| | | } |
| | | } |
| | | |
| | | this.save(slVolumeProductionZy); |
| | | } |
| | | LambdaQueryWrapper<SlVolumeProductionZy> wrapper1 = Wrappers.lambdaQuery(); |
| | | wrapper1.eq(SlVolumeProductionZy::getZyglId, slVolumeProductionZygl.getId()); |
| | | wrapper1.eq(SlVolumeProductionZy::getDelFlag, 0); |
| | | wrapper1.orderByDesc(SlVolumeProductionZy::getCreateTime); |
| | | List<SlVolumeProductionZy> page2 = slVolumeProductionZyMapper.selectList(wrapper1); |
| | | for (SlVolumeProductionZy zy:page2){ |
| | | SlVolumeProductionRk slVolumeProductionRk=new SlVolumeProductionRk(); |
| | | slVolumeProductionRk.setMaterialsId(zy.getMaterialsId()); |
| | | slVolumeProductionRk.setStoreManagementNumber(zy.getStoreManagementNumber()); |
| | | slVolumeProductionRk.setManagementId(slVolumeProductionZygl.getBmanagementId()); |
| | | slVolumeProductionRk.setRkNumber("CD-"+simpleDateFormat.format(new Date())+ UUIDUtil.getNumberRandom(2)); |
| | | slVolumeProductionRk.setRkNum(Long.valueOf(zy.getZyNum())); |
| | | SlVolumeProductionRk slVolumeProductionRk2 = slVolumeProductionRkMapper.selectById(zy.getRkId()); |
| | | slVolumeProductionRk.setRkPice(slVolumeProductionRk2.getRkPice()); |
| | | if (slVolumeProductionRk2!=null)slVolumeProductionRk.setRkModel(slVolumeProductionRk2.getRkModel()); |
| | | slVolumeProductionRk.setShelfId(zy.getShelfId()); |
| | | slVolumeProductionRk.setRepertoryZhai(Long.valueOf(zy.getZyNum())); |
| | | slVolumeProductionRk.setCreateTime(new Date()); |
| | | slVolumeProductionRkMapper.insert(slVolumeProductionRk); |
| | | zy.setScrkId(slVolumeProductionRk.getId()); |
| | | slVolumeProductionZyMapper.updateById(zy); |
| | | } |
| | | }else{ |
| | | // 修改 |
| | |
| | | byId.setAuthorizationUrl(addaddSlVolumeProductionZyDTO.getAuthorization()); |
| | | } |
| | | slVolumeProductionZyglMapper.updateById(byId); |
| | | for (AddZYIdsDTO z:addaddSlVolumeProductionZyDTO.getAddZYIdsDTOS()){ |
| | | QueryWrapper<SlVolumeProductionZy> slVolumeProductionZyQueryWrapper = new QueryWrapper<>(); |
| | | slVolumeProductionZyQueryWrapper.eq("zygl_id",addaddSlVolumeProductionZyDTO.getId()); |
| | | slVolumeProductionZyQueryWrapper.eq("rk_id",z.getRkId()); |
| | | SlVolumeProductionZy one = this.getOne(slVolumeProductionZyQueryWrapper); |
| | | if (one!=null){ |
| | | one.setZyNum(z.getZyNum()); |
| | | this.remove(slVolumeProductionZyQueryWrapper); |
| | | for (AddZYIdsDTO m:addaddSlVolumeProductionZyDTO.getAddZYIdsDTOS()){ |
| | | SlVolumeProductionRk slVolumeProductionRk = slVolumeProductionRkMapper.selectById(m.getRkId()); |
| | | slVolumeProductionRk.setRkPice(slVolumeProductionRk.getRkPice()); |
| | | // todo 目前还不知道转移管理存不存供应商id |
| | | Long volumeProductionRkglId = slVolumeProductionRk.getVolumeProductionRkglId(); |
| | | SlVolumeProductionRkgl slVolumeProductionRkgl = slVolumeProductionRkglMapper.selectById(volumeProductionRkglId); |
| | | SlVolumeProductionZy slVolumeProductionZy=new SlVolumeProductionZy(); |
| | | slVolumeProductionZy.setRkId(m.getRkId()); |
| | | slVolumeProductionZy.setZyglId(addaddSlVolumeProductionZyDTO.getId()); |
| | | slVolumeProductionZy.setState(1); |
| | | slVolumeProductionZy.setMaterialsId(slVolumeProductionRk.getMaterialsId()); |
| | | slVolumeProductionZy.setZyNum(m.getZyNum()); |
| | | slVolumeProductionZy.setCreateTime(new Date()); |
| | | slVolumeProductionZy.setStoreManagementNumber(m.getStoreManagementNumber()); |
| | | slVolumeProductionZy.setShelfId(m.getShelfId()); |
| | | slVolumeProductionZy.setSysId(userid); |
| | | slVolumeProductionZy.setRkId(m.getRkId()); |
| | | slVolumeProductionZy.setSupplierId(Integer.parseInt(slVolumeProductionRkgl.getSupplierId().toString())); |
| | | this.save(slVolumeProductionZy); |
| | | // slVolumeProductionZyQueryWrapper.eq("rk_id",z.getRkId()); |
| | | // slVolumeProductionZyQueryWrapper.eq("del_flag","0"); |
| | | // slVolumeProductionZyQueryWrapper.eq("shelf_id",z.getShelfId()); |
| | | // slVolumeProductionZyQueryWrapper.eq("store_management_number",z.getStoreManagementNumber()); |
| | | |
| | | } |
| | | this.updateById(one); |
| | | // SlVolumeProductionZy one = this.getOne(slVolumeProductionZyQueryWrapper); |
| | | // if (one!=null){ |
| | | // one.setZyNum(z.getZyNum()); |
| | | // |
| | | // } |
| | | // this.updateById(one); |
| | | } |
| | | } |
| | | // 添加/修改审核记录 |
| | |
| | | slAudit.setSysId(slVolumeProductionZygl.getSysId()); |
| | | slAudit.setManagementId(slVolumeProductionZygl.getManagementId()); |
| | | slAudit.setZymanagementId(slVolumeProductionZygl.getBmanagementId()); |
| | | slVolumeProductionZygl.setPresentState(1); |
| | | slVolumeProductionZygl.setAuditStatus(1); |
| | | slVolumeProductionZyglMapper.updateById(slVolumeProductionZygl); |
| | | SlStoreManagement byId = slStoreManagementService.getById(slVolumeProductionZygl.getManagementId()); |
| | | slAudit.setShenhId(byId.getAdministratorId()); |
| | | slAuditService.save(slAudit); |
| | |
| | | slAuditRecord2.setCreateTime(new Date()); |
| | | slAuditRecordService.save(slAuditRecord2); |
| | | } |
| | | } |
| | | public static String getLetter(int num) { |
| | | String[] str = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}; |
| | | // 如果num大于26 那么往后叠加对应的字母 比如27 那么就是AA |
| | | if (num > 26) { |
| | | int a = num / 26; |
| | | int b = num % 26; |
| | | if (b == 0) { |
| | | a = a - 1; |
| | | b = 26; |
| | | } |
| | | return getLetter(a) + getLetter(b); |
| | | } |
| | | |
| | | return str[num - 1]; |
| | | } |
| | | @Resource |
| | | private SlStoreManagementService slStoreManagementService; |
| | |
| | | } |
| | | } |
| | | numberAndShelfVO.setNumber(number); |
| | | if (dto.getManagementNumber() == null){ |
| | | dto.setManagementNumber(1); |
| | | } |
| | | QueryWrapper<SlGoodsShelf> eq = new QueryWrapper<SlGoodsShelf>() |
| | | .eq("del_flag", "0") |
| | | .eq("store_management_id", dto.getManagementId()) |
| | |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.domain.getVolumeProductionRkQuery; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import com.sun.org.apache.bcel.internal.generic.NEW; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | |
| | | Set<Long> goodsSkuIdList = null; |
| | | goodsSkuIdList = data1.stream().map(SysUser::getUserId) |
| | | .collect(Collectors.toSet()); |
| | | |
| | | LambdaQueryWrapper< SlVolumeProductionZygl> wrapper1= Wrappers.lambdaQuery(); |
| | | if (slVolumeProductionZyQuery.getPresentState()!=null){ |
| | | wrapper1.eq(SlVolumeProductionZygl::getPresentState,slVolumeProductionZyQuery.getPresentState()); |
| | |
| | | wrapper1.in(SlVolumeProductionZygl::getSysId,goodsSkuIdList); |
| | | } |
| | | wrapper1.eq( SlVolumeProductionZygl::getDelFlag,0); |
| | | wrapper1.orderByDesc(SlVolumeProductionZygl::getCreateTime); |
| | | // wrapper1.ne(SlVolumeProductionZygl::getAuditStatus,7); |
| | | wrapper1.orderByDesc(SlVolumeProductionZygl::getStartiTime); |
| | | Page<SlVolumeProductionZygl> page2 = this.page(page, wrapper1); |
| | | |
| | | PageDTO<VolumeProductionzZyglVO> SlGoodsShelfDTO = PageDTO.of(page2, VolumeProductionzZyglVO .class); |
| | |
| | | public VolumeProductionZyglInfoVO getVolumeProductionzZyglnfo(ManagementimgVolumeProductionZyQuery managementimgVolumeProductionZyQuery) { |
| | | SlVolumeProductionZygl byId = this.getById(managementimgVolumeProductionZyQuery.getVolumeProductionzyglId()); |
| | | VolumeProductionZyglInfoVO v= BeanUtils.copyBean(byId, VolumeProductionZyglInfoVO.class); |
| | | SlStoreManagement slStoreManagement2 = slStoreManagementMapper.selectById(byId.getManagementId()); |
| | | v.setZhuren(slStoreManagement2.getDirectorId()); |
| | | v.setZhuguan(slStoreManagement2.getCompetentId()); |
| | | v.setGuanliyuan(slStoreManagement2.getAdministratorId()); |
| | | SlStoreManagement slStoreManagement = slStoreManagementMapper.selectById(byId.getManagementId()); |
| | | v.setStoreManagementName(slStoreManagement.getStoreManagementName()); |
| | | SlStoreManagement bslStoreManagement = slStoreManagementMapper.selectById(byId.getBmanagementId()); |
| | |
| | | v.setSysName(data1.getNickName()); |
| | | v.setSysPhone(data1.getPhonenumber()); |
| | | // 查询楼层数据 |
| | | SlStoreManagement slStoreManagement1 = slStoreManagementMapper.selectById(byId.getManagementId()); |
| | | SlStoreManagement slStoreManagement1 = slStoreManagementMapper.selectById(byId.getBmanagementId()); |
| | | List<String> number = new ArrayList<>(); |
| | | for (Integer i = 1; i <= slStoreManagement1.getStoreManagementNumber(); i++) { |
| | | switch (i){ |
| | |
| | | } |
| | | } |
| | | v.setNumber(number); |
| | | |
| | | if (managementimgVolumeProductionZyQuery.getStoreManagementNumber()==null){ |
| | | managementimgVolumeProductionZyQuery.setStoreManagementNumber(1); |
| | | } |
| | | QueryWrapper<SlGoodsShelf> eq = new QueryWrapper<SlGoodsShelf>() |
| | | .eq("del_flag", "0") |
| | | .eq("store_management_id", byId.getManagementId()) |
| | | .eq("store_management_id", byId.getBmanagementId()) |
| | | .eq("store_management_number",managementimgVolumeProductionZyQuery.getStoreManagementNumber()); |
| | | List<SlGoodsShelf> slGoodsShelves = slGoodsShelfMapper.selectList(eq); |
| | | v.setGoodsShelfList(slGoodsShelves); |
| | | // 查询物资列表 |
| | | LambdaQueryWrapper<SlVolumeProductionRk> wrapper2= Wrappers.lambdaQuery(); |
| | | wrapper2.eq(SlVolumeProductionRk::getManagementId,byId.getBmanagementId()); |
| | | // 根据转移id 查询转移数据 收集入库ids |
| | | LambdaQueryWrapper<SlVolumeProductionZy> wrapper = Wrappers.lambdaQuery(); |
| | | wrapper.eq(SlVolumeProductionZy::getZyglId, byId.getId()); |
| | | wrapper.eq(SlVolumeProductionZy::getDelFlag, 0); |
| | | if (managementimgVolumeProductionZyQuery.getShelfId() == null){ |
| | | managementimgVolumeProductionZyQuery.setShelfId(slGoodsShelves.get(0).getId()); |
| | | if (!slGoodsShelves.isEmpty()){ |
| | | wrapper.eq(SlVolumeProductionZy::getShelfId,slGoodsShelves.get(0).getId()); |
| | | } |
| | | }else{ |
| | | wrapper.eq(SlVolumeProductionZy::getShelfId,managementimgVolumeProductionZyQuery.getShelfId()); |
| | | } |
| | | if (managementimgVolumeProductionZyQuery.getStoreManagementNumber()==null){ |
| | | wrapper2.eq(SlVolumeProductionRk::getStoreManagementNumber,1); |
| | | wrapper.eq(SlVolumeProductionZy::getStoreManagementNumber,1); |
| | | }else{ |
| | | wrapper.eq(SlVolumeProductionZy::getStoreManagementNumber,managementimgVolumeProductionZyQuery.getStoreManagementNumber()); |
| | | } |
| | | wrapper2.eq(SlVolumeProductionRk::getShelfId,managementimgVolumeProductionZyQuery.getShelfId()); |
| | | List<Long> collect = new ArrayList<>(); |
| | | |
| | | if (StringUtils.hasLength(byId.getAuthorizationUrl())){ |
| | | collect = slVolumeProductionZyMapper.selectList(wrapper) |
| | | .stream().map(SlVolumeProductionZy::getScrkId).collect(Collectors.toList()); |
| | | }else{ |
| | | collect = slVolumeProductionZyMapper.selectList(wrapper) |
| | | .stream().map(SlVolumeProductionZy::getRkId).collect(Collectors.toList()); |
| | | } |
| | | // 入库ids |
| | | |
| | | if (collect.isEmpty()){ |
| | | // 如果为空 那么插入-1 不查询数据 |
| | | collect.add(-1L); |
| | | } |
| | | // 查询物资列表 |
| | | LambdaQueryWrapper<SlVolumeProductionRk> wrapper2= Wrappers.lambdaQuery(); |
| | | wrapper2.in(SlVolumeProductionRk::getId,collect); |
| | | wrapper2.eq( SlVolumeProductionRk::getDelFlag,0); |
| | | wrapper2.orderByDesc(SlVolumeProductionRk::getCreateTime); |
| | | List<SlVolumeProductionRk> page1 = slVolumeProductionRkMapper.selectList(wrapper2); |
| | |
| | | .collect(Collectors.toSet()); |
| | | Page<SlVolumeProductionZy> page = new Page<>(managementimgVolumeProductionZyQuery.getPageCurr(), managementimgVolumeProductionZyQuery.getPageSize()); |
| | | LambdaQueryWrapper< SlVolumeProductionZy> wrapper1= Wrappers.lambdaQuery(); |
| | | wrapper1.eq(SlVolumeProductionZy::getDelFlag,0); |
| | | wrapper1.eq(SlVolumeProductionZy::getZyglId,managementimgVolumeProductionZyQuery.getVolumeProductionzyglId()); |
| | | if (goodsSkuIdList.size()>0&&goodsSkuIdList!=null){ |
| | | wrapper1.in(SlVolumeProductionZy::getScrkId,goodsSkuIdList); |
| | | if (managementimgVolumeProductionZyQuery.getShelfId()==null){ |
| | | if (!slGoodsShelves.isEmpty()) { |
| | | wrapper1.eq(SlVolumeProductionZy::getShelfId, slGoodsShelves.get(0).getId()); |
| | | } |
| | | }else{ |
| | | wrapper1.eq(SlVolumeProductionZy::getShelfId,managementimgVolumeProductionZyQuery.getShelfId()); |
| | | } |
| | | if (managementimgVolumeProductionZyQuery.getStoreManagementNumber()==null){ |
| | | wrapper1.eq(SlVolumeProductionZy::getStoreManagementNumber,1); |
| | | }else{ |
| | | wrapper1.eq(SlVolumeProductionZy::getStoreManagementNumber,managementimgVolumeProductionZyQuery.getStoreManagementNumber()); |
| | | } |
| | | |
| | | if (goodsSkuIdList.isEmpty()){ |
| | | goodsSkuIdList.add(-1L); |
| | | } |
| | | // 已经确认了转移 |
| | | if (StringUtils.hasLength(byId.getAuthorizationUrl())){ |
| | | wrapper1.in(SlVolumeProductionZy::getScrkId,goodsSkuIdList); |
| | | |
| | | }else{ |
| | | wrapper1.in(SlVolumeProductionZy::getRkId,goodsSkuIdList); |
| | | |
| | | } |
| | | |
| | | |
| | | wrapper1.eq( SlVolumeProductionZy::getDelFlag,0); |
| | | wrapper1.orderByDesc(SlVolumeProductionZy::getCreateTime); |
| | | Page<SlVolumeProductionZy> page2 = slVolumeProductionZyMapper.selectPage(page, wrapper1); |
| | | PageDTO<com.ruoyi.management.domain.dto.ManagementimgVolumeProductionZyVO> SlGoodsShelfDTO = PageDTO.of(page2, com.ruoyi.management.domain.dto.ManagementimgVolumeProductionZyVO.class); |
| | | List<com.ruoyi.management.domain.dto.ManagementimgVolumeProductionZyVO> list2 = SlGoodsShelfDTO.getList(); |
| | | PageDTO<com.ruoyi.management.domain.dto.ManagementimgVolumeProductionZyVO> sl = PageDTO.of(page2, com.ruoyi.management.domain.dto.ManagementimgVolumeProductionZyVO.class); |
| | | List<com.ruoyi.management.domain.dto.ManagementimgVolumeProductionZyVO> list2 = sl.getList(); |
| | | for(com.ruoyi.management.domain.dto.ManagementimgVolumeProductionZyVO list:list2) { |
| | | SlVolumeProductionRk slVolumeProductionRk = slVolumeProductionRkMapper.selectById(list.getRkId()); |
| | | list.setStoreManagementNumber(slVolumeProductionRk.getStoreManagementNumber()); |
| | |
| | | SlGoodsMaterials slGoodsMaterials = slGoodsMaterialsMapper.selectById(slVolumeProductionRk.getMaterialsId()); |
| | | list.setGoodsMaterialsName(slGoodsMaterials.getGoodsMaterialsName()); |
| | | list.setIsConsume(slGoodsMaterials.getIsConsume()); |
| | | SlGoodsShelf slGoodsShelf = slGoodsShelfMapper.selectById(slVolumeProductionRk.getShelfId()); |
| | | SlGoodsShelf slGoodsShelf = slGoodsShelfMapper.selectById(list.getShelfId()); |
| | | list.setGoodsShelfName(slGoodsShelf.getGoodsShelfName()); |
| | | list.setShelfId(slGoodsShelf.getId()); |
| | | if(list.getScrkId()!=null){ |
| | | SlVolumeProductionRk slVolumeProductionRk1 = slVolumeProductionRkMapper.selectById(list.getScrkId()); |
| | | list.setStoreManagementNumber(slVolumeProductionRk1.getStoreManagementNumber()); |
| | | list.setRkNumber(slVolumeProductionRk1.getRkNumber()); |
| | | list.setZyNumber(slVolumeProductionRk1.getRkNumber()); |
| | | } |
| | | list.setZkNum(list.getRepertoryZhai()); |
| | | } |
| | | v.setList(SlGoodsShelfDTO); |
| | | v.setList(sl); |
| | | |
| | | return v; |
| | | } |
| | | |
| | | @Override |
| | | public VolumeProductionZyglInventoryVO getVolumeProductionZyglnventory(Integer id) { |
| | | public VolumeProductionZyglInventoryVO getVolumeProductionZyglnventory(String id) { |
| | | SlVolumeProductionZygl byId = this.getById(id); |
| | | VolumeProductionZyglInventoryVO vo = new VolumeProductionZyglInventoryVO(); |
| | | SysUser data = sysUserClient.getSysUser(byId.getId()).getData(); |
| | | |
| | | |
| | | SysUser data = sysUserClient.getSysUser(byId.getSysId()).getData(); |
| | | vo.setSysPhone(data.getPhonenumber()); |
| | | vo.setSysName(data.getNickName()); |
| | | vo.setStartiTime(byId.getStartiTime()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void zy(Integer id) { |
| | | public void zy(Long id,String authorizationUrl) { |
| | | SlVolumeProductionZygl byId = this.getById(id); |
| | | byId.setAuthorizationUrl(authorizationUrl); |
| | | byId.setAuditStatus(6); |
| | | byId.setPresentState(4); |
| | | byId.setEndTime(new Date()); |
| | | this.updateById(byId); |
| | | LambdaQueryWrapper<SlVolumeProductionZy> wrapper1 = Wrappers.lambdaQuery(); |
| | | wrapper1.eq(SlVolumeProductionZy::getZyglId, id); |
| | | wrapper1.eq(SlVolumeProductionZy::getDelFlag, 0); |
| | | wrapper1.orderByDesc(SlVolumeProductionZy::getCreateTime); |
| | | List<SlVolumeProductionZy> page2 = slVolumeProductionZyMapper.selectList(wrapper1); |
| | | // 新入库ids |
| | | List<Long> collect = page2.stream().map(SlVolumeProductionZy::getScrkId).collect(Collectors.toList()); |
| | | for (SlVolumeProductionZy zy:page2){ |
| | | SlVolumeProductionRk slVolumeProductionRk=new SlVolumeProductionRk(); |
| | | slVolumeProductionRk.setMaterialsId(zy.getMaterialsId()); |
| | | slVolumeProductionRk.setStoreManagementNumber(zy.getStoreManagementNumber()); |
| | | slVolumeProductionRk.setManagementId(byId.getBmanagementId()); |
| | | slVolumeProductionRk.setRkNumber("CD-"+new Date().getTime()); |
| | | slVolumeProductionRk.setRkNum(Long.valueOf(zy.getZyNum())); |
| | | slVolumeProductionRk.setShelfId(zy.getShelfId()); |
| | | slVolumeProductionRk.setRepertoryZhai(Long.valueOf(zy.getZyNum())); |
| | | slVolumeProductionRk.setCreateTime(new Date()); |
| | | slVolumeProductionRkMapper.insert(slVolumeProductionRk); |
| | | zy.setScrkId(slVolumeProductionRk.getId()); |
| | | slVolumeProductionZyMapper.updateById(zy); |
| | | // 确认转移之后扣库存 |
| | | SlVolumeProductionRk slVolumeProductionRk1 = slVolumeProductionRkMapper.selectById(zy.getRkId()); |
| | | slVolumeProductionRk1.setRepertoryZhai(slVolumeProductionRk1.getRepertoryZhai()-Long.valueOf(zy.getZyNum())); |
| | | slVolumeProductionRkMapper.updateById(slVolumeProductionRk1); |
| | | // 给被转移入仓库加库存数量 |
| | | LambdaQueryWrapper<ManagementGoodsMaterials> wrapper2 = Wrappers.lambdaQuery(); |
| | | wrapper2.eq(ManagementGoodsMaterials::getGoodsMaterialsId,zy.getMaterialsId()); |
| | | wrapper2.eq(ManagementGoodsMaterials::getManagementId,byId.getBmanagementId()); |
| | |
| | | Long re1=repertoryZhai+Long.valueOf(zy.getZyNum()); |
| | | managementGoodsMaterials.setRepertorySum(re); |
| | | managementGoodsMaterials.setRepertoryZhai(re1); |
| | | managementGoodsMaterials.setRepertoryChu(0); |
| | | managementGoodsMaterialsMapper.updateById(managementGoodsMaterials); |
| | | }else{ |
| | | ManagementGoodsMaterials managementGoodsMaterials1=new ManagementGoodsMaterials(); |
| | |
| | | managementGoodsMaterials1.setGoodsMaterialsId(zy.getMaterialsId()); |
| | | managementGoodsMaterials1.setRepertoryZhai(Long.valueOf(zy.getZyNum())); |
| | | managementGoodsMaterials1.setRepertorySum(Long.valueOf(zy.getZyNum())); |
| | | managementGoodsMaterials1.setRepertoryChu(0); |
| | | managementGoodsMaterials1.setCreateTime(new Date()); |
| | | managementGoodsMaterialsMapper.insert(managementGoodsMaterials1); |
| | | } |
| | | // 给转移仓库减去库存数量 |
| | | LambdaQueryWrapper<ManagementGoodsMaterials> wrapper3 = Wrappers.lambdaQuery(); |
| | | wrapper3.eq(ManagementGoodsMaterials::getGoodsMaterialsId,zy.getMaterialsId()); |
| | | wrapper3.eq(ManagementGoodsMaterials::getManagementId,byId.getManagementId()); |
| | | wrapper3.eq(ManagementGoodsMaterials::getDelFlag, 0); |
| | | ManagementGoodsMaterials managementGoodsMaterials1 = managementGoodsMaterialsMapper.selectOne(wrapper3); |
| | | if (managementGoodsMaterials1!=null){ |
| | | Long repertorySum = managementGoodsMaterials1.getRepertorySum(); |
| | | Long repertoryZhai = managementGoodsMaterials1.getRepertoryZhai(); |
| | | Long re=repertorySum-Long.valueOf(zy.getZyNum()); |
| | | Long re1=repertoryZhai-Long.valueOf(zy.getZyNum()); |
| | | // managementGoodsMaterials1.setRepertorySum(re); |
| | | managementGoodsMaterials1.setRepertoryZhai(re1); |
| | | managementGoodsMaterials1.setRepertoryChu(managementGoodsMaterials1.getRepertoryChu()+zy.getZyNum()); |
| | | managementGoodsMaterialsMapper.updateById(managementGoodsMaterials1); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | server-addr: 192.168.110.235:8848 |
| | | server-addr: 192.168.110.64:8848 |
| | | service: ${spring.application.name} |
| | | group: DEFAULT_GROUP |
| | | namespace: 689e0f09-d102-460c-ac5c-5ea50a3174be |
| | | config: |
| | | # 配置中心地址 |
| | | server-addr: 192.168.110.235:8848 |
| | | server-addr: 192.168.110.64:8848 |
| | | namespace: 689e0f09-d102-460c-ac5c-5ea50a3174be |
| | | group: DEFAULT_GROUP |
| | | name: ${spring.application.name} |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | server-addr: 192.168.110.235:8848 |
| | | server-addr: 127.0.0.1:8848 |
| | | service: ${spring.application.name} |
| | | group: DEFAULT_GROUP |
| | | namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 |
| | | config: |
| | | # 配置中心地址 |
| | | server-addr: 192.168.110.188:8848 |
| | | server-addr: 127.0.0.1:8848 |
| | | namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 |
| | | group: DEFAULT_GROUP |
| | | name: ${spring.application.name} |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | server-addr: 192.168.110.188:8848 |
| | | server-addr: 127.0.0.1:8848 |
| | | service: ${spring.application.name} |
| | | group: DEFAULT_GROUP |
| | | namespace: 96712c7a-480b-4f40-b783-39f00f3b33ce |
| | | config: |
| | | # 配置中心地址 |
| | | server-addr: 192.168.110.188:8848 |
| | | server-addr: 127.0.0.1:8848 |
| | | namespace: 96712c7a-480b-4f40-b783-39f00f3b33ce |
| | | group: DEFAULT_GROUP |
| | | name: ${spring.application.name} |
| | |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | <select id="getById1" resultType="com.ruoyi.management.domain.InventoriesSupplies"> |
| | | select * from inventories_supplies |
| | | where inventories_supplies.id=#{id} |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <mapper namespace="com.ruoyi.management.mapper.SlGoodsMaterialsMapper"> |
| | | |
| | | |
| | | <update id="update1"> |
| | | update sl_goods_materials |
| | | <set> |
| | | <if test="req.goodsMaterialsName != null and req.goodsMaterialsName != ''"> |
| | | goods_materials_name = #{req.goodsMaterialsName}, |
| | | </if> |
| | | <if test="req.goodsMaterialsNo != null and req.goodsMaterialsNo != ''"> |
| | | goods_materials_no = #{req.goodsMaterialsNo}, |
| | | </if> |
| | | <if test="req.isConsume != null and req.isConsume != ''"> |
| | | is_consume = #{req.isConsume}, |
| | | </if> |
| | | <if test="req.repertory != null and req.repertory != ''"> |
| | | repertory = #{req.repertory}, |
| | | </if> |
| | | </set> |
| | | WHERE id = #{req.id} |
| | | </update> |
| | | </mapper> |
| | |
| | | /** |
| | | * 获取部门列表 |
| | | */ |
| | | @RequiresPermissions("system:dept:list") |
| | | @GetMapping("/list") |
| | | @ApiOperation("获取部门列表") |
| | | public AjaxResult list(SysDept dept) |
| | |
| | | return success(depts); |
| | | } |
| | | |
| | | @RequiresPermissions("system:dept:list") |
| | | @GetMapping("/pagelist") |
| | | @ApiOperation("分页获取部门列表") |
| | | public AjaxResult pagelist(deptQuery dept) |
| | |
| | | /** |
| | | * 根据部门编号获取详细信息 |
| | | */ |
| | | @RequiresPermissions("system:dept:query") |
| | | @GetMapping(value = "/{deptId}") |
| | | @ApiOperation("根据部门编号获取详细信息") |
| | | public AjaxResult getInfo(@PathVariable Long deptId) |
| | |
| | | /** |
| | | * 新增部门 |
| | | */ |
| | | @RequiresPermissions("system:dept:add") |
| | | @ApiOperation("新增部门") |
| | | @Log(title = "部门管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | /** |
| | | * 修改部门 |
| | | */ |
| | | @RequiresPermissions("system:dept:edit") |
| | | @Log(title = "部门管理", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("修改部门") |
| | | @PutMapping |
| | |
| | | /** |
| | | * 删除部门 |
| | | */ |
| | | @RequiresPermissions("system:dept:remove") |
| | | @Log(title = "部门管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{deptId}") |
| | | @ApiOperation("删除部门管理") |
| | |
| | | if(gy.getEndTime()!=null){ |
| | | wrapper.gt(SysOperLog::getOperTime, gy.getEndTime()); |
| | | } |
| | | |
| | | |
| | | wrapper.orderByDesc(SysOperLog::getOperTime); |
| | | Page<SysOperLog> sysOperLogPage = operLogService.selectPage(page, wrapper); |
| | | return R.ok(sysOperLogPage); |
| | | } |
| | |
| | | if(CollectionUtils.isEmpty(menuIds1)){ |
| | | return AjaxResult.error("菜单id不能为空"); |
| | | } |
| | | role.setMenuIds(dto.getMenuIds().toArray(new Long[0])); |
| | | role.setMenuIds(dto.getMenuIds().toArray((new Long[dto.getMenuIds().size()]))); |
| | | // 添加角色 |
| | | role.setCreateBy(SecurityUtils.getUsername()); |
| | | role.setCreateTime(new Date()); |
| | |
| | | package com.ruoyi.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | |
| | | public AjaxResult add(@Validated(InsertGroup.class) @RequestBody SysUserDTO dto) { |
| | | SysUser user = BeanUtils.copyBean(dto, SysUser.class); |
| | | user.setUserId(null); |
| | | user.setUserType("01"); |
| | | // 添加为平台管理员 |
| | | user.setUserType("00"); |
| | | user.setUserName(user.getPhonenumber()); |
| | | if(!org.springframework.util.StringUtils.hasLength(user.getNickName())){ |
| | | user.setNickName(user.getPhonenumber()); |
| | |
| | | SysRole byId = roleService.selectRoleById(dto.getRoleId()); |
| | | user.setRoleName(byId.getRoleName()); |
| | | user.setRoleId(dto.getRoleId()); |
| | | // 原来的role |
| | | SysUserRole one = userRoleService.getOne(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId,dto.getUserId() )); |
| | | one.setRoleId(dto.getRoleId()); |
| | | //更新新的role |
| | | userRoleService.updateSysUserRole(one); |
| | | return toAjax(userService.updateById(user)); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | @Log(title = "用户管理", businessType = BusinessType.EXPORT) |
| | | @RequiresPermissions("system:user:export") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, SysUser user) { |
| | | List<SysUser> list = userService.selectUserList(user); |
| | |
| | | } |
| | | |
| | | @Log(title = "用户管理", businessType = BusinessType.IMPORT) |
| | | @RequiresPermissions("system:user:import") |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { |
| | | ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class); |
| | |
| | | /** |
| | | * 重置密码 |
| | | */ |
| | | @RequiresPermissions("system:user:edit") |
| | | @ApiOperation("重置密码") |
| | | @Log(title = "用户管理", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/resetPwd") |
| | |
| | | if (StringUtils.isNull(user)) { |
| | | throw new ServiceException("账号不存在"); |
| | | } |
| | | |
| | | userService.checkUserAllowed(user); |
| | | userService.checkUserDataScope(user.getUserId()); |
| | | user.setPassword(SecurityUtils.encryptPassword(dto.getPassword())); |
| | | user.setPassword(SecurityUtils.encryptPassword("a123456")); |
| | | user.setUpdateBy(SecurityUtils.getUsername()); |
| | | return toAjax(userService.resetPwd(user)); |
| | | } |
| | | |
| | | @ApiOperation("修改密码") |
| | | @PostMapping("/updatePwd") |
| | | public AjaxResult updatePwd(@RequestBody ResetPwdDTO dto) { |
| | | // 判断旧密码是否和当前密码是否匹配 |
| | | SysUser one = userService.getOne(new QueryWrapper<SysUser>() |
| | | .eq("phonenumber", dto.getPhonenumber()) |
| | | .eq("del_flag", 0)); |
| | | if (one == null){ |
| | | return AjaxResult.error("账号不存在"); |
| | | } |
| | | if (SecurityUtils.matchesPassword(dto.getPassword(),one.getPassword())) { |
| | | return AjaxResult.error("新密码不能和旧密码一致"); |
| | | } |
| | | if (SecurityUtils.matchesPassword(dto.getOldPassword(),one.getPassword())){ |
| | | return AjaxResult.error("旧密码错误"); |
| | | } |
| | | userService.updateById(one); |
| | | return AjaxResult.success(); |
| | | } |
| | | /** |
| | | * 获取当前用户信息 |
| | | */ |
| | |
| | | /** |
| | | * 状态修改 |
| | | */ |
| | | @RequiresPermissions("system:user:edit") |
| | | @Log(title = "用户管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/changeStatus") |
| | | public AjaxResult changeStatus(@RequestBody SysUser user) { |
| | |
| | | /** |
| | | * 根据用户编号获取授权角色 |
| | | */ |
| | | @RequiresPermissions("system:user:query") |
| | | @GetMapping("/authRole/{userId}") |
| | | public AjaxResult authRole(@PathVariable("userId") Long userId) { |
| | | AjaxResult ajax = AjaxResult.success(); |
| | |
| | | /** |
| | | * 用户授权角色 |
| | | */ |
| | | @RequiresPermissions("system:user:edit") |
| | | @Log(title = "用户管理", businessType = BusinessType.GRANT) |
| | | @PutMapping("/authRole") |
| | | public AjaxResult insertAuthRole(Long userId, Long[] roleIds) { |
| | |
| | | /** |
| | | * 获取部门树列表 |
| | | */ |
| | | @RequiresPermissions("system:user:list") |
| | | @GetMapping("/deptTree") |
| | | public AjaxResult deptTree(SysDept dept) { |
| | | return success(deptService.selectDeptTreeList(dept)); |
| | |
| | | public R<PageDTO<ConservatorVO>> getConservatorPage(@Validated @RequestBody ConservatorQuery query) { |
| | | return R.ok(userService.getConservatorPage(query)); |
| | | } |
| | | @ApiOperation(value = "根据仓库等级和所在地获取管理员列表--不分页", notes = "获取仓库管理分页列表") |
| | | @PostMapping("/conservator-page2") |
| | | public R<List<SysUser>> getConservatorPage2(@RequestBody ConservatorQueryA query) { |
| | | return R.ok(userService.getConservatorPage2(query)); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取仓库管理员不分页列表", notes = "获取仓库管理分页列表") |
| | | @PostMapping("/conservator-page1") |
| | | public R<List<SysUser>> getConservatorPage1() { |
| | | return R.ok(userService.getConservatorPage1()); |
| | | @GetMapping("/conservator-page1/{grade}") |
| | | public R<List<SysUser>> getConservatorPage1(@PathVariable("grade") String grade) { |
| | | return R.ok(userService.getConservatorPage1(grade)); |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | package com.ruoyi.system.domain.dto; |
| | | |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("查询管理员列表DTO") |
| | | public class ConservatorQueryA { |
| | | |
| | | @ApiModelProperty(value = "2省 3市州 4市县 5乡镇 6经营单位") |
| | | private Integer grade; |
| | | @ApiModelProperty(value = "市州code") |
| | | private String cityCode; |
| | | @ApiModelProperty(value = "市县code") |
| | | private String countyCode; |
| | | @ApiModelProperty(value = "乡镇code") |
| | | private String townCode; |
| | | |
| | | } |
| | |
| | | * @date 2024/6/19 |
| | | */ |
| | | @Data |
| | | @ApiModel("重置密码") |
| | | @ApiModel("重置/修改密码") |
| | | public class ResetPwdDTO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -4349599620340762098L; |
| | | |
| | | @ApiModelProperty(value = "账号id") |
| | | @NotNull(message = "账号ID不能为空") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "新密码") |
| | | @NotBlank(message = "新密码不能为空") |
| | | private String password; |
| | | @ApiModelProperty(value = "旧密码") |
| | | @NotBlank(message = "旧密码不能为空") |
| | | private String oldPassword; |
| | | @ApiModelProperty(value = "账号/手机号") |
| | | @NotBlank(message = "手机号不能为空") |
| | | private String phonenumber; |
| | | } |
| | |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.domain.dto.ConservatorDTO; |
| | | import com.ruoyi.system.domain.dto.ConservatorQuery; |
| | | import com.ruoyi.system.domain.dto.SupplierDTO; |
| | | import com.ruoyi.system.domain.dto.SupplierQuery; |
| | | import com.ruoyi.system.domain.dto.*; |
| | | import com.ruoyi.system.domain.vo.ConservatorVO; |
| | | import com.ruoyi.system.domain.vo.SupplierVO; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | void deleteSupplier(Long id); |
| | | |
| | | PageDTO<ConservatorVO> getConservatorPage(ConservatorQuery query); |
| | | List<SysUser> getConservatorPage2(ConservatorQueryA query); |
| | | |
| | | List<SysUser> getConservatorPage1(); |
| | | List<SysUser> getConservatorPage1(String grade); |
| | | |
| | | void saveConservator(ConservatorDTO dto); |
| | | |
| | |
| | | for (Long menuId : menuIds) { |
| | | longs.add(menuId); |
| | | } |
| | | if(!longs.contains(1061L)){ |
| | | longs.add(1061L); |
| | | longs.add(1062L); |
| | | longs.add(1065L); |
| | | longs.add(1073L); |
| | | longs.add(1161L); |
| | | longs.add(1203L); |
| | | } |
| | | |
| | | for (Long menuId : longs) |
| | | { |
| | | SysRoleMenu rm = new SysRoleMenu(); |
| | |
| | | import com.ruoyi.system.domain.SysPost; |
| | | import com.ruoyi.system.domain.SysUserPost; |
| | | import com.ruoyi.system.domain.SysUserRole; |
| | | import com.ruoyi.system.domain.dto.ConservatorDTO; |
| | | import com.ruoyi.system.domain.dto.ConservatorQuery; |
| | | import com.ruoyi.system.domain.dto.SupplierDTO; |
| | | import com.ruoyi.system.domain.dto.SupplierQuery; |
| | | import com.ruoyi.system.domain.dto.*; |
| | | import com.ruoyi.system.domain.vo.ConservatorVO; |
| | | import com.ruoyi.system.domain.vo.SupplierVO; |
| | | import com.ruoyi.system.mapper.SysPostMapper; |
| | |
| | | |
| | | return PageDTO.of(page1, ConservatorVO.class); |
| | | } |
| | | @Override |
| | | public List<SysUser> getConservatorPage2(ConservatorQueryA query) { |
| | | |
| | | LambdaQueryWrapper<SysUser> wrapper1= Wrappers.lambdaQuery(); |
| | | wrapper1.eq(SysUser::getUserType, "03"); |
| | | wrapper1.eq(SysUser::getDelFlag,"0"); |
| | | if (org.springframework.util.StringUtils.hasLength(query.getTownCode())){ |
| | | wrapper1.eq(SysUser::getTownCode,query.getTownCode()); |
| | | }else if (org.springframework.util.StringUtils.hasLength(query.getCountyCode())){ |
| | | wrapper1.eq(SysUser::getCountyCode,query.getCountyCode()); |
| | | }else if (org.springframework.util.StringUtils.hasLength(query.getCityCode())){ |
| | | wrapper1.eq(SysUser::getCityCode,query.getCityCode()); |
| | | } |
| | | List<SysUser> list = this.list(wrapper1); |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<SysUser> getConservatorPage1() { |
| | | public List<SysUser> getConservatorPage1(String grade) { |
| | | QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>(); |
| | | sysUserQueryWrapper.eq("del_flag",0); |
| | | sysUserQueryWrapper.eq("user_type","03"); |
| | | if (grade!=null){ |
| | | sysUserQueryWrapper.eq("roleType",grade); |
| | | } |
| | | List<SysUser> page1 = this.list(sysUserQueryWrapper); |
| | | |
| | | return page1; |
| | |
| | | @Override |
| | | public void saveConservator(ConservatorDTO dto) { |
| | | SysUser user = BeanUtils.copyBean(dto, SysUser.class); |
| | | |
| | | // 添加 |
| | | if (StringUtils.isNull(dto.getUserId())) { |
| | | boolean b = checkPhoneUnique(user); |
| | |
| | | user.setUserName(dto.getPhonenumber()); |
| | | user.setUserType("03"); |
| | | user.setCreateTime(new Date()); |
| | | user.setPassword(SecurityUtils.encryptPassword("123456")); |
| | | user.setPassword(SecurityUtils.encryptPassword("a123456")); |
| | | user.setCreateBy(SecurityUtils.getUsername()); |
| | | user.setProvinceName(dto.getProvinceName()); |
| | | user.setProvinceCode(dto.getProvinceCode()); |
| | |
| | | if (StringUtils.isNull(user)) { |
| | | throw new ServiceException("管理员不存在"); |
| | | } |
| | | boolean b = checkPhoneUnique(user); |
| | | if (!b) { |
| | | throw new ServiceException("该手机号已存在"); |
| | | } |
| | | user.setNickName(dto.getNickName()); |
| | | user.setPhonenumber(dto.getPhonenumber()); |
| | | user.setUserName(dto.getPhonenumber()); |
| | |
| | | public static void sendMessageToUsersByText(String message) |
| | | { |
| | | Collection<Session> values = USERS.values(); |
| | | for (Session value : values) |
| | | { |
| | | for (Session value : values) { |
| | | sendMessageToUserByText(value, message); |
| | | } |
| | | } |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | server-addr: 192.168.110.235:8848 |
| | | server-addr: 192.168.110.64:8848 |
| | | service: ${spring.application.name} |
| | | group: DEFAULT_GROUP |
| | | namespace: 689e0f09-d102-460c-ac5c-5ea50a3174be |
| | | config: |
| | | # 配置中心地址 |
| | | server-addr: 192.168.110.235:8848 |
| | | server-addr: 192.168.110.64:8848 |
| | | namespace: 689e0f09-d102-460c-ac5c-5ea50a3174be |
| | | group: DEFAULT_GROUP |
| | | name: ${spring.application.name} |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | server-addr: 192.168.110.188:8848 |
| | | server-addr: 192.168.110.64:8848 |
| | | service: ${spring.application.name} |
| | | group: DEFAULT_GROUP |
| | | namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 |
| | | namespace: 689e0f09-d102-460c-ac5c-5ea50a3174be |
| | | config: |
| | | # 配置中心地址 |
| | | server-addr: 192.168.110.188:8848 |
| | | namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 |
| | | server-addr: 192.168.110.64:8848 |
| | | namespace: 689e0f09-d102-460c-ac5c-5ea50a3174be |
| | | group: DEFAULT_GROUP |
| | | name: ${spring.application.name} |
| | | # 配置文件格式 |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | server-addr: 192.168.110.188:8848 |
| | | server-addr: 192.168.110.64:8848 |
| | | service: ${spring.application.name} |
| | | group: DEFAULT_GROUP |
| | | namespace: 96712c7a-480b-4f40-b783-39f00f3b33ce |
| | | namespace: 689e0f09-d102-460c-ac5c-5ea50a3174be |
| | | config: |
| | | # 配置中心地址 |
| | | server-addr: 192.168.110.188:8848 |
| | | namespace: 96712c7a-480b-4f40-b783-39f00f3b33ce |
| | | server-addr: 192.168.110.64:8848 |
| | | namespace: 689e0f09-d102-460c-ac5c-5ea50a3174be |
| | | group: DEFAULT_GROUP |
| | | name: ${spring.application.name} |
| | | # 配置文件格式 |
| | |
| | | </sql> |
| | | |
| | | <select id="selectUserList" parameterType="com.ruoyi.system.api.domain.SysUser" resultMap="SysUserResult"> |
| | | select u.user_id, u.dept_id,u.contacts, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u |
| | | select u.user_id, u.dept_id,u.contacts, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | where u.del_flag = '0' |
| | | <if test="phonenumber != null and phonenumber != ''"> |
| | |
| | | from sys_user |
| | | where phonenumber = #{phonenumber} |
| | | and del_flag = '0' |
| | | and user_type != '02' |
| | | limit 1 |
| | | </select> |
| | | |
| | |
| | | <setting name="cacheEnabled" value="true"/> |
| | | <!-- 延迟加载的全局开关。当开启时,所有关联对象都会延迟加载。默认 false --> |
| | | <!-- <setting name="lazyLoadingEnabled" value="true"/> --> |
| | | <setting name="mapUnderscoreToCamelCase" value="false"/><!--是否将map下划线方式转为驼峰式命名--> |
| | | <setting name="mapUnderscoreToCamelCase" value="true"/><!--是否将map下划线方式转为驼峰式命名--> |
| | | <!-- 当开启时,任何方法的调用都会加载该对象的所有属性。默认 false,可通过select标签的 fetchType来覆盖--> |
| | | <!-- <setting name="aggressiveLazyLoading" value="false"/>--> |
| | | <!-- Mybatis 创建具有延迟加载能力的对象所用到的代理工具,默认JAVASSIST --> |