同步数据修改为雪花ID

master
anthonywj 2 years ago
parent 528585b467
commit 963406dd91

@ -220,7 +220,7 @@
<dependency> <dependency>
<groupId>cn.hutool</groupId> <groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId> <artifactId>hutool-all</artifactId>
<version>5.7.9</version> <version>5.8.18</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.belerweb</groupId> <groupId>com.belerweb</groupId>

@ -215,7 +215,7 @@ public class InvWarehouseController extends BaseController {
updateEntity.setId(pEntity.getId()); updateEntity.setId(pEntity.getId());
updateEntity.setUpdateTime(new Date()); updateEntity.setUpdateTime(new Date());
deptService.updateInvWarehouse(updateEntity); deptService.updateInvWarehouse(updateEntity);
invWarehouseEntity.setId(IdUtil.getSnowflake(6, 1).nextId() + ""); invWarehouseEntity.setId(IdUtil.getSnowflake(6, 1).nextId());
invWarehouseEntity.setUpdateTime(new Date()); invWarehouseEntity.setUpdateTime(new Date());
boolean b = invWarehouseService.insertInvSubWarehouse(invWarehouseEntity); boolean b = invWarehouseService.insertInvSubWarehouse(invWarehouseEntity);
if (!b) { if (!b) {

@ -2,6 +2,7 @@ package com.glxp.api.controller.basic;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@ -149,6 +150,7 @@ public class BasicBussinessTypeController extends BaseController {
bussinessTypeSaveRequest.setAction("SC" + CustomUtil.getId()); bussinessTypeSaveRequest.setAction("SC" + CustomUtil.getId());
BasicBussinessTypeEntity basicBussinessTypeEntity = new BasicBussinessTypeEntity(); BasicBussinessTypeEntity basicBussinessTypeEntity = new BasicBussinessTypeEntity();
BeanUtil.copyProperties(bussinessTypeSaveRequest, basicBussinessTypeEntity); BeanUtil.copyProperties(bussinessTypeSaveRequest, basicBussinessTypeEntity);
basicBussinessTypeEntity.setId(IdUtil.getSnowflakeNextId());
basicBussinessTypeService.insertBussinessType(basicBussinessTypeEntity); basicBussinessTypeService.insertBussinessType(basicBussinessTypeEntity);
} else { } else {
ResultVOUtils.error(999, "参数错误"); ResultVOUtils.error(999, "参数错误");

@ -1,5 +1,6 @@
package com.glxp.api.controller.basic; package com.glxp.api.controller.basic;
import cn.hutool.core.util.IdUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log; import com.glxp.api.annotation.Log;
@ -126,7 +127,8 @@ public class BasicCorpController {
basicUnitMaintainEntity.setErpId(CustomUtil.getId()); basicUnitMaintainEntity.setErpId(CustomUtil.getId());
basicUnitMaintainEntity.setOutType(ConstantStatus.CORP_SICK_CUS); basicUnitMaintainEntity.setOutType(ConstantStatus.CORP_SICK_CUS);
basicUnitMaintainEntity.setUpdateTime(new Date()); basicUnitMaintainEntity.setUpdateTime(new Date());
boolean b = basicUnitMaintainService.insertBasicUnitMaintain(basicUnitMaintainEntity); basicUnitMaintainEntity.setId(IdUtil.getSnowflakeNextId());
boolean b = basicUnitMaintainService.insert(basicUnitMaintainEntity);
if (!b) { if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK); return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
} }
@ -244,7 +246,8 @@ public class BasicCorpController {
basicUnitMaintainEntity.setMobile(erpUnitsResponse.getMobile()); basicUnitMaintainEntity.setMobile(erpUnitsResponse.getMobile());
basicUnitMaintainEntity.setCorpType(ConstantStatus.CORP_SP); basicUnitMaintainEntity.setCorpType(ConstantStatus.CORP_SP);
basicUnitMaintainEntity.setUpdateTime(new Date()); basicUnitMaintainEntity.setUpdateTime(new Date());
basicUnitMaintainService.insertBasicUnitMaintain(basicUnitMaintainEntity); basicUnitMaintainEntity.setId(IdUtil.getSnowflakeNextId());
basicUnitMaintainService.insert(basicUnitMaintainEntity);
} }
} }
return ResultVOUtils.success("选入成功"); return ResultVOUtils.success("选入成功");
@ -281,7 +284,7 @@ public class BasicCorpController {
} }
BasicErpUnitsResponse basicErpUnitsResponse = combineRequest.getBasicErpUnitsResponse(); BasicErpUnitsResponse basicErpUnitsResponse = combineRequest.getBasicErpUnitsResponse();
BasicCorpEntity basicCorpEntity = new BasicCorpEntity(); BasicCorpEntity basicCorpEntity = new BasicCorpEntity();
basicCorpEntity.setId(Integer.parseInt(combineRequest.getKey())); basicCorpEntity.setId(Long.parseLong(combineRequest.getKey()));
if (combineRequest.getThirdSys() != null) { if (combineRequest.getThirdSys() != null) {
if ("thirdId".equals(combineRequest.getThirdSys())) { if ("thirdId".equals(combineRequest.getThirdSys())) {
basicCorpEntity.setThirdId(basicErpUnitsResponse.getId()); basicCorpEntity.setThirdId(basicErpUnitsResponse.getId());

@ -1,5 +1,6 @@
package com.glxp.api.controller.inout; package com.glxp.api.controller.inout;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.AuthRuleAnnotation;
@ -101,6 +102,7 @@ public class IoCodeLostController extends BaseController {
if (codeLostEntity != null) { if (codeLostEntity != null) {
codeLostService.update(insertEntity); codeLostService.update(insertEntity);
} else { } else {
insertEntity.setId(IdUtil.getSnowflakeNextId());
codeLostService.insert(insertEntity); codeLostService.insert(insertEntity);
} }
return ResultVOUtils.success("修改成功!"); return ResultVOUtils.success("修改成功!");

@ -2,6 +2,7 @@ package com.glxp.api.controller.inout;
import cn.hutool.Hutool; import cn.hutool.Hutool;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.AuthRuleAnnotation;
@ -594,7 +595,8 @@ public class IoCodeTempController extends BaseController {
basicCorpEntity.setOutType(ConstantStatus.CORP_SICK_SICK); basicCorpEntity.setOutType(ConstantStatus.CORP_SICK_SICK);
basicCorpEntity.setName(addOrderRequest.getFromCorp()); basicCorpEntity.setName(addOrderRequest.getFromCorp());
addOrderRequest.setFromCorp(basicCorpEntity.getName()); addOrderRequest.setFromCorp(basicCorpEntity.getName());
basicUnitMaintainService.insertBasicUnitMaintain(basicCorpEntity); basicCorpEntity.setId(IdUtil.getSnowflakeNextId());
basicUnitMaintainService.insert(basicCorpEntity);
} }
} }

@ -1,6 +1,7 @@
package com.glxp.api.controller.inout; package com.glxp.api.controller.inout;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.Log; import com.glxp.api.annotation.Log;
@ -49,71 +50,73 @@ public class ioCodeRelController {
//判断码有没有重复 //判断码有没有重复
List<IoCodeRelEntity> list=ioCodeRelServicec.selectIoCodeRelByCode("",code); List<IoCodeRelEntity> list = ioCodeRelServicec.selectIoCodeRelByCode("", code);
if(list.size()>0){ if (list.size() > 0) {
return ResultVOUtils.error(999,"此码已做关联!"); return ResultVOUtils.error(999, "此码已做关联!");
} }
if(StrUtil.isNotEmpty(code)){ if (StrUtil.isNotEmpty(code)) {
UdiEntity udiEntity=FilterUdiUtils.getGS1Udi(code); UdiEntity udiEntity = FilterUdiUtils.getGS1Udi(code);
UdiProductEntity udiProductEntity=udiProductService.findByNameCode(udiEntity.getUdi()); UdiProductEntity udiProductEntity = udiProductService.findByNameCode(udiEntity.getUdi());
if(udiProductEntity.getPackLevel()!=null){ if (udiProductEntity.getPackLevel() != null) {
if(Integer.valueOf(udiProductEntity.getPackLevel())>1){ if (Integer.valueOf(udiProductEntity.getPackLevel()) > 1) {
return ResultVOUtils.success(udiProductEntity.getBhxjcpbm()); return ResultVOUtils.success(udiProductEntity.getBhxjcpbm());
} }
} }
} }
return ResultVOUtils.error(999,"扫码错误!"); return ResultVOUtils.error(999, "扫码错误!");
} }
@GetMapping("/udi/ioCode/Rel/checkLowProduct") @GetMapping("/udi/ioCode/Rel/checkLowProduct")
@Log(title = "单据管理", businessType = BusinessType.INSERT) @Log(title = "单据管理", businessType = BusinessType.INSERT)
public BaseResponse checkLowProduct(String upCode,String lowCode) { public BaseResponse checkLowProduct(String upCode, String lowCode) {
UdiProductEntity udiProductEntity=new UdiProductEntity(); UdiProductEntity udiProductEntity = new UdiProductEntity();
//查询上级产品信息 //查询上级产品信息
if(StrUtil.isNotEmpty(upCode)){ if (StrUtil.isNotEmpty(upCode)) {
UdiEntity udiEntity=FilterUdiUtils.getGS1Udi(upCode); UdiEntity udiEntity = FilterUdiUtils.getGS1Udi(upCode);
udiProductEntity=udiProductService.findByNameCode(udiEntity.getUdi()); udiProductEntity = udiProductService.findByNameCode(udiEntity.getUdi());
} }
//判断码有没有重复 //判断码有没有重复
List<IoCodeRelEntity> list=ioCodeRelServicec.selectIoCodeRelByCode(lowCode,upCode); List<IoCodeRelEntity> list = ioCodeRelServicec.selectIoCodeRelByCode(lowCode, upCode);
if(list.size()>0){ if (list.size() > 0) {
return ResultVOUtils.error(999,"此码已做关联!"); return ResultVOUtils.error(999, "此码已做关联!");
} }
//判断条数是否超出 //判断条数是否超出
Long count=ioCodeRelServicec.selectIoCodeRelCount(upCode); Long count = ioCodeRelServicec.selectIoCodeRelCount(upCode);
if(count>=udiProductEntity.getBhxjsl()){ if (count >= udiProductEntity.getBhxjsl()) {
return ResultVOUtils.error(999,"数量超出!"); return ResultVOUtils.error(999, "数量超出!");
} }
//查询下级产品信息 //查询下级产品信息
if(StrUtil.isNotEmpty(lowCode)){ if (StrUtil.isNotEmpty(lowCode)) {
UdiEntity udiEntity=FilterUdiUtils.getGS1Udi(lowCode); UdiEntity udiEntity = FilterUdiUtils.getGS1Udi(lowCode);
UdiProductEntity udiProductEntity1=udiProductService.findByNameCode(udiEntity.getUdi()); UdiProductEntity udiProductEntity1 = udiProductService.findByNameCode(udiEntity.getUdi());
if(udiProductEntity!=null){ if (udiProductEntity != null) {
if(udiProductEntity1.getNameCode().equals(udiProductEntity.getBhxjcpbm())){ if (udiProductEntity1.getNameCode().equals(udiProductEntity.getBhxjcpbm())) {
IoCodeRelEntity ioCodeRelEntity=new IoCodeRelEntity(); IoCodeRelEntity ioCodeRelEntity = new IoCodeRelEntity();
ioCodeRelEntity.setCode(lowCode); ioCodeRelEntity.setCode(lowCode);
ioCodeRelEntity.setParentCode(upCode); ioCodeRelEntity.setParentCode(upCode);
ioCodeRelEntity.setNameCode(udiProductEntity1.getNameCode()); ioCodeRelEntity.setNameCode(udiProductEntity1.getNameCode());
ioCodeRelEntity.setDiType(udiProductEntity1.getDiType()); ioCodeRelEntity.setDiType(udiProductEntity1.getDiType());
ioCodeRelEntity.setLevel(udiProductEntity1.getPackLevel()); ioCodeRelEntity.setLevel(udiProductEntity1.getPackLevel());
ioCodeRelEntity.setProduceDate(udiProductEntity1.getProduceDate()); ioCodeRelEntity.setProduceDate(udiProductEntity1.getProduceDate());
ioCodeRelEntity.setExpireDate(udiProductEntity1.getExpireDate()); ioCodeRelEntity.setExpireDate(udiProductEntity1.getExpireDate());
ioCodeRelEntity.setSerialNo(udiProductEntity1.getSerialNo()); ioCodeRelEntity.setSerialNo(udiProductEntity1.getSerialNo());
ioCodeRelEntity.setCreateTime(new Date()); ioCodeRelEntity.setCreateTime(new Date());
ioCodeRelEntity.setUpdateTime(new Date()); ioCodeRelEntity.setUpdateTime(new Date());
ioCodeRelServicec.insert(ioCodeRelEntity); ioCodeRelEntity.setId(
return ResultVOUtils.success(); IdUtil.getSnowflakeNextId());
}else{ ioCodeRelServicec.insert(ioCodeRelEntity);
return ResultVOUtils.error(999,"该条码不属于下级产品!"); return ResultVOUtils.success();
} } else {
} return ResultVOUtils.error(999, "该条码不属于下级产品!");
}
}
} }
return ResultVOUtils.error(999,""); return ResultVOUtils.error(999, "");
} }
@GetMapping("/udi/ioCode/Rel/delectList") @GetMapping("/udi/ioCode/Rel/delectList")
@ -131,13 +134,13 @@ public class ioCodeRelController {
@GetMapping("/udi/ioCode/Rel/del") @GetMapping("/udi/ioCode/Rel/del")
@Log(title = "单据管理", businessType = BusinessType.DELETE) @Log(title = "单据管理", businessType = BusinessType.DELETE)
public BaseResponse del(String code,String parentCode) { public BaseResponse del(String code, String parentCode) {
int count=ioCodeRelServicec.delIoCodeRel(code,parentCode); int count = ioCodeRelServicec.delIoCodeRel(code, parentCode);
if(count>0){ if (count > 0) {
return ResultVOUtils.success("删除成功"); return ResultVOUtils.success("删除成功");
}else{ } else {
return ResultVOUtils.error(999,"删除失败"); return ResultVOUtils.error(999, "删除失败");
} }
} }

@ -1,6 +1,7 @@
package com.glxp.api.controller.purchase; package com.glxp.api.controller.purchase;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
@ -135,6 +136,7 @@ public class SupCertController {
supCertEntity.setStatus(0); supCertEntity.setStatus(0);
supCertEntity.setAuditStatus(ConstantStatus.AUDIT_DRAFT); supCertEntity.setAuditStatus(ConstantStatus.AUDIT_DRAFT);
supCertEntity.setUpdateTime(new Date()); supCertEntity.setUpdateTime(new Date());
supCertEntity.setId(IdUtil.getSnowflakeNextId());
boolean b = supCertService.insertCompanyCert(supCertEntity); boolean b = supCertService.insertCompanyCert(supCertEntity);
} }
return ResultVOUtils.success("成功"); return ResultVOUtils.success("成功");
@ -173,6 +175,7 @@ public class SupCertController {
supCertEntity.setStatus(0); supCertEntity.setStatus(0);
supCertEntity.setAuditStatus(ConstantStatus.AUDIT_DRAFT); supCertEntity.setAuditStatus(ConstantStatus.AUDIT_DRAFT);
supCertEntity.setUpdateTime(new Date()); supCertEntity.setUpdateTime(new Date());
supCertEntity.setId(IdUtil.getSnowflakeNextId());
boolean b = supCertService.insertCompanyCert(supCertEntity); boolean b = supCertService.insertCompanyCert(supCertEntity);
} }
return ResultVOUtils.success("成功"); return ResultVOUtils.success("成功");
@ -456,7 +459,7 @@ public class SupCertController {
if (StrUtil.isNotEmpty(filterSupCertRequest.getCustomerId()) && filterSupCertRequest.getType() != null) { if (StrUtil.isNotEmpty(filterSupCertRequest.getCustomerId()) && filterSupCertRequest.getType() != null) {
List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest); List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest);
List<Integer> idsList = supCertEntityList.stream().map(SupCertEntity::getId).distinct().collect(Collectors.toList()); List<Long> idsList = supCertEntityList.stream().map(SupCertEntity::getId).distinct().collect(Collectors.toList());
return ResultVOUtils.success(idsList); return ResultVOUtils.success(idsList);
} }
return ResultVOUtils.error(999, "参数错误"); return ResultVOUtils.error(999, "参数错误");

@ -1,6 +1,7 @@
package com.glxp.api.controller.purchase; package com.glxp.api.controller.purchase;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.AuthRuleAnnotation;
@ -73,6 +74,7 @@ public class SupCertSetController {
supCertSetEntity.setFlbm(flbm); supCertSetEntity.setFlbm(flbm);
} }
} }
supCertSetEntity.setId(IdUtil.getSnowflakeNextId());
boolean b = supCertSetService.insertCertSet(supCertSetEntity); boolean b = supCertSetService.insertCertSet(supCertSetEntity);
return ResultVOUtils.success("添加成功!"); return ResultVOUtils.success("添加成功!");
} }

@ -1,6 +1,7 @@
package com.glxp.api.controller.purchase; package com.glxp.api.controller.purchase;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.AuthRuleAnnotation;
@ -180,7 +181,7 @@ public class SupManufacturerController {
supManufacturerEntity.setCreateTime(new Date()); supManufacturerEntity.setCreateTime(new Date());
supManufacturerEntity.setUpdateTime(new Date()); supManufacturerEntity.setUpdateTime(new Date());
supManufacturerEntity.setId(IdUtil.getSnowflakeNextId());
boolean b = supManufacturerService.insertCompany(supManufacturerEntity); boolean b = supManufacturerService.insertCompany(supManufacturerEntity);
if (b) { if (b) {
return ResultVOUtils.success("添加成功"); return ResultVOUtils.success("添加成功");

@ -1,6 +1,7 @@
package com.glxp.api.controller.purchase; package com.glxp.api.controller.purchase;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
@ -140,6 +141,7 @@ public class SupProductController {
} }
supProductEntity.setCreateTime(new Date()); supProductEntity.setCreateTime(new Date());
supProductEntity.setUpdateTime(new Date()); supProductEntity.setUpdateTime(new Date());
supProductEntity.setId(IdUtil.getSnowflakeNextId());
boolean b = supProductService.insertRegistration(supProductEntity); boolean b = supProductService.insertRegistration(supProductEntity);
if (b) { if (b) {
return ResultVOUtils.success("添加成功"); return ResultVOUtils.success("添加成功");

@ -99,7 +99,7 @@ public class ThrDeptController {
if (thrDeptEntity.getId() == null) { if (thrDeptEntity.getId() == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
} }
String id = Integer.toString(thrDeptEntity.getId()); String id = Long.toString(thrDeptEntity.getId());
ThrDeptEntity thrDeptEntity1 = thrDeptService.selectById(id); ThrDeptEntity thrDeptEntity1 = thrDeptService.selectById(id);
//查询该部门下的仓库 //查询该部门下的仓库
filterThrSubInvWarehouseRequest.setParentId(thrDeptEntity1.getCode()); filterThrSubInvWarehouseRequest.setParentId(thrDeptEntity1.getCode());

@ -81,7 +81,7 @@ public interface AuthAdminDao extends BaseMapperPlus<AuthAdminDao, AuthAdmin, Au
*/ */
List<AuthAdmin> selectHospitalUser(); List<AuthAdmin> selectHospitalUser();
List<AuthAdmin> selectNotSelectUser(@Param("userIds") List<Long> userIds, @Param("deptId") Integer deptId); List<AuthAdmin> selectNotSelectUser(@Param("userIds") List<Long> userIds, @Param("deptId") Long deptId);
List<AuthAdmin> selectAllocatedList(FilterAuthUserRequest filterAuthUserRequest); List<AuthAdmin> selectAllocatedList(FilterAuthUserRequest filterAuthUserRequest);

@ -25,7 +25,7 @@ public interface WarehouseUserDao extends BaseMapperPlus<WarehouseUserDao, Wareh
int insertSelective(WarehouseUserEntity record); int insertSelective(WarehouseUserEntity record);
WarehouseUserEntity selectByPrimaryKey(Integer id); WarehouseUserEntity selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(WarehouseUserEntity record); int updateByPrimaryKeySelective(WarehouseUserEntity record);
@ -61,7 +61,7 @@ public interface WarehouseUserDao extends BaseMapperPlus<WarehouseUserDao, Wareh
* @param id * @param id
* @param isDirector * @param isDirector
*/ */
void updateDirectorById(@Param("id") Integer id, @Param("isDirector") int isDirector); void updateDirectorById(@Param("id") Long id, @Param("isDirector") int isDirector);
/** /**
* *

@ -11,8 +11,8 @@ import java.util.Date;
@Data @Data
@TableName(value = "auth_dept") @TableName(value = "auth_dept")
public class DeptEntity { public class DeptEntity {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.INPUT)
private Integer id; private Long id;
@TableField(value = "pid") @TableField(value = "pid")
private Integer pid; private Integer pid;
@TableField(value = "code;") @TableField(value = "code;")

@ -12,8 +12,8 @@ import java.util.Date;
@Data @Data
@TableName(value = "auth_user_bustype") @TableName(value = "auth_user_bustype")
public class InvBusUserEntity { public class InvBusUserEntity {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.INPUT)
private Integer id; private Long id;
@TableField(value = "userId") @TableField(value = "userId")
private String userId; private String userId;
@TableField(value = "subInvCode") @TableField(value = "subInvCode")

@ -10,7 +10,7 @@ import java.util.Date;
@Data @Data
public class InvSpace { public class InvSpace {
private Integer id; private Long id;
/** /**
* *

@ -13,8 +13,9 @@ import java.util.Date;
public class InvWarehouseEntity { public class InvWarehouseEntity {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.INPUT)
private String id; private Long id;
/** /**
* *

@ -18,7 +18,7 @@ public class WarehouseBussinessTypeEntity {
* id * id
*/ */
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Long id;
/** /**
* *

@ -15,7 +15,7 @@ public class WarehouseUserEntity {
/** /**
* id * id
*/ */
private Integer id; private Long id;
/** /**
* *

@ -18,8 +18,8 @@ public class BasicBusTypeChangeEntity {
/** /**
* id * id
*/ */
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.INPUT)
private Integer id; private Long id;
/** /**
* *

@ -19,7 +19,7 @@ public class BasicBusTypePreEntity {
* id * id
*/ */
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Long id;
/** /**
* *

@ -18,8 +18,8 @@ public class BasicBussinessTypeEntity {
/** /**
* id * id
*/ */
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.INPUT)
private Integer id; private Long id;
/** /**
* *

@ -12,7 +12,7 @@ import java.util.Date;
@TableName(value = "basic_corp") @TableName(value = "basic_corp")
public class BasicCorpEntity { public class BasicCorpEntity {
@TableId(value = "id", type = IdType.INPUT) @TableId(value = "id", type = IdType.INPUT)
private Integer id; private Long id;
/** /**
* *

@ -4,14 +4,16 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date; import java.util.Date;
import lombok.Data; import lombok.Data;
@Data @Data
@TableName(value = "basic_hosp_type") @TableName(value = "basic_hosp_type")
public class BasicHospTypeEntity { public class BasicHospTypeEntity {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.INPUT)
private Integer id; private Long id;
/** /**
* *

@ -12,7 +12,7 @@ import java.util.Date;
@TableName(value = "basic_products") @TableName(value = "basic_products")
public class BasicProductsEntity { public class BasicProductsEntity {
@TableId(value = "id", type = IdType.INPUT) @TableId(value = "id", type = IdType.INPUT)
private Integer id; private Long id;
/** /**
* UUID * UUID

@ -14,7 +14,7 @@ import lombok.Data;
@TableName(value = "company_product_relevance") @TableName(value = "company_product_relevance")
public class CompanyProductRelevanceEntity { public class CompanyProductRelevanceEntity {
@TableId(value = "id", type = IdType.INPUT) @TableId(value = "id", type = IdType.INPUT)
private Integer id; private Long id;
/** /**
* ID * ID

@ -13,8 +13,8 @@ import java.util.Date;
@TableName(value = "basic_entrust_accept") @TableName(value = "basic_entrust_accept")
public class EntrustReceEntity { public class EntrustReceEntity {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.INPUT)
private Integer id; private Long id;
/** /**
* *

@ -8,7 +8,7 @@ import lombok.Data;
@Data @Data
public class UdiProductEntity { public class UdiProductEntity {
private Integer id; private Long id;
private String uuid; private String uuid;
private String originUuid; private String originUuid;
private String nameCode; private String nameCode;

@ -16,8 +16,8 @@ import lombok.Data;
@Data @Data
@TableName(value = "io_code_lost") @TableName(value = "io_code_lost")
public class IoCodeLostEntity { public class IoCodeLostEntity {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.INPUT)
private Integer id; private Long id;
/** /**
* UDI * UDI

@ -14,8 +14,9 @@ import java.util.Date;
@Data @Data
@TableName(value = "io_code_rel") @TableName(value = "io_code_rel")
public class IoCodeRelEntity { public class IoCodeRelEntity {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.INPUT)
private Integer id; private Long id;
/** /**
* UDI * UDI

@ -21,8 +21,8 @@ import java.util.Date;
@Data @Data
public class SupCertEntity { public class SupCertEntity {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.INPUT)
private Integer id; private Long id;
/** /**
* ID * ID

@ -23,8 +23,8 @@ import java.util.List;
@Data @Data
public class SupCertSetEntity { public class SupCertSetEntity {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.INPUT)
private Integer id; private Long id;
/** /**
* *

@ -21,7 +21,7 @@ import java.util.Date;
@Data @Data
public class SupManufacturerEntity{ public class SupManufacturerEntity{
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.INPUT)
private Long id; private Long id;
/** /**

@ -20,7 +20,7 @@ import java.util.Date;
@Data @Data
public class SupProductEntity { public class SupProductEntity {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.INPUT)
private Long id; private Long id;
/** /**

@ -21,8 +21,7 @@ public class ThrBusTypeOriginEntity {
* id * id
*/ */
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Long id;
/** /**
* *
*/ */

@ -19,7 +19,7 @@ import java.util.Date;
public class ThrCorpEntity{ public class ThrCorpEntity{
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Long id;
@TableField("unitId") @TableField("unitId")
private String unitId; private String unitId;

@ -12,7 +12,7 @@ import java.util.Date;
@TableName("thr_dept") @TableName("thr_dept")
public class ThrDeptEntity { public class ThrDeptEntity {
private Integer id; private Long id;
private Integer pid; private Integer pid;
private String code; private String code;
private String name; private String name;

@ -21,7 +21,7 @@ import java.util.Date;
public class ThrProductsEntity{ public class ThrProductsEntity{
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Long id;
/** /**
* *

@ -10,5 +10,5 @@ public class FilterNoSelectUserRequest extends ListPageRequest {
List<Long> userIds; List<Long> userIds;
private Integer deptId; private Long deptId;
} }

@ -7,12 +7,12 @@ import lombok.Data;
import java.util.List; import java.util.List;
@Data @Data
public class BasicHospTypeRequest{ public class BasicHospTypeRequest {
private Integer id; private Long id;
private String code; private String code;
private String parentCode; private String parentCode;
private String name; private String name;
private String remark; private String remark;
List<String> ids; List<String> ids;
} }

@ -8,7 +8,7 @@ import lombok.Data;
public class FilterCertSetsRequest extends ListPageRequest { public class FilterCertSetsRequest extends ListPageRequest {
private String name; private String name;
private Integer id; private Long id;
private Integer type; private Integer type;
private Integer need; private Integer need;

@ -39,7 +39,7 @@ public interface WarehouseUserService {
* *
* @param id * @param id
*/ */
void updateDirector(Integer id); void updateDirector(Long id);
void updateDirector(WarehouseUserEntity warehouseUserEntity); void updateDirector(WarehouseUserEntity warehouseUserEntity);

@ -81,7 +81,7 @@ public class WarehouseUserServiceImpl implements WarehouseUserService {
} }
@Override @Override
public void updateDirector(Integer id) { public void updateDirector(Long id) {
if (null != id) { if (null != id) {
WarehouseUserEntity warehouseUserEntity = warehouseUserDao.selectByPrimaryKey(id); WarehouseUserEntity warehouseUserEntity = warehouseUserDao.selectByPrimaryKey(id);
warehouseUserDao.updateDirector(warehouseUserEntity.getCode(), 0); warehouseUserDao.updateDirector(warehouseUserEntity.getCode(), 0);

@ -1,5 +1,6 @@
package com.glxp.api.service.basic.impl; package com.glxp.api.service.basic.impl;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -67,7 +68,7 @@ public class BasicHospTypeServiceImpl extends ServiceImpl<BasicHospTypeDao, Basi
ew.ne("code",10000); ew.ne("code",10000);
if(basicHospTypeFilterRequest.getType()!=null && basicHospTypeFilterRequest.getType()==1 && StrUtil.isNotEmpty(basicHospTypeFilterRequest.getCode())){ if(basicHospTypeFilterRequest.getType()!=null && basicHospTypeFilterRequest.getType()==1 && StrUtil.isNotEmpty(basicHospTypeFilterRequest.getCode())){
List<BasicHospTypeEntity> basicHospTypeEntityList=basicHospTypeDao.selectLowTypeAll(basicHospTypeFilterRequest.getCode()); List<BasicHospTypeEntity> basicHospTypeEntityList=basicHospTypeDao.selectLowTypeAll(basicHospTypeFilterRequest.getCode());
List<Integer> ids=basicHospTypeEntityList.stream().map(BasicHospTypeEntity::getId).collect(Collectors.toList()); List<Long> ids=basicHospTypeEntityList.stream().map(BasicHospTypeEntity::getId).collect(Collectors.toList());
ew.notIn("id",ids); ew.notIn("id",ids);
} }
List<BasicHospTypeEntity> data = basicHospTypeDao.selectList(ew); List<BasicHospTypeEntity> data = basicHospTypeDao.selectList(ew);
@ -98,6 +99,7 @@ public class BasicHospTypeServiceImpl extends ServiceImpl<BasicHospTypeDao, Basi
ew.select("max(code) as code"); ew.select("max(code) as code");
BasicHospTypeEntity code=basicHospTypeDao.selectOne(ew); BasicHospTypeEntity code=basicHospTypeDao.selectOne(ew);
basicHospTypeEntity.setCode(Integer.valueOf(code.getCode())+1+""); basicHospTypeEntity.setCode(Integer.valueOf(code.getCode())+1+"");
basicHospTypeEntity.setId(IdUtil.getSnowflakeNextId());
int count=basicHospTypeDao.insert(basicHospTypeEntity); int count=basicHospTypeDao.insert(basicHospTypeEntity);
if(count==0){ if(count==0){
falg=false; falg=false;

@ -128,7 +128,7 @@ public class SupCertServiceImpl extends ServiceImpl<SupCertDao, SupCertEntity> i
@Override @Override
public boolean insertCompanyCert(SupCertEntity supCertEntity) { public boolean insertCompanyCert(SupCertEntity supCertEntity) {
return supCertDao.insertCompanyCert(supCertEntity); return supCertDao.insert(supCertEntity) > 0 ? true : false;
} }
@Override @Override

@ -41,7 +41,7 @@ public class SupCertSetServiceImpl extends ServiceImpl<SupCertSetDao, SupCertSet
@Override @Override
public boolean insertCertSet(SupCertSetEntity supCertSetEntity) { public boolean insertCertSet(SupCertSetEntity supCertSetEntity) {
return supCertSetDao.insertCertSet(supCertSetEntity); return supCertSetDao.insert(supCertSetEntity) > 0 ? true : false;
} }
@Override @Override

@ -68,7 +68,7 @@ public class SupManufacturerServiceImpl extends ServiceImpl<SupManufacturerDao,
@Override @Override
public boolean insertCompany(SupManufacturerEntity companyEntity) { public boolean insertCompany(SupManufacturerEntity companyEntity) {
return supManufacturerDao.insertCompany(companyEntity); return supManufacturerDao.insert(companyEntity) > 0 ? true : false;
} }
@Override @Override

@ -140,7 +140,7 @@ public class SupProductServiceImpl extends ServiceImpl<SupProductDao, SupProduct
@Override @Override
public boolean insertRegistration(SupProductEntity companyEntity) { public boolean insertRegistration(SupProductEntity companyEntity) {
return supProductDao.insertRegistration(companyEntity); return supProductDao.insert(companyEntity) > 0 ? true : false;
} }
@Override @Override

@ -301,3 +301,42 @@ CREATE TABLE IF NOT EXISTS `sync_data_change_bustypes`
# 修改主键为LONG
CALL Pro_Temp_ColumnWork('basic_hosp_type', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('basic_udirel', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('basic_products', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('company_product_relevance', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('basic_corp', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('sup_cert', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('sup_cert_set', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('sup_company', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('sup_manufacturer', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('sup_product', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('io_code_lost', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('io_code_rel', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('basic_bustype_change', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('thr_bustype_origin', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_user', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_user_bustype', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_dept', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_warehouse', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_warehouse_bustype', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_warehouse_user', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('auth_space', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('thr_dept', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('thr_inv_warehouse', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('thr_products', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('thr_corp', 'id', 'bigint', 2);

Loading…
Cancel
Save