diff --git a/ant-design-vue-jeecg/src/views/team/modules/GroupxModal.vue b/ant-design-vue-jeecg/src/views/team/modules/GroupxModal.vue index a18ee2b0..1faa7bfa 100644 --- a/ant-design-vue-jeecg/src/views/team/modules/GroupxModal.vue +++ b/ant-design-vue-jeecg/src/views/team/modules/GroupxModal.vue @@ -11,14 +11,14 @@ - + - - + --> + + diff --git a/ant-design-vue-jeecg/src/views/team/modules/StationModal.vue b/ant-design-vue-jeecg/src/views/team/modules/StationModal.vue index 0ab73814..3e3d1eaf 100644 --- a/ant-design-vue-jeecg/src/views/team/modules/StationModal.vue +++ b/ant-design-vue-jeecg/src/views/team/modules/StationModal.vue @@ -16,14 +16,18 @@ - - + --> + + diff --git a/ant-design-vue-jeecg/src/views/zyProcessModular/ZyProcessModularList.vue b/ant-design-vue-jeecg/src/views/zyProcessModular/ZyProcessModularList.vue index f02c670e..8a3d811a 100644 --- a/ant-design-vue-jeecg/src/views/zyProcessModular/ZyProcessModularList.vue +++ b/ant-design-vue-jeecg/src/views/zyProcessModular/ZyProcessModularList.vue @@ -114,7 +114,7 @@ 详情 - + 删除 diff --git a/ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue b/ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue index 21485668..8391ce0e 100644 --- a/ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue +++ b/ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue @@ -161,19 +161,22 @@ required: true, message: '请选择类型!' }], number: [ - { required: false}, + { required: true, message: '请输入包装个数!'}, { pattern: /^[+]{0,1}(\d+)$/, message: '包装个数必须大于等于0!'}, ], unitPrice: [ - { required: false}, + { required: true, message: '请输入单价!'}, { pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!'}, ], + unit: [ + { required: true , message: '请输入单位!'} + ], discount: [ - { required: false}, + { required: true, message: '请输入折扣!'}, { pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!'}, ], promotionPrice: [ - { required: false}, + { required: true, message: '请输入促销价!'}, { pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!'}, ], goodsName: [ diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java index a7f5093d..2f52b662 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java @@ -400,10 +400,10 @@ public class ZyGoodsController extends JeecgController //顺序号 String sxh = ""; ZyGoods zyGoods = new ZyGoods(); - //随机6位随机码 +/* //随机6位随机码 QueryWrapper qw =new QueryWrapper(); List zyGoodslong = zyGoodsService.list(qw); - String rcode=UniqueRanNumUtils.generateCode(zyGoodslong.size()); + String rcode=UniqueRanNumUtils.generateCode(zyGoodslong.size());*/ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyGoods, req.getParameterMap()); queryWrapper.eq("cloths_type_id",lxid); @@ -411,7 +411,8 @@ public class ZyGoodsController extends JeecgController List list = zyGoodsService.list(queryWrapper); sxh = list.size()+1+""; //随机数=服装类型编号+随机6位+型号编码+该类型商品长度 - spbh = lxbh+rcode+ xhbm + sxh; + //spbh = lxbh+rcode+ xhbm + sxh; + spbh = lxbh+ xhbm + sxh; return Result.OK(spbh); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java index e6674f27..b090c7f7 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java @@ -117,8 +117,12 @@ public class ZyProductPlanController extends JeecgController edit(@RequestBody ZyProductPlan zyProductPlan) { - SysUser sysUser = iSysUserService.getOne(new LambdaQueryWrapper().eq(SysUser::getRealname, zyProductPlan.getTeamLeader())); - zyProductPlan.setTeamLeader(sysUser.getUsername()); +// SysUser sysUser = iSysUserService.getOne(new LambdaQueryWrapper() +// .eq(SysUser::getRealname, zyProductPlan.getTeamLeader()) +// .orderByDesc(SysUser::getCreateTime) +// .last("limit 1") +// ); +// zyProductPlan.setTeamLeader(sysUser.getUsername()); zyProductPlanService.updateById(zyProductPlan); return Result.OK("编辑成功!"); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/IZyProductPlanAutoServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/IZyProductPlanAutoServiceImpl.java index aebe0b79..288ace06 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/IZyProductPlanAutoServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/IZyProductPlanAutoServiceImpl.java @@ -457,20 +457,22 @@ public class IZyProductPlanAutoServiceImpl extends ServiceImpl stationMachineList = iStationMachineService.list(new LambdaQueryWrapper().eq(StationMachine::getStationId, station.getId())); //工位设备ids - List stationMachineIds = Optional.ofNullable(stationMachineList).orElse(new ArrayList<>()).stream().map(StationMachine::getMachineId).collect(Collectors.toList()); - List zyDeviceList = iZyDeviceService.list(new LambdaQueryWrapper().in(ZyDevice::getId, stationMachineIds)); - List zyDevice_typeCodes = Optional.ofNullable(zyDeviceList).orElse(new ArrayList<>()).stream().map(ZyDevice::getTypeCode).collect(Collectors.toList()); - // 工位设备包含工序设备即匹配成功 - if (zyDevice_typeCodes.containsAll(zyProcessCodes)) { - String machineIds = zyProcessMachineIds.stream().collect(Collectors.joining(",")); - zyPlanProcess.setMachineIds(machineIds); - zyPlanProcess.setMachineNames(iStationMachineService.convertByMachineIds(zyProcessMachineIds)); - zyPlanProcess.setStationId(station.getId()); - zyPlanProcess.setStationName(station.getStationName()); - zyPlanProcess.setStationNum(station.getStationNum()); - return zyPlanProcess; + List stationMachineList = iStationMachineService.list(new LambdaQueryWrapper().eq(StationMachine::getStationId, station.getId())); + if (!ObjectUtils.isEmpty(stationMachineList)) { + List stationMachineIds = Optional.ofNullable(stationMachineList).orElse(new ArrayList<>()).stream().map(StationMachine::getMachineId).collect(Collectors.toList()); + List zyDeviceList = iZyDeviceService.list(new LambdaQueryWrapper().in(ZyDevice::getId, stationMachineIds)); + List zyDevice_typeCodes = Optional.ofNullable(zyDeviceList).orElse(new ArrayList<>()).stream().map(ZyDevice::getTypeCode).collect(Collectors.toList()); + // 工位设备包含工序设备即匹配成功 + if (zyDevice_typeCodes.containsAll(zyProcessCodes)) { + String machineIds = zyProcessMachineIds.stream().collect(Collectors.joining(",")); + zyPlanProcess.setMachineIds(machineIds); + zyPlanProcess.setMachineNames(iStationMachineService.convertByMachineIds(zyProcessMachineIds)); + zyPlanProcess.setStationId(station.getId()); + zyPlanProcess.setStationName(station.getStationName()); + zyPlanProcess.setStationNum(station.getStationNum()); + return zyPlanProcess; + } } } } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java index 59c6d336..ee8319e2 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.jeecg.common.exception.JeecgBootException; import org.jeecg.modules.demo.accessories.entity.ZyAccessories; @@ -77,6 +78,7 @@ import java.util.stream.Collectors; * @Version: V1.0 */ @Service +@Slf4j public class ZyPlanProcessServiceImpl extends ServiceImpl implements IZyPlanProcessService { @Autowired @@ -260,7 +262,7 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl planProcessList = this.list(new LambdaQueryWrapper().eq(ZyPlanProcess::getPlanId, zyPlanProcess.getPlanId())); if (ObjectUtils.isEmpty(planProcessList)) return; @@ -304,33 +306,36 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl stationList, List zyProcessMachineList) { - if (!ObjectUtils.isEmpty(zyProcessMachineList)) { + if (!ObjectUtils.isEmpty(stationList) && !ObjectUtils.isEmpty(zyProcessMachineList)) { //工序设备类型列表 List zyDevicetype_codes = zyProcessMachineList.stream().map(ZyProcessMachine::getCode).collect(Collectors.toList()); - Optional.ofNullable(stationList).orElse(new ArrayList<>()).forEach(e -> { - List stationMachineList = iStationMachineService.list(new LambdaQueryWrapper().eq(StationMachine::getStationId, e.getId())); - //工位设备ids - List stationMachineIds = Optional.ofNullable(stationMachineList).orElse(new ArrayList<>()).stream().map(StationMachine::getMachineId).collect(Collectors.toList()); - List zyDeviceList = iZyDeviceService.list(new LambdaQueryWrapper().in(ZyDevice::getId, stationMachineIds)); - List zyDevice_typeCodes = Optional.ofNullable(zyDeviceList).orElse(new ArrayList<>()).stream().map(ZyDevice::getTypeCode).collect(Collectors.toList()); - - /** - * 工位设备包含工序设备即匹配成功 - */ - if (zyDevice_typeCodes.containsAll(zyDevicetype_codes)) { - String collect = zyProcessMachineList.stream().map(ZyProcessMachine::getMachineId).collect(Collectors.joining(",")); - zyPlanProcess.setMachineIds(collect); - zyPlanProcess.setMachineNames(iStationMachineService.convertByMachineIds(stationMachineIds)); - zyPlanProcess.setStationId(e.getId()); - zyPlanProcess.setStationName(e.getStationName()); - zyPlanProcess.setStationNum(e.getStationNum()); - this.updateById(zyPlanProcess); - return; + for (int j = 0; j < stationList.size(); j++) { + Station station = stationList.get(j); + List stationMachineList = iStationMachineService.list(new LambdaQueryWrapper().eq(StationMachine::getStationId, station.getId())); + if (!ObjectUtils.isEmpty(stationMachineList)) { + //工位设备ids + List stationMachineIds = Optional.ofNullable(stationMachineList).orElse(new ArrayList<>()).stream().map(StationMachine::getMachineId).collect(Collectors.toList()); + List zyDeviceList = iZyDeviceService.list(new LambdaQueryWrapper().in(ZyDevice::getId, stationMachineIds)); + List zyDevice_typeCodes = Optional.ofNullable(zyDeviceList).orElse(new ArrayList<>()).stream().map(ZyDevice::getTypeCode).collect(Collectors.toList()); + /** + * 工位设备包含工序设备即匹配成功 + */ + if (zyDevice_typeCodes.containsAll(zyDevicetype_codes)) { + String collect = zyProcessMachineList.stream().map(ZyProcessMachine::getMachineId).collect(Collectors.joining(",")); + zyPlanProcess.setMachineIds(collect); + zyPlanProcess.setMachineNames(iStationMachineService.convertByMachineIds(stationMachineIds)); + zyPlanProcess.setStationId(station.getId()); + zyPlanProcess.setStationName(station.getStationName()); + zyPlanProcess.setStationNum(station.getStationNum()); + this.updateById(zyPlanProcess); + return; + } } - }); + } + } } @@ -467,7 +472,11 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl result = new HashMap<>(); + if (ObjectUtils.isEmpty(ids)) return result; + List fabricList = iZyPlanFabricService.list(new LambdaQueryWrapper() .eq(ZyPlanFabric::getPlanId, zyPlanProcess.getPlanId())); result.put("fabricList", fabricList); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyProductPlanServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyProductPlanServiceImpl.java index ff0b26cf..b3afcf41 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyProductPlanServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyProductPlanServiceImpl.java @@ -91,7 +91,7 @@ public class ZyProductPlanServiceImpl extends ServiceImpl().eq(OrderGoods::getOrdersId, ordersId)); - if (ObjectUtils.isEmpty(orderGoods)) throw new JeecgBootException(ordersId + "订单商品信息不存在"); + if (ObjectUtils.isEmpty(orderGoods)) throw new JeecgBootException(ordersId + ":订单商品信息不存在"); ZyOrders zyOrders = iZyOrdersService.getOne(new LambdaQueryWrapper().eq(ZyOrders::getId, ordersId)); if (ObjectUtils.isEmpty(zyOrders)) throw new JeecgBootException(ordersId + "订单信息不存在"); @@ -137,7 +137,7 @@ public class ZyProductPlanServiceImpl extends ServiceImpl().eq(SysUser::getUsername, zyProductPlan.getTeamLeader())); + SysUser sysUser = iSysUserService.getOne(new LambdaQueryWrapper().eq(SysUser::getRealname, zyProductPlan.getTeamLeader())); zyProductPlan.setTeamLeader(sysUser.getUsername()); zyProductPlan.setStatus(new Integer(ProductPlanStatusEnum.UNAUDITED.getCode())); this.save(zyProductPlan); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-prod.yml b/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-prod.yml index 29845932..3a2c1e89 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-prod.yml +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/application-prod.yml @@ -13,7 +13,6 @@ server: enabled: true min-response-size: 1024 mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/* - management: endpoints: web: @@ -37,31 +36,31 @@ spring: enable: true required: true ## quartz定时任务,采用数据库方式 - quartz: - job-store-type: jdbc - initialize-schema: embedded - #设置自动启动,默认为 true - auto-startup: true - #启动时更新己存在的Job - overwrite-existing-jobs: true - properties: - org: - quartz: - scheduler: - instanceName: MyScheduler - instanceId: AUTO - jobStore: - class: org.quartz.impl.jdbcjobstore.JobStoreTX - driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate - tablePrefix: QRTZ_ - isClustered: true - misfireThreshold: 60000 - clusterCheckinInterval: 10000 - threadPool: - class: org.quartz.simpl.SimpleThreadPool - threadCount: 10 - threadPriority: 5 - threadsInheritContextClassLoaderOfInitializingThread: true + # quartz: + # job-store-type: jdbc + # initialize-schema: embedded + # #设置自动启动,默认为 true + # auto-startup: true + # #启动时更新己存在的Job + # overwrite-existing-jobs: true + # properties: + # org: + # quartz: + # scheduler: + # instanceName: MyScheduler + # instanceId: AUTO + # jobStore: + # class: org.quartz.impl.jdbcjobstore.JobStoreTX + # driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate + # tablePrefix: QRTZ_ + # isClustered: true + # misfireThreshold: 60000 + # clusterCheckinInterval: 10000 + # threadPool: + # class: org.quartz.simpl.SimpleThreadPool + # threadCount: 10 + # threadPriority: 5 + # threadsInheritContextClassLoaderOfInitializingThread: true #json 时间戳统一转换 jackson: date-format: yyyy-MM-dd HH:mm:ss @@ -112,7 +111,7 @@ spring: # 初始化大小,最小,最大 initial-size: 5 min-idle: 5 - maxActive: 1000 + maxActive: 20 # 配置获取连接等待超时的时间 maxWait: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 @@ -132,16 +131,16 @@ spring: connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 datasource: master: - url: jdbc:mysql://127.0.0.1:3306/CostumingPlatform?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai - username: root - password: root - driver-class-name: com.mysql.cj.jdbc.Driver + # url: jdbc:mysql://mysql-lee.mysql.rds.aliyuncs.com:3306/zy?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai + # username: root1 + # password: zxcvbnm023@lee + # driver-class-name: com.mysql.cj.jdbc.Driver # 多数据源配置 #multi-datasource1: - #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai - #username: root - #password: root - #driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://182.92.169.222:3306/costumingplat?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai + username: root + password: ycwl2022. + driver-class-name: com.mysql.cj.jdbc.Driver #redis 配置 redis: database: 0 @@ -155,6 +154,8 @@ spring: shutdown-timeout: 100ms password: 'redis@ycwl2022.' port: 6379 +# password: 'zy2021zy' +# port: 7480 #mybatis plus 设置 mybatis-plus: mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml @@ -168,37 +169,36 @@ mybatis-plus: table-underline: true configuration: # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 - #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 返回类型为Map,显示null对应的字段 call-setters-on-nulls: true #jeecg专用配置 -minidao : +minidao: base-package: org.jeecg.modules.jmreport.* #DB类型(mysql | postgresql | oracle | sqlserver| other) db-type: mysql -jeecg : +jeecg: wordPath: /opt/word # 本地:local\Minio:minio\阿里云:alioss - uploadType: alioss - path : + uploadType: local + path: #文件上传根目录 设置 upload: /opt/upFiles #webapp文件路径 webapp: /opt/webapp shiro: - excludeUrls: /VideoRecorder/jeecgDemo/demo3,/VideoRecorder/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/api/getUserInfo + excludeUrls: /VideoRecorder/jeecgDemo/demo3,/VideoRecorder/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/** #阿里云oss存储和大鱼短信秘钥配置 oss: accessKey: ?? secretKey: ?? endpoint: oss-cn-beijing.aliyuncs.com bucketName: ?? - staticDomain: https://static.jeecg.com - # ElasticSearch 设置 + # ElasticSearch 6设置 elasticsearch: cluster-name: jeecg-ES - cluster-nodes: ?? - check-enabled: true + cluster-nodes: 127.0.0.1:9200 + check-enabled: false # 表单设计器配置 desform: # 主题颜色(仅支持 16进制颜色代码) @@ -209,16 +209,16 @@ jeecg : # 配置百度地图的AK,申请地址:https://lbs.baidu.com/apiconsole/key?application=key#/home baidu: ?? # 在线预览文件服务器地址配置 - file-view-domain: http://fileview.jeecg.com + file-view-domain: 127.0.0.1:8012 # minio文件上传 minio: minio_url: http://minio.jeecg.com minio_name: ?? minio_pass: ?? - bucketName: ?? + bucketName: otatest #大屏报表参数设置 jmreport: - mode: prod + mode: dev #数据字典是否进行saas数据隔离,自己看自己的字典 saas: false #是否需要校验token @@ -241,7 +241,7 @@ jeecg : port: 30007 logPath: logs/jeecg/job/jobhandler/ logRetentionDays: 30 - #自定义路由配置 yml nacos database + #自定义路由配置 yml nacos database route: config: data-id: jeecg-gateway-router @@ -259,7 +259,7 @@ cas: #Mybatis输出sql日志 logging: level: - org.jeecg.modules.system.mapper : info + org.jeecg.modules.system.mapper: info #swagger knife4j: production: false