同步数据修改为雪花ID

master
anthonywj 2 years ago
parent 9e25fc5036
commit 54dc7cd0eb

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

@ -1,6 +1,7 @@
package com.glxp.api.controller.basic;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.Log;
@ -208,6 +209,7 @@ public class BasicBusTypePreController {
InvWarehouseEntity invWarehouse = invWarehouseService.findByInvSubByCode(basicBusTypePreEntity.getInvCode());
basicBusTypePreEntity.setDeptCode(invWarehouse.getParentId());
}
basicBusTypePreEntity.setId(IdUtil.getSnowflakeNextId());
basicBusTypePreService.insertBusChangeType(basicBusTypePreEntity);
} else {
ResultVOUtils.error(999, "参数错误");

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

@ -1,5 +1,6 @@
package com.glxp.api.controller.basic;
import cn.hutool.core.util.IdUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.enums.ResultEnum;
@ -64,7 +65,7 @@ public class BasicCorpController {
private ThrCorpService thrCorpService;
@Resource
private CompanyService companyService;
// @Resource
// @Resource
// private OrderService orderService;
@Resource
private ErpBasicClient erpBasicClient;
@ -123,7 +124,8 @@ public class BasicCorpController {
basicUnitMaintainEntity.setErpId(CustomUtil.getId());
basicUnitMaintainEntity.setOutType(ConstantStatus.CORP_SICK_CUS);
basicUnitMaintainEntity.setUpdateTime(new Date());
boolean b = basicUnitMaintainService.insertBasicUnitMaintain(basicUnitMaintainEntity);
basicUnitMaintainEntity.setId(IdUtil.getSnowflakeNextId());
boolean b = basicUnitMaintainService.insert(basicUnitMaintainEntity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
@ -133,7 +135,7 @@ public class BasicCorpController {
@AuthRuleAnnotation("")
@PostMapping("/udiwms/basic/unit/maintain/update")
public BaseResponse update(@RequestBody @Valid BasicCorpEntity basicUnitMaintainSaveRequest,BindingResult bindingResult) {
public BaseResponse update(@RequestBody @Valid BasicCorpEntity basicUnitMaintainSaveRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
@ -239,7 +241,8 @@ public class BasicCorpController {
basicUnitMaintainEntity.setMobile(erpUnitsResponse.getMobile());
basicUnitMaintainEntity.setCorpType(ConstantStatus.CORP_SP);
basicUnitMaintainEntity.setUpdateTime(new Date());
basicUnitMaintainService.insertBasicUnitMaintain(basicUnitMaintainEntity);
basicUnitMaintainEntity.setId(IdUtil.getSnowflakeNextId());
basicUnitMaintainService.insert(basicUnitMaintainEntity);
}
}
return ResultVOUtils.success("选入成功");
@ -275,7 +278,7 @@ public class BasicCorpController {
}
BasicErpUnitsResponse basicErpUnitsResponse = combineRequest.getBasicErpUnitsResponse();
BasicCorpEntity basicCorpEntity = new BasicCorpEntity();
basicCorpEntity.setId(Integer.parseInt(combineRequest.getKey()));
basicCorpEntity.setId(Long.parseLong(combineRequest.getKey()));
if (combineRequest.getThirdSys() != null) {
if ("thirdId".equals(combineRequest.getThirdSys())) {
basicCorpEntity.setThirdId(basicErpUnitsResponse.getId());
@ -346,7 +349,8 @@ public class BasicCorpController {
basicUnitMaintainService.deleteById(id);
return ResultVOUtils.success("删除成功");
}
//
//
// //查询ERP往来单位
// @AuthRuleAnnotation("")
// @GetMapping("/udiwms/unitMaintain/filterErp")
@ -507,15 +511,15 @@ public class BasicCorpController {
rMap.put("BUMThirdIdValue",
systemParamConfigEntityBUMThirdId != null && StringUtils.isNotBlank(systemParamConfigEntityBUMThirdId.getParamValue()) ?
systemParamConfigEntityBUMThirdId.getParamValue() : "0");
return ResultVOUtils.success(rMap);
return ResultVOUtils.success(rMap);
}
@AuthRuleAnnotation("")
@PostMapping("/udiwms/basic/unit/maintain/getCorpList")
public BaseResponse getCorpList() {
List<BasicCorpEntity> getCorpList=basicUnitMaintainService.getCorpList();
return ResultVOUtils.success(getCorpList);
List<BasicCorpEntity> getCorpList = basicUnitMaintainService.getCorpList();
return ResultVOUtils.success(getCorpList);
}

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

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

@ -1,6 +1,7 @@
package com.glxp.api.controller.inout;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.Log;
@ -49,53 +50,53 @@ public class ioCodeRelController {
//判断码有没有重复
List<IoCodeRelEntity> list=ioCodeRelServicec.selectIoCodeRelByCode("",code);
if(list.size()>0){
return ResultVOUtils.error(999,"此码已做关联!");
List<IoCodeRelEntity> list = ioCodeRelServicec.selectIoCodeRelByCode("", code);
if (list.size() > 0) {
return ResultVOUtils.error(999, "此码已做关联!");
}
if(StrUtil.isNotEmpty(code)){
UdiEntity udiEntity=FilterUdiUtils.getGS1Udi(code);
UdiProductEntity udiProductEntity=udiProductService.findByNameCode(udiEntity.getUdi());
if(udiProductEntity.getPackLevel()!=null){
if(Integer.valueOf(udiProductEntity.getPackLevel())>1){
if (StrUtil.isNotEmpty(code)) {
UdiEntity udiEntity = FilterUdiUtils.getGS1Udi(code);
UdiProductEntity udiProductEntity = udiProductService.findByNameCode(udiEntity.getUdi());
if (udiProductEntity.getPackLevel() != null) {
if (Integer.valueOf(udiProductEntity.getPackLevel()) > 1) {
return ResultVOUtils.success(udiProductEntity.getBhxjcpbm());
}
}
}
return ResultVOUtils.error(999,"扫码错误!");
return ResultVOUtils.error(999, "扫码错误!");
}
@GetMapping("/udi/ioCode/Rel/checkLowProduct")
@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)){
UdiEntity udiEntity=FilterUdiUtils.getGS1Udi(upCode);
udiProductEntity=udiProductService.findByNameCode(udiEntity.getUdi());
if (StrUtil.isNotEmpty(upCode)) {
UdiEntity udiEntity = FilterUdiUtils.getGS1Udi(upCode);
udiProductEntity = udiProductService.findByNameCode(udiEntity.getUdi());
}
//判断码有没有重复
List<IoCodeRelEntity> list=ioCodeRelServicec.selectIoCodeRelByCode(lowCode,upCode);
if(list.size()>0){
return ResultVOUtils.error(999,"此码已做关联!");
List<IoCodeRelEntity> list = ioCodeRelServicec.selectIoCodeRelByCode(lowCode, upCode);
if (list.size() > 0) {
return ResultVOUtils.error(999, "此码已做关联!");
}
//判断条数是否超出
Long count=ioCodeRelServicec.selectIoCodeRelCount(upCode);
if(count>=udiProductEntity.getBhxjsl()){
return ResultVOUtils.error(999,"数量超出!");
Long count = ioCodeRelServicec.selectIoCodeRelCount(upCode);
if (count >= udiProductEntity.getBhxjsl()) {
return ResultVOUtils.error(999, "数量超出!");
}
//查询下级产品信息
if(StrUtil.isNotEmpty(lowCode)){
UdiEntity udiEntity=FilterUdiUtils.getGS1Udi(lowCode);
UdiProductEntity udiProductEntity1=udiProductService.findByNameCode(udiEntity.getUdi());
if(udiProductEntity!=null){
if(udiProductEntity1.getNameCode().equals(udiProductEntity.getBhxjcpbm())){
IoCodeRelEntity ioCodeRelEntity=new IoCodeRelEntity();
if (StrUtil.isNotEmpty(lowCode)) {
UdiEntity udiEntity = FilterUdiUtils.getGS1Udi(lowCode);
UdiProductEntity udiProductEntity1 = udiProductService.findByNameCode(udiEntity.getUdi());
if (udiProductEntity != null) {
if (udiProductEntity1.getNameCode().equals(udiProductEntity.getBhxjcpbm())) {
IoCodeRelEntity ioCodeRelEntity = new IoCodeRelEntity();
ioCodeRelEntity.setCode(lowCode);
ioCodeRelEntity.setParentCode(upCode);
ioCodeRelEntity.setNameCode(udiProductEntity1.getNameCode());
@ -106,14 +107,15 @@ public class ioCodeRelController {
ioCodeRelEntity.setSerialNo(udiProductEntity1.getSerialNo());
ioCodeRelEntity.setCreateTime(new Date());
ioCodeRelEntity.setUpdateTime(new Date());
ioCodeRelEntity.setId(IdUtil.getSnowflakeNextId());
ioCodeRelServicec.insert(ioCodeRelEntity);
return ResultVOUtils.success();
}else{
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")
@ -131,13 +133,13 @@ public class ioCodeRelController {
@GetMapping("/udi/ioCode/Rel/del")
@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);
if(count>0){
int count = ioCodeRelServicec.delIoCodeRel(code, parentCode);
if (count > 0) {
return ResultVOUtils.success("删除成功");
}else{
return ResultVOUtils.error(999,"删除失败");
} else {
return ResultVOUtils.error(999, "删除失败");
}
}

@ -1,6 +1,7 @@
package com.glxp.api.controller.purchase;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
@ -117,8 +118,8 @@ public class SupCertController {
}
}
}
}else{
if(postSelCertRequest.getProductIdFk()==null) {
} else {
if (postSelCertRequest.getProductIdFk() == null) {
String errMsg = "";
ArrayList<String> list = new ArrayList<>();
int i = postSelCertRequest.getSupCertSetEntities().size();
@ -140,7 +141,7 @@ public class SupCertController {
}
}
}
}else{
} else {
String errMsg = "";
ArrayList<String> list = new ArrayList<>();
int i = postSelCertRequest.getSupCertSetEntities().size();
@ -178,6 +179,7 @@ public class SupCertController {
supCertEntity.setStatus(0);
supCertEntity.setAuditStatus(ConstantStatus.AUDIT_DRAFT);
supCertEntity.setUpdateTime(new Date());
supCertEntity.setId(IdUtil.getSnowflakeNextId());
boolean b = supCertService.insertCompanyCert(supCertEntity);
}
return ResultVOUtils.success("成功");
@ -203,6 +205,7 @@ public class SupCertController {
supCertEntity.setCreateTime(new Date());
supCertEntity.setUpdateTime(new Date());
supCertEntity.setStatus(0);
supCertEntity.setId(IdUtil.getSnowflakeNextId());
boolean b = supCertService.insertCompanyCert(supCertEntity);
return ResultVOUtils.success("成功");
}
@ -265,15 +268,13 @@ public class SupCertController {
BeanUtils.copyProperties(postSupCertRequest, supCertEntity);
if(postSupCertRequest.getVailDate() !=null && postSupCertRequest.getExpireDate() != null){
if(postSupCertRequest.getVailDate().getTime()>postSupCertRequest.getExpireDate().getTime()){
return ResultVOUtils.error(999,"生效期不能小于失效期!");
if (postSupCertRequest.getVailDate() != null && postSupCertRequest.getExpireDate() != null) {
if (postSupCertRequest.getVailDate().getTime() > postSupCertRequest.getExpireDate().getTime()) {
return ResultVOUtils.error(999, "生效期不能小于失效期!");
}
}
if (postSupCertRequest.getRepeatUpload() == 1) {
//已审核的重新提交
//1.修改对应的资质信息进入变更审核状态,
@ -419,7 +420,7 @@ public class SupCertController {
if (StrUtil.isNotEmpty(filterSupCertRequest.getCustomerId()) && filterSupCertRequest.getType() != null) {
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.error(999, "参数错误");

@ -1,6 +1,7 @@
package com.glxp.api.controller.purchase;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
@ -58,20 +59,21 @@ public class SupCertSetController {
supCertSetEntity = new SupCertSetEntity();
}
//判断名字存在就返回
FilterCertSetsRequest filterCertSetsRequest=new FilterCertSetsRequest();
FilterCertSetsRequest filterCertSetsRequest = new FilterCertSetsRequest();
filterCertSetsRequest.setType(supCertSetEntity.getType());
filterCertSetsRequest.setName(supCertSetEntity.getName());
List<SupCertSetEntity> supCertEntityList = supCertSetService.filterCertSets(filterCertSetsRequest);
if(supCertEntityList.size()>0){
return ResultVOUtils.error(999,"该证书名称已存在!");
if (supCertEntityList.size() > 0) {
return ResultVOUtils.error(999, "该证书名称已存在!");
}
supCertSetEntity.setUpdateTime(new Date());
if(supCertSetEntity.getType()==3){
if(supCertSetEntity.getFlbmList().size()>0){
if (supCertSetEntity.getType() == 3) {
if (supCertSetEntity.getFlbmList().size() > 0) {
String flbm = String.join(",", supCertSetEntity.getFlbmList());
supCertSetEntity.setFlbm(flbm);
}
}
supCertSetEntity.setId(IdUtil.getSnowflakeNextId());
boolean b = supCertSetService.insertCertSet(supCertSetEntity);
return ResultVOUtils.success("添加成功!");
}
@ -86,14 +88,14 @@ public class SupCertSetController {
supCertSetEntity.setFlbm(flbm);
}
//判断名字存在就返回
FilterCertSetsRequest filterCertSetsRequest=new FilterCertSetsRequest();
FilterCertSetsRequest filterCertSetsRequest = new FilterCertSetsRequest();
filterCertSetsRequest.setType(supCertSetEntity.getType());
filterCertSetsRequest.setName(supCertSetEntity.getName());
filterCertSetsRequest.setId(supCertSetEntity.getId());
filterCertSetsRequest.setUpdateType(1);
List<SupCertSetEntity> supCertEntityList = supCertSetService.filterCertSets(filterCertSetsRequest);
if(supCertEntityList.size()!=0){
return ResultVOUtils.error(999,"证书已存在!");
if (supCertEntityList.size() != 0) {
return ResultVOUtils.error(999, "证书已存在!");
}
boolean b = supCertSetService.updateCertSet(supCertSetEntity);
return ResultVOUtils.success("修改成功");

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

@ -1,6 +1,7 @@
package com.glxp.api.controller.purchase;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
@ -136,6 +137,7 @@ public class SupProductController {
}
supProductEntity.setCreateTime(new Date());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setId(IdUtil.getSnowflakeNextId());
boolean b = supProductService.insertRegistration(supProductEntity);
if (b) {
return ResultVOUtils.success("添加成功");
@ -150,27 +152,27 @@ public class SupProductController {
public BaseResponse selectBind(@RequestBody SelectProductBindRequest selectProductBindRequest) {
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectUdiId(Long.valueOf(selectProductBindRequest.getRelIdFk()));
SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(),selectProductBindRequest.getManufacturerId());
SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(), selectProductBindRequest.getManufacturerId());
if (supProductEntity != null) {
return ResultVOUtils.error(500, "该产品资质已存在,请勿重复添加!");
}else{
supProductEntity = new SupProductEntity();
BeanUtils.copyProperties(udiRelevanceResponse, supProductEntity);
supProductEntity.setProductId(selectProductBindRequest.getProductId());
supProductEntity.setRecordCode(udiRelevanceResponse.getZczbhhzbapzbh());
supProductEntity.setRelIdFk(udiRelevanceResponse.getId() + "");
supProductEntity.setRecordProductName(udiRelevanceResponse.getCpmctymc());
supProductEntity.setProductType(udiRelevanceResponse.getQxlb());
supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm());
supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc());
supProductEntity.setSpecification(udiRelevanceResponse.getGgxh());
supProductEntity.setCreateTime(new Date());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId());
supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId());
supProductEntity.setHchzsb(udiRelevanceResponse.getCplb());
} else {
supProductEntity = new SupProductEntity();
BeanUtils.copyProperties(udiRelevanceResponse, supProductEntity);
supProductEntity.setProductId(selectProductBindRequest.getProductId());
supProductEntity.setRecordCode(udiRelevanceResponse.getZczbhhzbapzbh());
supProductEntity.setRelIdFk(udiRelevanceResponse.getId() + "");
supProductEntity.setRecordProductName(udiRelevanceResponse.getCpmctymc());
supProductEntity.setProductType(udiRelevanceResponse.getQxlb());
supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm());
supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc());
supProductEntity.setSpecification(udiRelevanceResponse.getGgxh());
supProductEntity.setCreateTime(new Date());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId());
supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId());
supProductEntity.setHchzsb(udiRelevanceResponse.getCplb());
// supProductEntity.setCompanyName(selectProductBindRequest.getCompanyName());
supProductEntity.setAuditStatus(selectProductBindRequest.getAuditStatus());
supProductEntity.setAuditStatus(selectProductBindRequest.getAuditStatus());
}

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

@ -75,7 +75,7 @@ public interface AuthAdminDao extends BaseMapperPlus<AuthAdminDao, AuthAdmin, Au
*/
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);

@ -25,7 +25,7 @@ public interface WarehouseUserDao extends BaseMapperPlus<WarehouseUserDao,Wareho
int insertSelective(WarehouseUserEntity record);
WarehouseUserEntity selectByPrimaryKey(Integer id);
WarehouseUserEntity selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(WarehouseUserEntity record);
@ -60,7 +60,7 @@ public interface WarehouseUserDao extends BaseMapperPlus<WarehouseUserDao,Wareho
* @param id
* @param isDirector
*/
void updateDirectorById(@Param("id") Integer id, @Param("isDirector") int isDirector);
void updateDirectorById(@Param("id") Long id, @Param("isDirector") int isDirector);
/**
*
@ -69,4 +69,4 @@ public interface WarehouseUserDao extends BaseMapperPlus<WarehouseUserDao,Wareho
* @return
*/
Integer countByCode(@Param("code") String code);
}
}

@ -18,7 +18,6 @@ public interface BasicCorpDao extends BaseMapperPlus<BasicCorpDao, BasicCorpEnti
boolean insertThrUnitMaintainignore(ThrUnitMaintainResponse thrUnitMaintainResponse);
int insert(BasicCorpEntity basicUnitMaintainEntity);
int customUpdateById(BasicCorpEntity basicUnitMaintainSaveRequest);

@ -8,7 +8,7 @@ import java.util.Date;
@Data
@TableName("auth_dept")
public class DeptEntity {
private Integer id;
private Long id;
private Integer pid;
private String code;
private String name;

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

@ -13,7 +13,7 @@ import java.util.Date;
@TableName("auth_space")
public class InvSpace {
private Integer id;
private Long id;
/**
*
@ -75,4 +75,4 @@ public class InvSpace {
*
*/
private String remark;
}
}

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

@ -15,7 +15,7 @@ public class WarehouseBussinessTypeEntity {
/**
* id
*/
private Integer id;
private Long id;
/**
*
@ -37,4 +37,4 @@ public class WarehouseBussinessTypeEntity {
@TableField(exist = false)
private boolean select;
}
}

@ -15,7 +15,7 @@ public class WarehouseUserEntity {
/**
* id
*/
private Integer id;
private Long id;
/**
*
@ -44,4 +44,4 @@ public class WarehouseUserEntity {
@TableField("updateTime")
private Date updateTime;
}
}

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

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

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

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

@ -12,8 +12,8 @@ import lombok.Data;
@Data
@TableName(value = "basic_hosp_type")
public class BasicHospTypeEntity {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@TableId(value = "id")
private Long id;
/**
*
@ -89,4 +89,4 @@ public class BasicHospTypeEntity {
@TableField(exist = false)
public static final String COL_UPDATEUSER = "updateUser";
}
}

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

@ -12,7 +12,7 @@ import lombok.Data;
@TableName(value = "company_product_relevance")
public class CompanyProductRelevanceEntity {
@TableId(value = "id", type = IdType.INPUT)
private Integer id;
private Long id;
/**
* ID
@ -110,4 +110,4 @@ public class CompanyProductRelevanceEntity {
public static final String COL_UPDATEUSER = "updateUser";
public static final String COL_UPDATETIME = "updateTime";
}
}

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

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

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

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

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

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

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

@ -10,7 +10,7 @@ import java.util.Date;
/**
* <p>
*
*
* </p>
*
* @author
@ -18,9 +18,9 @@ import java.util.Date;
*/
@TableName("sup_product")
@Data
public class SupProductEntity{
public class SupProductEntity {
@TableId(value = "id", type = IdType.AUTO)
@TableId(value = "id", type = IdType.INPUT)
private Long id;
/**

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

@ -10,16 +10,17 @@ import java.util.Date;
/**
* <p>
*
*
* </p>
*
* @since 2023-01-12
*/
@Data
@TableName("thr_corp")
public class ThrCorpEntity{
public class ThrCorpEntity {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Long id;
@TableField("unitId")
private String unitId;

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

@ -10,7 +10,7 @@ import java.util.Date;
/**
* <p>
*
*
* </p>
*
* @author ${author}
@ -18,10 +18,10 @@ import java.util.Date;
*/
@Data
@TableName("thr_products")
public class ThrProductsEntity{
public class ThrProductsEntity {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Long id;
/**
*
@ -180,6 +180,4 @@ public class ThrProductsEntity{
private String updateUser;
}

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

@ -9,7 +9,7 @@ import java.util.List;
@Data
public class BasicHospTypeRequest{
private Integer id;
private Long id;
private String code;
private String parentCode;
private String name;

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

@ -15,7 +15,6 @@ public interface WarehouseUserService extends IService<WarehouseUserEntity> {
/**
*
*
* @param code
* @return
*/
@ -40,7 +39,7 @@ public interface WarehouseUserService extends IService<WarehouseUserEntity> {
*
* @param id
*/
void updateDirector(Integer id);
void updateDirector(Long id);
void updateDirector(WarehouseUserEntity warehouseUserEntity);

@ -82,7 +82,7 @@ public class WarehouseUserServiceImpl extends ServiceImpl<WarehouseUserDao, Ware
}
@Override
public void updateDirector(Integer id) {
public void updateDirector(Long id) {
if (null != id) {
WarehouseUserEntity warehouseUserEntity = warehouseUserDao.selectByPrimaryKey(id);
warehouseUserDao.updateDirector(warehouseUserEntity.getCode(), 0);

@ -28,7 +28,7 @@ import java.util.stream.Collectors;
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class BasicBussinessTypeServiceImpl extends ServiceImpl<BasicBussinessTypeDao,BasicBussinessTypeEntity> implements IBasicBussinessTypeService {
public class BasicBussinessTypeServiceImpl extends ServiceImpl<BasicBussinessTypeDao, BasicBussinessTypeEntity> implements IBasicBussinessTypeService {
@Resource
private CustomerService customerService;

@ -1,5 +1,6 @@
package com.glxp.api.service.basic.impl;
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;
@ -65,7 +66,7 @@ public class BasicHospTypeServiceImpl extends ServiceImpl<BasicHospTypeDao, Basi
ew.ne("code", 10000);
if (basicHospTypeFilterRequest.getType() != null && basicHospTypeFilterRequest.getType() == 1 && StrUtil.isNotEmpty(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);
}
List<BasicHospTypeEntity> data = basicHospTypeDao.selectList(ew);
@ -105,6 +106,7 @@ public class BasicHospTypeServiceImpl extends ServiceImpl<BasicHospTypeDao, Basi
ew.select("max(code) as code");
BasicHospTypeEntity code = basicHospTypeDao.selectOne(ew);
basicHospTypeEntity.setCode(Integer.valueOf(code.getCode()) + 1 + "");
basicHospTypeEntity.setId(IdUtil.getSnowflakeNextId());
int count = basicHospTypeDao.insert(basicHospTypeEntity);
if (count == 0) {
falg = false;

@ -2,6 +2,7 @@ package com.glxp.api.service.inout;
import cn.hutool.core.bean.BeanUtil;
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.core.conditions.update.UpdateWrapper;
@ -117,6 +118,7 @@ public class IoAddInoutService {
basicCorpEntity.setCorpType(ConstantStatus.CORP_SICK);
basicCorpEntity.setOutType(ConstantStatus.CORP_SICK_SICK);
basicCorpEntity.setName(orderEntity.getFromCorp());
basicCorpEntity.setId(IdUtil.getSnowflakeNextId());
basicCorpService.insertBasicUnitMaintain(basicCorpEntity);
}
orderEntity.setFromCorp(basicCorpEntity.getErpId());

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

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

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

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

@ -145,28 +145,6 @@
#{remark})
</insert>
<insert id="insert" parameterType="com.glxp.api.entity.basic.BasicCorpEntity">
insert INTO basic_corp(thirdId, erpId, name, spell, addr,
status, type, creditNo, contact, mobile, thirdId1, thirdId2, thirdId3, thirdId4,
thirdName, thirdName1, thirdName2, thirdName3, thirdName4, updateTime, corpType, outType,
createUser, createTime, updateUser, remark)
values (#{thirdId},
#{erpId},
#{name},
#{spell},
#{addr},
#{status},
#{type},
#{creditNo},
#{contact},
#{mobile},
#{thirdId1}, #{thirdId2}, #{thirdId3}, #{thirdId4},
#{thirdName}, #{thirdName1}, #{thirdName2}, #{thirdName3}, #{thirdName4}, #{updateTime}, #{corpType},
#{outType}, #{createUser},
#{createTime},
#{updateUser},
#{remark})
</insert>
<update id="customUpdateById" parameterType="com.glxp.api.entity.basic.BasicCorpEntity">

@ -306,6 +306,41 @@ CREATE TABLE IF NOT EXISTS `sync_data_change_bustypes`
COLLATE = utf8mb4_0900_ai_ci COMMENT = '单据同步 - 业务单据类型'
ROW_FORMAT = DYNAMIC;
# 修改主键为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