diff --git a/src/main/java/com/glxp/api/controller/auth/RegisterController.java b/src/main/java/com/glxp/api/controller/auth/RegisterController.java index 71db3a7f..f83f1f9e 100644 --- a/src/main/java/com/glxp/api/controller/auth/RegisterController.java +++ b/src/main/java/com/glxp/api/controller/auth/RegisterController.java @@ -1,5 +1,6 @@ package com.glxp.api.controller.auth; +import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ReUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; @@ -351,6 +352,7 @@ public class RegisterController { if (registerCheckRequest.getCheckType() == 1) { //注册时新增到往来单位字典 BasicUnitMaintainEntity basicUnitMaintainEntity1 = new BasicUnitMaintainEntity(); + basicUnitMaintainEntity1.setId(IdUtil.getSnowflakeNextId()); basicUnitMaintainEntity1.setName(userRegisterEntity.getCompanyName()); basicUnitMaintainEntity1.setErpId(generateUserId() + ""); basicUnitMaintainEntity1.setCorpType(2); diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrDeptController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrDeptController.java index b14edca2..b4c8c139 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrDeptController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrDeptController.java @@ -1,5 +1,6 @@ package com.glxp.api.controller.thrsys; +import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; import com.github.pagehelper.PageInfo; import com.glxp.api.annotation.Log; @@ -81,6 +82,7 @@ public class ThrDeptController { thrDeptEntity.setPcode(pEntity.getPcode()); } thrDeptEntity.setUpdateTime(new Date()); + thrDeptEntity.setId(IdUtil.getSnowflakeNextId()); boolean b = thrDeptService.insertInvWarehouse(thrDeptEntity); if (!b) { return ResultVOUtils.error(ResultEnum.NOT_NETWORK); diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrProductsController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrProductsController.java index 2e745c61..2a79e1d1 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrProductsController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrProductsController.java @@ -1,6 +1,7 @@ package com.glxp.api.controller.thrsys; +import cn.hutool.core.util.IdUtil; import com.github.pagehelper.PageInfo; import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.Log; @@ -138,6 +139,7 @@ public class ThrProductsController { thrProductsEntity.setCreateUser(String.valueOf(customerService.getUserId())); thrProductsEntity.setUpdateTime(new Date()); thrProductsEntity.setCreateTime(new Date()); + thrProductsEntity.setId(IdUtil.getSnowflakeNextId()); thrProductsService.insertThrProducts(thrProductsEntity); return ResultVOUtils.success(); } diff --git a/src/main/java/com/glxp/api/entity/basic/BasicUnitMaintainEntity.java b/src/main/java/com/glxp/api/entity/basic/BasicUnitMaintainEntity.java index d81c6f49..203e5f70 100644 --- a/src/main/java/com/glxp/api/entity/basic/BasicUnitMaintainEntity.java +++ b/src/main/java/com/glxp/api/entity/basic/BasicUnitMaintainEntity.java @@ -8,7 +8,7 @@ import java.util.Date; @Data public class BasicUnitMaintainEntity { - private Integer id; + private Long id; private String erpId; @NotBlank(message = "往来单位名称不能为空!") diff --git a/src/main/java/com/glxp/api/res/thrsys/ThrProductsResponse.java b/src/main/java/com/glxp/api/res/thrsys/ThrProductsResponse.java index 0e9b1839..e19f9df4 100644 --- a/src/main/java/com/glxp/api/res/thrsys/ThrProductsResponse.java +++ b/src/main/java/com/glxp/api/res/thrsys/ThrProductsResponse.java @@ -8,7 +8,7 @@ import java.util.Date; @Data public class ThrProductsResponse { - private Integer id; + private Long id; private String code; //产品编码 private String name; private String measname; //计量单位 diff --git a/src/main/java/com/glxp/api/service/basic/UdiContrastService.java b/src/main/java/com/glxp/api/service/basic/UdiContrastService.java index 82b835cc..fce18fc2 100644 --- a/src/main/java/com/glxp/api/service/basic/UdiContrastService.java +++ b/src/main/java/com/glxp/api/service/basic/UdiContrastService.java @@ -1,6 +1,7 @@ package com.glxp.api.service.basic; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; import com.glxp.api.constant.ConstantStatus; import com.glxp.api.dao.basic.UdiRelevanceDao; @@ -214,6 +215,9 @@ public class UdiContrastService { if (CollUtil.isNotEmpty(udiInfoEntities)) { UdiProductEntity udiProductEntity = udiProductService.findByUuid(udiInfoEntities.get(0).getUuid()); if (udiProductEntity == null) { + for (UdiProductEntity udiInfoEntity : udiInfoEntities) { + udiInfoEntity.setId(IdUtil.getSnowflakeNextId()); + } udiProductService.insertUdiInfos(UdiInfoUtil.initUdiInfoEntitys(udiInfoEntities)); } } diff --git a/src/main/java/com/glxp/api/service/thrsys/impl/ThrBusTypeOriginServiceImpl.java b/src/main/java/com/glxp/api/service/thrsys/impl/ThrBusTypeOriginServiceImpl.java index d08724dd..27e7401d 100644 --- a/src/main/java/com/glxp/api/service/thrsys/impl/ThrBusTypeOriginServiceImpl.java +++ b/src/main/java/com/glxp/api/service/thrsys/impl/ThrBusTypeOriginServiceImpl.java @@ -1,6 +1,7 @@ package com.glxp.api.service.thrsys.impl; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -59,6 +60,7 @@ public class ThrBusTypeOriginServiceImpl extends ServiceImpl REPLACE INTO basic_corp - (thirdId,erpId,`name`,spell, + (id,thirdId,erpId,`name`,spell, addr,status,`type`,creditNo,contact,mobile,thirdId1,thirdId2,thirdId3,thirdId4, thirdName,thirdName1,thirdName2,thirdName3,thirdName4,updateTime,corpType,outType) values - ( + (#{id}, #{thirdId}, #{erpId}, #{name}, diff --git a/src/main/resources/mybatis/mapper/basic/UdiProductDao.xml b/src/main/resources/mybatis/mapper/basic/UdiProductDao.xml index 2d4a2b5f..2a56ca07 100644 --- a/src/main/resources/mybatis/mapper/basic/UdiProductDao.xml +++ b/src/main/resources/mybatis/mapper/basic/UdiProductDao.xml @@ -228,7 +228,7 @@ replace INTO basic_products - (uuid, originUuid, nameCode, deviceRecordKey, packRatio, packLevel, packUnit, bhxjsl, bhzxxsbzsl, + (id,uuid, originUuid, nameCode, deviceRecordKey, packRatio, packLevel, packUnit, bhxjsl, bhzxxsbzsl, zxxsbzbhsydysl, bhxjcpbm, bzcj, cpmctymc, cplb, flbm, ggxh, qxlb, tyshxydm, ylqxzcrbarmc, zczbhhzbapzbh, ylqxzcrbarywmc, sydycpbs, sjcpbm, versionNumber, diType, ybbm, sptm, manufactory, measname, productType, scbssfbhph, scbssfbhxlh, scbssfbhscrq, scbssfbhsxrq, cpms, @@ -240,7 +240,8 @@ - (#{item.uuid}, + ( #{item.id}, + #{item.uuid}, #{item.originUuid}, #{item.nameCode}, #{item.deviceRecordKey}, diff --git a/src/main/resources/mybatis/mapper/sync/BasicDownloadDao.xml b/src/main/resources/mybatis/mapper/sync/BasicDownloadDao.xml index 77b9bce8..4541d96f 100644 --- a/src/main/resources/mybatis/mapper/sync/BasicDownloadDao.xml +++ b/src/main/resources/mybatis/mapper/sync/BasicDownloadDao.xml @@ -34,7 +34,7 @@ parameterType="com.glxp.api.entity.sync.BasicDownloadStatusEntity"> replace INTO basic_download_status(id, taskId, idDatas, status, type, updateTime, scheduleType, startTime, - endTime, remark) + endTime, remark,cacheFilePath) values (#{id}, #{taskId}, #{idDatas}, @@ -43,7 +43,7 @@ #{updateTime}, #{scheduleType}, #{startTime}, - #{endTime}, #{remark}) + #{endTime}, #{remark},#{cacheFilePath}) diff --git a/src/main/resources/mybatis/mapper/thrsys/ThrBusTypeOriginDao.xml b/src/main/resources/mybatis/mapper/thrsys/ThrBusTypeOriginDao.xml index dde42bce..74101465 100644 --- a/src/main/resources/mybatis/mapper/thrsys/ThrBusTypeOriginDao.xml +++ b/src/main/resources/mybatis/mapper/thrsys/ThrBusTypeOriginDao.xml @@ -75,9 +75,10 @@ replace into thr_bustype_origin - (`name`, `action`, thirdSys, `enable`, inoutType, updateTime, remark, createUser, updateUser, + (id,`name`, `action`, thirdSys, `enable`, inoutType, updateTime, remark, createUser, updateUser, createTime) - values (#{name}, + values (#{id}, + #{name}, #{action}, #{thirdSys}, #{enable}, diff --git a/src/main/resources/mybatis/mapper/thrsys/ThrDeptDao.xml b/src/main/resources/mybatis/mapper/thrsys/ThrDeptDao.xml index df2bf7e8..6917f7b3 100644 --- a/src/main/resources/mybatis/mapper/thrsys/ThrDeptDao.xml +++ b/src/main/resources/mybatis/mapper/thrsys/ThrDeptDao.xml @@ -83,19 +83,23 @@ parameterType="com.glxp.api.entity.thrsys.ThrDeptEntity"> replace INTO thr_dept - (pid, code, name, advanceType, isDefault, + (id,pid, code, name, advanceType, isDefault, status, updateTime, remark, thirdSysFk) - values (#{pid}, - #{code}, - #{name}, - #{advanceType}, - #{isDefault}, - #{status}, - #{updateTime}, - #{remark}, - #{thirdSysFk}) + values ( + #{id}, + #{pid}, + #{code}, + #{name}, + #{advanceType}, + #{isDefault}, + #{status}, + #{updateTime}, + #{remark}, + #{thirdSysFk} + ) + replace INTO thr_dept (pid, code, name, advanceType, isDefault, diff --git a/src/main/resources/mybatis/mapper/thrsys/ThrProductsDao.xml b/src/main/resources/mybatis/mapper/thrsys/ThrProductsDao.xml index 2d4dd1e2..d36cae57 100644 --- a/src/main/resources/mybatis/mapper/thrsys/ThrProductsDao.xml +++ b/src/main/resources/mybatis/mapper/thrsys/ThrProductsDao.xml @@ -167,11 +167,12 @@ parameterType="com.glxp.api.entity.thrsys.ThrProductsEntity"> replace INTO thr_products - (code, `name`, measname, spec, registerNo, manufactory, + (id,code, `name`, measname, spec, registerNo, manufactory, cplb, flbm, qxlb, ybbm, sptm, tyshxydm, zczbhhzbapzbh, ylqxzcrbarmc, ylqxzcrbarywmc, cpms, thirdSysFk, updateTime, supName, model, standard, qtbm, zczyxqz, remark, remark1, remark2, remark3, price, createUser, createTime, updateUser) - values (#{code}, + values ( #{id}, + #{code}, #{name}, #{measname}, #{spec},