diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderController.java index a699c5c5..26757b90 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderController.java @@ -993,6 +993,8 @@ public class IoOrderController extends BaseController { public BaseResponse updateOrder(@RequestBody IoOrderEntity ioOrderEntity) { ioOrderEntity.setUpdateTime(new Date()); + ioOrderEntity.setUpdateUser(getUserId() + ""); + ioOrderEntity.setConfirmUser(getUserId() + ""); orderService.updateByBillNo(ioOrderEntity); if (IntUtil.value(ioOrderEntity.getCheckStatus()) != 0) { diff --git a/src/main/java/com/glxp/api/controller/system/VersionController.java b/src/main/java/com/glxp/api/controller/system/VersionController.java new file mode 100644 index 00000000..187c0070 --- /dev/null +++ b/src/main/java/com/glxp/api/controller/system/VersionController.java @@ -0,0 +1,31 @@ +package com.glxp.api.controller.system; + +import com.glxp.api.common.enums.ResultEnum; +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.common.util.ResultVOUtils; +import com.glxp.api.entity.system.VersionEntity; +import com.glxp.api.req.system.FilterVersionRequest; +import com.glxp.api.service.system.VersionService; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.validation.Valid; + +@RestController +public class VersionController { + + + @Resource + private VersionService versionService; + + @GetMapping("/sale/version") + public BaseResponse getVersion(@Valid FilterVersionRequest filterVersionRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + VersionEntity versionEntity = versionService.getVersion(filterVersionRequest); + return ResultVOUtils.success(versionEntity); + } +} diff --git a/src/main/java/com/glxp/api/dao/system/VersionDao.java b/src/main/java/com/glxp/api/dao/system/VersionDao.java new file mode 100644 index 00000000..e78d0113 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/system/VersionDao.java @@ -0,0 +1,13 @@ +package com.glxp.api.dao.system; + +import com.glxp.api.dao.BaseMapperPlus; +import com.glxp.api.entity.system.VersionEntity; +import com.glxp.api.req.system.FilterVersionRequest; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface VersionDao extends BaseMapperPlus { + + VersionEntity getVersion(FilterVersionRequest filterVersionRequest); + +} diff --git a/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java b/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java index a87b8ce9..a86d62e7 100644 --- a/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java +++ b/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java @@ -199,6 +199,10 @@ public class IoOrderEntity { private boolean reviewSp; //是否验收外网单据时,需忽略流转更改为待审核 + @TableField(value = "confirmUser") + private String confirmUser; + + /** * 单据类型:1.业务单据,2:扫码单据,3.正常处理单据 只有草稿,异常,待处理 */ diff --git a/src/main/java/com/glxp/api/entity/system/VersionEntity.java b/src/main/java/com/glxp/api/entity/system/VersionEntity.java new file mode 100644 index 00000000..b7123f90 --- /dev/null +++ b/src/main/java/com/glxp/api/entity/system/VersionEntity.java @@ -0,0 +1,17 @@ +package com.glxp.api.entity.system; + +import lombok.Data; + +@Data +public class VersionEntity { + + private String id; + private String type; + private String versionName; + private String versionCode; + private String appName; + private String createTime; + private String downloadUrl; + private String updateLog; + +} diff --git a/src/main/java/com/glxp/api/req/inv/FilterInvPreProductRequest.java b/src/main/java/com/glxp/api/req/inv/FilterInvPreProductRequest.java index 0ff031e3..a1214ac9 100644 --- a/src/main/java/com/glxp/api/req/inv/FilterInvPreProductRequest.java +++ b/src/main/java/com/glxp/api/req/inv/FilterInvPreProductRequest.java @@ -110,5 +110,5 @@ public class FilterInvPreProductRequest extends ListPageRequest { private Integer filterCount; private String diCode; - + private Integer filterNoInv; } diff --git a/src/main/java/com/glxp/api/req/inv/FilterInvPreinProductRequest.java b/src/main/java/com/glxp/api/req/inv/FilterInvPreinProductRequest.java index e40b4a36..8a25e6b6 100644 --- a/src/main/java/com/glxp/api/req/inv/FilterInvPreinProductRequest.java +++ b/src/main/java/com/glxp/api/req/inv/FilterInvPreinProductRequest.java @@ -114,4 +114,7 @@ public class FilterInvPreinProductRequest extends ListPageRequest { private String startTime; private String endTime; + + private Integer filterNoInv; + } diff --git a/src/main/java/com/glxp/api/req/inv/FilterInvProductRequest.java b/src/main/java/com/glxp/api/req/inv/FilterInvProductRequest.java index a79e292d..b4a5ec81 100644 --- a/src/main/java/com/glxp/api/req/inv/FilterInvProductRequest.java +++ b/src/main/java/com/glxp/api/req/inv/FilterInvProductRequest.java @@ -118,5 +118,7 @@ public class FilterInvProductRequest extends ListPageRequest { private String basicPrductRemak1; private String category; + private Integer filterNoInv; + } diff --git a/src/main/java/com/glxp/api/req/system/FilterVersionRequest.java b/src/main/java/com/glxp/api/req/system/FilterVersionRequest.java new file mode 100644 index 00000000..e0859c02 --- /dev/null +++ b/src/main/java/com/glxp/api/req/system/FilterVersionRequest.java @@ -0,0 +1,9 @@ +package com.glxp.api.req.system; + +import lombok.Data; + +@Data +public class FilterVersionRequest { + + private String type; +} diff --git a/src/main/java/com/glxp/api/res/inout/IoOrderResponse.java b/src/main/java/com/glxp/api/res/inout/IoOrderResponse.java index f4261b5a..ea26e573 100644 --- a/src/main/java/com/glxp/api/res/inout/IoOrderResponse.java +++ b/src/main/java/com/glxp/api/res/inout/IoOrderResponse.java @@ -228,7 +228,7 @@ public class IoOrderResponse { private Date checkTime; private String checkUserName; - + private String confirmUser; //总金额 private BigDecimal allAmount; private Integer confirmStatus; @@ -268,4 +268,6 @@ public class IoOrderResponse { } return exportStatus; } + + private String result; } diff --git a/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java b/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java index f1d5f1b1..46b1eb11 100644 --- a/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java +++ b/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java @@ -1158,7 +1158,7 @@ public class IoAddInoutService { } else { // 4.若数量不足,则出下一批次 - InvProductDetailEntity nextInvProduct = invProductDetailService.selectNextInBatch(bussinessTypeEntity, codeTempEntity.getRelId() + "", codeTempEntity.getBatchNo(), codeTempEntity.getInvCode(), ConstantType.TYPE_PUT, lastList.get(0).getInBatchNo()); + InvProductDetailEntity nextInvProduct = invProductDetailService.selectNextInBatch(bussinessTypeEntity, codeTempEntity.getRelId() + "", codeTempEntity.getBatchNo(), codeTempEntity.getInvCode(), ConstantType.TYPE_PUT, lastInBatch); if (nextInvProduct != null) { codeTempEntity.setPrice(nextInvProduct.getPrice()); codeTempEntity.setInBatchNo(nextInvProduct.getInBatchNo()); diff --git a/src/main/java/com/glxp/api/service/system/VersionService.java b/src/main/java/com/glxp/api/service/system/VersionService.java new file mode 100644 index 00000000..3d963543 --- /dev/null +++ b/src/main/java/com/glxp/api/service/system/VersionService.java @@ -0,0 +1,19 @@ +package com.glxp.api.service.system; + + +import com.glxp.api.entity.system.VersionEntity; +import com.glxp.api.req.system.DeleteRequest; +import com.glxp.api.req.system.FilterVersionRequest; + +import java.util.List; + +public interface VersionService { + + boolean insertVersion(VersionEntity versionEntity); + + boolean insertVersionList(List versionEntities); + + VersionEntity getVersion(FilterVersionRequest filterVersionRequest); + + boolean deleteVersion(DeleteRequest deleteVersionRequest); +} diff --git a/src/main/java/com/glxp/api/service/system/impl/VersionServiceImpl.java b/src/main/java/com/glxp/api/service/system/impl/VersionServiceImpl.java new file mode 100644 index 00000000..0b10d993 --- /dev/null +++ b/src/main/java/com/glxp/api/service/system/impl/VersionServiceImpl.java @@ -0,0 +1,38 @@ +package com.glxp.api.service.system.impl; + +import com.glxp.api.dao.system.VersionDao; +import com.glxp.api.entity.system.VersionEntity; +import com.glxp.api.req.system.DeleteRequest; +import com.glxp.api.req.system.FilterVersionRequest; +import com.glxp.api.service.system.VersionService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +@Service +public class VersionServiceImpl implements VersionService { + + @Resource + VersionDao versionDao; + + @Override + public boolean insertVersion(VersionEntity versionEntity) { + return versionDao.insert(versionEntity) > 0; + } + + @Override + public boolean insertVersionList(List versionEntities) { + return versionDao.insertBatch(versionEntities); + } + + @Override + public VersionEntity getVersion(FilterVersionRequest filterVersionRequest) { + return versionDao.getVersion(filterVersionRequest); + } + + @Override + public boolean deleteVersion(DeleteRequest deleteVersionRequest) { + return versionDao.deleteById(deleteVersionRequest.getId()) > 0; + } +} diff --git a/src/main/resources/application-pro.yml b/src/main/resources/application-pro.yml index 395677f8..d0468a81 100644 --- a/src/main/resources/application-pro.yml +++ b/src/main/resources/application-pro.yml @@ -3,7 +3,7 @@ server: spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver - jdbc-url: jdbc:mysql://192.168.0.166:3306/udi_wms_zyy?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + jdbc-url: jdbc:mysql://192.168.0.166:3306/udi_wms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true username: root password: 123456 hikari: diff --git a/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml b/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml index 9fbf1607..2b28d7db 100644 --- a/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml @@ -419,7 +419,7 @@ + select * + from sys_app_version + + + and type = #{type} + + + order by versionCode desc + limit 1 + + diff --git a/src/main/resources/schemas/schema_v2.4.sql b/src/main/resources/schemas/schema_v2.4.sql index 56156e6d..59028725 100644 --- a/src/main/resources/schemas/schema_v2.4.sql +++ b/src/main/resources/schemas/schema_v2.4.sql @@ -51,4 +51,26 @@ CREATE TABLE IF NOT EXISTS `inv_stock_compare_detail` ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '库存对比明细' - ROW_FORMAT = Dynamic; \ No newline at end of file + ROW_FORMAT = Dynamic; + + +CALL Pro_Temp_ColumnWork('io_order', 'confirmUser', 'varchar(255)', 1); + + +CREATE TABLE IF NOT EXISTS `sys_app_version` +( + `id` int NOT NULL, + `type` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '类型:android,pc,', + `versionName` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '版本号', + `versionCode` int NULL DEFAULT NULL, + `appName` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '应用名称', + `createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建日期', + `downloadUrl` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '下载地址', + `updateLog` varchar(600) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新日志', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB + CHARACTER SET = utf8mb4 + COLLATE = utf8mb4_0900_ai_ci + ROW_FORMAT = DYNAMIC; + +INSERT ignore INTO `sys_app_version`(`id`, `type`, `versionName`, `versionCode`, `appName`, `createTime`, `downloadUrl`, `updateLog`) VALUES (1, 'udi_wms_new', '3.0.6', 306, 'UDI扫码终端', '2023-10-30 18:42:24', 'http://192.168.1.11:9150/udiwms_new.apk', '1.单据审核移除UDI码异常提示;2优化多项功能');