Merge branch 'master' into test

# Conflicts:
#	src/main/resources/application-test.yml
master
wj 2 years ago
commit a24dd0f1d8

@ -19,7 +19,7 @@ public enum BasicExportTypeEnum {
/** /**
* DI * DI
*/ */
COUNTRY_DI_DATA("country_di_data", "国家库DI数据"), // COUNTRY_DI_DATA("country_di_data", "国家库DI数据"),
/** /**
* *

@ -29,7 +29,7 @@ public class BasicProcessStatus {
public static final String NEW_ALL_BUS = "8"; public static final String NEW_ALL_BUS = "8";
public static final String NEW_ALL_ORDER = "出入库扫码单据"; public static final String NEW_ALL_ORDER = "出入库扫码单据";
public static final String NEW_ALL_BUS_ORDER = "业务单据"; public static final String NEW_ALL_BUS_ORDER = "业务单据";
public static final String NEW_ALL_DI = "10"; public static final String NEW_ALL_UDIS = "国家库数据";
public static final String NEW_ALL_THR_DATA = "12"; //所有第三方基础数据 public static final String NEW_ALL_THR_DATA = "12"; //所有第三方基础数据
public static final String NEW_ALL_THR_PRODUCTS = "13"; //所有第三方产品数据 public static final String NEW_ALL_THR_PRODUCTS = "13"; //所有第三方产品数据

@ -0,0 +1,25 @@
package com.glxp.api.constant;
import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum StatusEnum {
/**
*
*/
FAILED(1, "失败"),
/**
*
*/
SUCCESS(2, "成功"),
;
@EnumValue
private Integer code;
private String remark;
}

@ -1,6 +1,7 @@
package com.glxp.api.controller.auth; package com.glxp.api.controller.auth;
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;
@ -228,6 +229,7 @@ public class DeptController extends BaseController {
deptEntity.setPcode(deptEntity.getPcode()); deptEntity.setPcode(deptEntity.getPcode());
} }
deptEntity.setUpdateTime(new Date()); deptEntity.setUpdateTime(new Date());
deptEntity.setId(IdUtil.getSnowflakeNextId());
boolean b = deptService.insertInvWarehouse(deptEntity); boolean b = deptService.insertInvWarehouse(deptEntity);
if (!b) { if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK); return ResultVOUtils.error(ResultEnum.NOT_NETWORK);

@ -64,23 +64,28 @@ public class DeptUserController {
@PostMapping("udi/auth/dept/user/delete") @PostMapping("udi/auth/dept/user/delete")
@Log(title = "用户管理", businessType = BusinessType.DELETE) @Log(title = "用户管理", businessType = BusinessType.DELETE)
public BaseResponse delete(@RequestBody DeptUserEntity deptUserEntity) { public BaseResponse delete(@RequestBody DeptUserEntity deptUserEntity) {
// 判断此用户是否创建单据 // 判断此用户是否创建单据
List<IoOrderEntity> ioOrderEntities = ioOrderService.selectList(deptUserEntity.getUserId()); List<IoOrderEntity> ioOrderEntities = ioOrderService.selectList(deptUserEntity.getUserId());
if( ioOrderEntities != null && ioOrderEntities.size() != 0 ){ if (ioOrderEntities != null && ioOrderEntities.size() != 0) {
return ResultVOUtils.error(500,"该用户已创建单据,不能移除!"); return ResultVOUtils.error(500, "该用户已创建单据,不能移除!");
} }
//判断此用户是否与仓库有关联 //判断此用户是否与仓库有关联
List<String> listWareHouse = warehouseUserService.selectCodeByUser(deptUserEntity.getUserId() + ""); List<String> listWareHouse = warehouseUserService.selectCodeByUser(deptUserEntity.getUserId() + "");
if( listWareHouse != null && listWareHouse.size() != 0){ if (listWareHouse != null && listWareHouse.size() != 0) {
return ResultVOUtils.error(500,"该用户已绑定仓库,不能移除!"); return ResultVOUtils.error(500, "该用户已绑定仓库,不能移除!");
} }
//判断此用户是否与除一级部门 还绑定其他部门 //判断此用户是否与除一级部门 还绑定其他部门
FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust(); FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust();
filterDeptUserReqeust.setUserId(deptUserEntity.getUserId()); filterDeptUserReqeust.setUserId(deptUserEntity.getUserId());
List<DeptUserEntity> deptUserEntities = deptUserService.selectDeptUser(filterDeptUserReqeust); List<DeptUserEntity> deptUserEntities = deptUserService.selectDeptUser(filterDeptUserReqeust);
if( deptUserEntities != null && deptUserEntities.size()>1){ for (int i = 0; i < deptUserEntities.size(); i++) {
return ResultVOUtils.error(500,"该用户已绑定多个部门,不能移除!"); if (deptUserEntities.get(i).getDeptId() == 1) {
deptUserEntities.remove(deptUserEntities.get(i));
}
}
if (deptUserEntities != null && deptUserEntities.size() > 1) {
return ResultVOUtils.error(500, "该用户已绑定多个部门,不能移除!");
} }

@ -1,6 +1,7 @@
package com.glxp.api.controller.auth; package com.glxp.api.controller.auth;
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;
import com.glxp.api.annotation.Log; import com.glxp.api.annotation.Log;
@ -131,15 +132,16 @@ public class InvBusUserController {
@PostMapping("/spms/bus/user/warehouse/post") @PostMapping("/spms/bus/user/warehouse/post")
@Log(title = "用户管理", businessType = BusinessType.INSERT) @Log(title = "用户管理", businessType = BusinessType.INSERT)
public BaseResponse postRes(@RequestBody UpdateUserRelBusRequset relBusRequset) { public BaseResponse postRes(@RequestBody UpdateUserRelBusRequset relBusRequset) {
boolean b = invBusUserService.deleteByUnion(relBusRequset.getUserId(), relBusRequset.getSubInvCode());
if (CollUtil.isNotEmpty(relBusRequset.getSelectActions())) { if (CollUtil.isNotEmpty(relBusRequset.getSelectActions())) {
invBusUserService.deleteByUnion(relBusRequset.getUserId(), relBusRequset.getSubInvCode());
relBusRequset.getSelectActions().forEach(action -> relBusRequset.getSelectActions().forEach(action ->
{ {
InvBusUserEntity invBusUserEntity = new InvBusUserEntity(); InvBusUserEntity invBusUserEntity = new InvBusUserEntity();
invBusUserEntity.setUserId(relBusRequset.getUserId()); invBusUserEntity.setUserId(relBusRequset.getUserId());
invBusUserEntity.setSubInvCode(relBusRequset.getSubInvCode()); invBusUserEntity.setSubInvCode(relBusRequset.getSubInvCode());
invBusUserEntity.setScAction(action); invBusUserEntity.setScAction(action);
invBusUserService.insertInvBusUser(invBusUserEntity); invBusUserEntity.setId(IdUtil.getSnowflakeNextId());
invBusUserService.save(invBusUserEntity);
}); });
} }
InvBusUserEntity invBusUserEntity = new InvBusUserEntity(); InvBusUserEntity invBusUserEntity = new InvBusUserEntity();

@ -242,19 +242,25 @@ public class InvWarehouseController extends BaseController {
return ResultVOUtils.error(500, "修改失败,请先移除该仓库关联用户!"); return ResultVOUtils.error(500, "修改失败,请先移除该仓库关联用户!");
} }
// 先判断是否有相同名字的仓库
boolean checkResult = invWarehouseService.checkDuplicateName(invWarehouseEntity.getParentId(), invWarehouseEntity.getName());
if (checkResult) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "仓库名称重复!");
}
//更新仓库信息 //更新仓库信息
invWarehouseEntity.setUpdateTime(new Date()); invWarehouseEntity.setUpdateTime(new Date());
boolean b = invWarehouseService.updateInvSubWarehouse(invWarehouseEntity); boolean b = invWarehouseService.updateInvSubWarehouse(invWarehouseEntity);
//如果要是一级仓库就吧全部子集都刷成一样的寄售仓库 // //如果要是一级仓库就吧全部子集都刷成一样的寄售仓库
if (StrUtil.isBlank(invWarehouseEntity.getParentCode())) { // if (StrUtil.isBlank(invWarehouseEntity.getParentCode())) {
List<InvWarehouseEntity> invWarehouseEntityList = invWarehouseService.selectLowWarehouseAll(invWarehouseEntity.getCode()); // List<InvWarehouseEntity> invWarehouseEntityList = invWarehouseService.selectLowWarehouseAll(invWarehouseEntity.getCode());
for (InvWarehouseEntity obj : invWarehouseEntityList) { // for (InvWarehouseEntity obj : invWarehouseEntityList) {
obj.setAdvanceType(invWarehouseEntity.getAdvanceType()); // obj.setAdvanceType(invWarehouseEntity.getAdvanceType());
obj.setUpdateTime(new Date()); // obj.setUpdateTime(new Date());
invWarehouseService.updateInvSubWarehouse(obj); // invWarehouseService.updateInvSubWarehouse(obj);
} // }
} // }
//更新部门信息 //更新部门信息

@ -3,6 +3,7 @@ package com.glxp.api.controller.auth;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.Log; import com.glxp.api.annotation.Log;
@ -73,24 +74,24 @@ public class SysUserController extends BaseController {
AuthAdminResponse authAdminResponse = new AuthAdminResponse(); AuthAdminResponse authAdminResponse = new AuthAdminResponse();
BeanUtils.copyProperties(item, authAdminResponse); BeanUtils.copyProperties(item, authAdminResponse);
List<Long> roles = sysRoleService.selectRoleListByUserId(authAdminResponse.getId()); List<Long> roles = sysRoleService.selectRoleListByUserId(authAdminResponse.getId());
List<DeptUserResponse> deptUserResponses=null; List<DeptUserResponse> deptUserResponses = null;
if("key".equals(filterAuthUserRequest.getKey())){ if ("key".equals(filterAuthUserRequest.getKey())) {
deptUserResponses = deptUserService.selectByUserIdKey(authAdminResponse.getId()); deptUserResponses = deptUserService.selectByUserIdKey(authAdminResponse.getId());
}else{ } else {
deptUserResponses = deptUserService.selectByUserId(authAdminResponse.getId()); deptUserResponses = deptUserService.selectByUserId(authAdminResponse.getId());
} }
if (CollUtil.isNotEmpty(deptUserResponses)) { if (CollUtil.isNotEmpty(deptUserResponses)) {
List<Long> depts = new ArrayList<>(); List<Long> depts = new ArrayList<>();
String deptName = ""; String deptName = "";
for (DeptUserResponse deptUserResponse : deptUserResponses) { for (DeptUserResponse deptUserResponse : deptUserResponses) {
if(deptUserResponse.getDeptId()!=1){ if (deptUserResponse.getDeptId() != 1) {
depts.add(deptUserResponse.getDeptId()); depts.add(deptUserResponse.getDeptId());
deptName = deptName + "," + deptUserResponse.getDeptName(); deptName = deptName + "," + deptUserResponse.getDeptName();
} }
} }
if(deptName.length()!=0){ if (deptName.length() != 0) {
authAdminResponse.setDeptName(deptName.substring(1)); authAdminResponse.setDeptName(deptName.substring(1));
}else{ } else {
authAdminResponse.setDeptName(deptName); authAdminResponse.setDeptName(deptName);
} }
authAdminResponse.setDepts(depts); authAdminResponse.setDepts(depts);
@ -194,7 +195,7 @@ public class SysUserController extends BaseController {
String pid = invWarehouseService.selectParentIdByCode(authUserSaveRequest.getLocInvCode()); String pid = invWarehouseService.selectParentIdByCode(authUserSaveRequest.getLocInvCode());
authAdmin.setLocDeptCode(pid); authAdmin.setLocDeptCode(pid);
authAdmin.setLocInvCode(authUserSaveRequest.getLocInvCode()); authAdmin.setLocInvCode(authUserSaveRequest.getLocInvCode());
authAdmin.setId(IdUtil.getSnowflakeNextId());
boolean b = userService.insertAuthAdmin(authAdmin); boolean b = userService.insertAuthAdmin(authAdmin);
authAdmin = userService.findByUserName(authAdmin.getUserName()); authAdmin = userService.findByUserName(authAdmin.getUserName());
if (!b) { if (!b) {
@ -212,15 +213,14 @@ public class SysUserController extends BaseController {
// sysUserRole.setRoleId(sysUserRole1.getRoleId()); // sysUserRole.setRoleId(sysUserRole1.getRoleId());
// userService.insertUserAuth1(sysUserRole); // userService.insertUserAuth1(sysUserRole);
//默认插入第一部门 //默认插入第一部门
List<Long> deptCodeList=authUserSaveRequest.getDepts(); List<Long> deptCodeList = authUserSaveRequest.getDepts();
if(deptCodeList == null){ if (deptCodeList == null) {
deptCodeList=new ArrayList<>(); deptCodeList = new ArrayList<>();
} }
deptCodeList.add(1L); deptCodeList.add(1L);
authUserSaveRequest.setDepts(deptCodeList); authUserSaveRequest.setDepts(deptCodeList);
//插入部门 //插入部门
if (CollUtil.isNotEmpty(authUserSaveRequest.getDepts())) { if (CollUtil.isNotEmpty(authUserSaveRequest.getDepts())) {
List<DeptUserEntity> list = new ArrayList<>(); List<DeptUserEntity> list = new ArrayList<>();
@ -296,22 +296,24 @@ public class SysUserController extends BaseController {
userService.updateAuthAdmin(authAdmin); userService.updateAuthAdmin(authAdmin);
//默认插入第一部门 //默认插入第一部门
ArrayList<Long> deptCodeList = new ArrayList<>(); ArrayList<Long> deptCodeList = new ArrayList<>();
FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust(); FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust();
filterDeptUserReqeust.setUserId(authUserSaveRequest.getId()); filterDeptUserReqeust.setUserId(authUserSaveRequest.getId());
List<DeptUserEntity> deptUserEntities = deptUserService.selectDeptUser(filterDeptUserReqeust); List<DeptUserEntity> deptUserEntities = deptUserService.selectDeptUser(filterDeptUserReqeust);
if(deptUserEntities == null){ if (deptUserEntities == null) {
deptCodeList.add(1L); deptCodeList.add(1L);
authUserSaveRequest.setDepts(deptCodeList); authUserSaveRequest.setDepts(deptCodeList);
}else{ } else {
Boolean checkDeptId=false; Boolean checkDeptId = false;
for (DeptUserEntity deptUserEntity : deptUserEntities) { for (DeptUserEntity deptUserEntity : deptUserEntities) {
if(deptUserEntity.getDeptId() == 1){ if (deptUserEntity.getDeptId() == 1) {
checkDeptId=true; checkDeptId = true;
} else {
deptCodeList.add(deptUserEntity.getDeptId());
} }
} }
if(checkDeptId==false){ if (checkDeptId == false) {
deptCodeList.add(1L); deptCodeList.add(1L);
authUserSaveRequest.setDepts(deptCodeList); authUserSaveRequest.setDepts(deptCodeList);
} }

@ -173,7 +173,7 @@ public class BasicBussinessTypeController extends BaseController {
} }
if (bussinessTypeSaveRequest != null) { if (bussinessTypeSaveRequest != null) {
boolean exists = basicBussinessTypeService.checkBusTypeNameExists(bussinessTypeSaveRequest.getName(), bussinessTypeSaveRequest.getId().intValue()); boolean exists = basicBussinessTypeService.checkBusTypeNameExists(bussinessTypeSaveRequest.getName(), bussinessTypeSaveRequest.getId().longValue());
if (exists) { if (exists) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "单据类型名称重复!"); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "单据类型名称重复!");
} }

@ -379,12 +379,10 @@ public class UdiRelevanceController extends BaseController {
//新增或修改关联 //新增或修改关联
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/udi/udirel/check/udi") @PostMapping("/udi/udirel/check/udi")
public BaseResponse checkUdi(@RequestBody UdiCombineRequest udiCombineRequest) { public BaseResponse checkUdi(@RequestBody UdiCombineRequest udiCombineRequest) {
List<String> keys = udiCombineRequest.getKeys(); List<String> keys = udiCombineRequest.getKeys();
if (keys != null && keys.size() > 0) { if (keys != null && keys.size() > 0) {
List<UdiRelevanceEntity> datas = udiRelevanceService.batchSelectByUuid(keys); List<UdiRelevanceEntity> datas = udiRelevanceService.batchSelectByUuid(keys);
if (datas.isEmpty()) { if (datas.isEmpty()) {
return ResultVOUtils.success("无被选入!"); return ResultVOUtils.success("无被选入!");

@ -12,10 +12,7 @@ import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BasicExportStatusEnum; import com.glxp.api.constant.*;
import com.glxp.api.constant.BasicExportTypeEnum;
import com.glxp.api.constant.BasicProcessStatus;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.dao.auth.*; import com.glxp.api.dao.auth.*;
import com.glxp.api.dao.basic.*; import com.glxp.api.dao.basic.*;
import com.glxp.api.dao.inout.*; import com.glxp.api.dao.inout.*;
@ -62,8 +59,12 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.*; import java.io.*;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -352,7 +353,6 @@ public class SpsSyncDownloadController {
case SYS_SET_DATA: case SYS_SET_DATA:
saveUploadSysSettingData(JSONUtil.toBean(obj, SpsSyncSysSettingResponse.class)); saveUploadSysSettingData(JSONUtil.toBean(obj, SpsSyncSysSettingResponse.class));
break; break;
case COUNTRY_DI_DATA:
} }
String taskId = obj.getStr("taskId"); String taskId = obj.getStr("taskId");
BasicDownloadStatusEntity downloadStatus = BasicDownloadStatusEntity.builder() BasicDownloadStatusEntity downloadStatus = BasicDownloadStatusEntity.builder()
@ -360,7 +360,7 @@ public class SpsSyncDownloadController {
.taskId(taskId) .taskId(taskId)
.startTime(new Date()) .startTime(new Date())
.endTime(new Date()) .endTime(new Date())
.status(1) .status(StatusEnum.SUCCESS.getCode())
.updateTime(new Date()) .updateTime(new Date())
.type(upLoadRequest.getExportType().getRemark()) .type(upLoadRequest.getExportType().getRemark())
.idDatas(upLoadRequest.getExportType().getKey()) .idDatas(upLoadRequest.getExportType().getKey())
@ -422,7 +422,8 @@ public class SpsSyncDownloadController {
systemPDFModuleDao.insertOrUpdateBatch(bean.getSystemPDFModuleEntities()); systemPDFModuleDao.insertOrUpdateBatch(bean.getSystemPDFModuleEntities());
} }
if (CollectionUtil.isNotEmpty(bean.getSystemPDFTemplateEntities())) { if (CollectionUtil.isNotEmpty(bean.getSystemPDFTemplateEntities())) {
systemPDFTemplateDao.insertOrUpdateBatch(bean.getSystemPDFTemplateEntities()); for (SystemPDFTemplateEntity systemPDFTemplateEntity : bean.getSystemPDFTemplateEntities())
systemPDFTemplateDao.insertOrUpdate(systemPDFTemplateEntity);
} }
if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceCodeEntities())) { if (CollectionUtil.isNotEmpty(bean.getSysPdfTemplateRelevanceCodeEntities())) {
sysPdfTemplateRelevanceCodeDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceCodeEntities()); sysPdfTemplateRelevanceCodeDao.insertOrUpdateBatch(bean.getSysPdfTemplateRelevanceCodeEntities());
@ -1142,5 +1143,63 @@ public class SpsSyncDownloadController {
return ResultVOUtils.success("上传成功"); return ResultVOUtils.success("上传成功");
} }
@GetMapping("/sps/sync/download/info/file")
public void downloadFile(HttpServletResponse response,String id){
if (StrUtil.isBlank(id)) {
throw new RuntimeException("缺少唯一标识");
}
BasicDownloadStatusEntity info = basicDownloadService.getById(id);
if (info == null) {
throw new RuntimeException("数据不存在");
}
if (StrUtil.isBlank(info.getCacheFilePath())) {
throw new RuntimeException("文件未生成");
}
File file = new File(info.getCacheFilePath());
if (!file.exists()) {
throw new RuntimeException("文件丢失");
}
String[] split = info.getCacheFilePath().split("/");
String enFileName = URLEncoder.encode(split[split.length - 1], StandardCharsets.UTF_8);
// 设值返回文件属性,浏览器会根据属性调用下载文件方法
response.addHeader("Content-Disposition", "attachment;filename=" + enFileName);
// 前端获取文件名,需要解码
response.addHeader("downLoadName", enFileName);
// 定义输出流
ServletOutputStream outputStream = null;
FileInputStream fileInputStream = null;
try {
outputStream = response.getOutputStream();
// 定义输出类型为二进制流输出
response.setContentType("application/octet-stream");
fileInputStream = new FileInputStream(file);
byte[] bytes = new byte[fileInputStream.available()];
fileInputStream.read(bytes);
// 把流写入response
outputStream.write(bytes);
// flush落盘
outputStream.flush();
// 关闭输出流
outputStream.close();
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
if (fileInputStream != null) {
try {
fileInputStream.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
}
} }

@ -27,7 +27,6 @@ public interface WarehouseBussinessTypeDao extends BaseMapperPlus<WarehouseBussi
int updateBatchSelective(List<WarehouseBussinessTypeEntity> list); int updateBatchSelective(List<WarehouseBussinessTypeEntity> list);
int batchInsert(@Param("list") List<WarehouseBussinessTypeEntity> list);
List<WarehouseBussinessTypeEntity> selectListByCode(@Param("code") String code); List<WarehouseBussinessTypeEntity> selectListByCode(@Param("code") String code);

@ -24,7 +24,7 @@ public interface SystemParamConfigDao extends BaseMapperPlus<SystemParamConfigDa
String selectValueByParamKey(String key); String selectValueByParamKey(String key);
boolean updateById(SysParamConfigSaveRequest sysParamConfigSaveRequest); boolean updateEntityById(SysParamConfigSaveRequest sysParamConfigSaveRequest);
boolean updateParentId(SysParamConfigSaveRequest sysParamConfigSaveRequest); boolean updateParentId(SysParamConfigSaveRequest sysParamConfigSaveRequest);

@ -1,5 +1,6 @@
package com.glxp.api.dao.sync; package com.glxp.api.dao.sync;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.sync.BasicDownloadStatusEntity; import com.glxp.api.entity.sync.BasicDownloadStatusEntity;
import com.glxp.api.req.sync.BasicDownloadRequest; import com.glxp.api.req.sync.BasicDownloadRequest;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -8,7 +9,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@Mapper @Mapper
public interface BasicDownloadDao { public interface BasicDownloadDao extends BaseMapperPlus<BasicDownloadDao,BasicDownloadStatusEntity,BasicDownloadStatusEntity> {
List<BasicDownloadStatusEntity> filterDownloadStatus(BasicDownloadRequest basicDownloadRequest); List<BasicDownloadStatusEntity> filterDownloadStatus(BasicDownloadRequest basicDownloadRequest);

@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
@Mapper @Mapper
public interface SystemPDFTemplateDao extends BaseMapperPlus<SystemPDFTemplateDao,SystemPDFTemplateEntity,SystemPDFTemplateEntity> { public interface SystemPDFTemplateDao extends BaseMapperPlus<SystemPDFTemplateDao, SystemPDFTemplateEntity, SystemPDFTemplateEntity> {
List<SystemPDFTemplateEntity> queryPage(FilterPdfTemplateRequest filterPdfTemplateRequest); List<SystemPDFTemplateEntity> queryPage(FilterPdfTemplateRequest filterPdfTemplateRequest);
@ -17,13 +17,11 @@ public interface SystemPDFTemplateDao extends BaseMapperPlus<SystemPDFTemplateDa
SystemPDFTemplateEntity findSystemPDFTemplate(FilterPdfTemplateRequest filterPdfTemplateRequest); SystemPDFTemplateEntity findSystemPDFTemplate(FilterPdfTemplateRequest filterPdfTemplateRequest);
SystemPDFTemplateEntity selectById(String id);
boolean updateById(SysPdfTemplateSaveRequest sysPdfTemplateSaveRequest); boolean updateEntity(SysPdfTemplateSaveRequest sysPdfTemplateSaveRequest);
boolean insertEntity(SystemPDFTemplateEntity systemPDFTemplateEntity); boolean insertEntity(SystemPDFTemplateEntity systemPDFTemplateEntity);
boolean deleteById(Integer id); boolean deleteById(Integer id);
boolean insertOrUpdate(SystemPDFTemplateEntity systemPDFTemplateEntity);
} }

@ -243,5 +243,13 @@ public class IoOrderEntity {
@TableField(value = "checkPreInOrders") @TableField(value = "checkPreInOrders")
private String checkPreInOrders; private String checkPreInOrders;
// 预验收按货位出库,退货
@TableField(value = "checkPreInInvCode")
private String checkPreInInvCode;
// 预验收按货位出库,退货
@TableField(value = "checkPreInSpaceCode")
private String checkPreInSpaceCode;
} }

@ -1,29 +1,44 @@
package com.glxp.api.entity.system; package com.glxp.api.entity.system;
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.TableName;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
@Data @Data
@TableName("sys_pdf_template")
public class SystemPDFTemplateEntity { public class SystemPDFTemplateEntity {
@TableId(value = "id", type = IdType.AUTO)
private Integer id; private Integer id;
@TableField(value = "name")
private String name; private String name;
@TableField(value = "type")
private int type; private int type;
@TableField(value = "module")
private int module; private int module;
@TableField(value = "param")
private String param; private String param;
@TableField(value = "path")
private String path; private String path;
@TableField(value = "rowCount")
private int rowCount; private int rowCount;
@TableField(value = "qrcodeCount")
private int qrcodeCount; private int qrcodeCount;
@TableField(value = "remark")
private String remark; private String remark;
@TableField(value = "`create_time`")
private Date create_time; private Date create_time;
@TableField(value = "`update_time`") @TableField(value = "`update_time`")
private Date update_time; private Date update_time;
@TableField(value = "jrxmlPath")
private String jrxmlPath; private String jrxmlPath;
@TableField(exist = false)
private Integer bussinessType; private Integer bussinessType;
@TableField(exist = false)
private String bussinessStatus; private String bussinessStatus;
@TableField(exist = false)
@TableField(value = "updateTime")
private Date updateTime; private Date updateTime;
} }

@ -34,4 +34,7 @@ public class FilterCertRemindMsgRequest extends ListPageRequest {
*/ */
private Integer ignoreStatus; private Integer ignoreStatus;
// 证书名称
private String certName;
} }

@ -12,7 +12,7 @@ public class BasicBussinessTypeResponse {
/** /**
* ID * ID
*/ */
private Integer id; private Long id;
/** /**
* *

@ -8,7 +8,7 @@ import java.util.List;
public class BaseSyncResponse { public class BaseSyncResponse {
private String taskId; private String taskId;
private List<String> files; private List<String> syncFiles;
private String updateTime; private String updateTime;
} }

@ -68,7 +68,7 @@ public class WarehouseBussinessTypeServiceImpl implements WarehouseBussinessType
}); });
//加入新数据 //加入新数据
warehouseBussinessTypeDao.batchInsert(warehouseBussinessTypeEntities); warehouseBussinessTypeDao.insertBatch(warehouseBussinessTypeEntities);
} }
} }

@ -111,7 +111,7 @@ public interface IBasicBussinessTypeService extends IService<BasicBussinessTypeE
* @param id ID * @param id ID
* @return * @return
*/ */
boolean checkBusTypeNameExists(String name, Integer id); boolean checkBusTypeNameExists(String name, Long id);
List<BasicBussinessTypeEntity> selectIgnoreSelf(String action); List<BasicBussinessTypeEntity> selectIgnoreSelf(String action);

@ -28,7 +28,7 @@ import java.util.stream.Collectors;
@Slf4j @Slf4j
@Service @Service
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class BasicBussinessTypeServiceImpl extends ServiceImpl<BasicBussinessTypeDao,BasicBussinessTypeEntity> implements IBasicBussinessTypeService { public class BasicBussinessTypeServiceImpl extends ServiceImpl<BasicBussinessTypeDao, BasicBussinessTypeEntity> implements IBasicBussinessTypeService {
@Resource @Resource
private CustomerService customerService; private CustomerService customerService;
@ -84,7 +84,8 @@ public class BasicBussinessTypeServiceImpl extends ServiceImpl<BasicBussinessTyp
* @param basicBussinessTypeEntity * @param basicBussinessTypeEntity
*/ */
private void setSupplementOrderType(BasicBussinessTypeEntity basicBussinessTypeEntity) { private void setSupplementOrderType(BasicBussinessTypeEntity basicBussinessTypeEntity) {
if (null == basicBussinessTypeEntity.getId()) { boolean isExit = basicBussinessTypeDao.exists(new QueryWrapper<BasicBussinessTypeEntity>().eq(basicBussinessTypeEntity.getId() != null, "id", basicBussinessTypeEntity.getId()));
if (null == basicBussinessTypeEntity.getId() || !isExit) {
//处理添加新单据类型时的平衡补单逻辑 //处理添加新单据类型时的平衡补单逻辑
if (StrUtil.isNotBlank(basicBussinessTypeEntity.getSupplementOrderType())) { if (StrUtil.isNotBlank(basicBussinessTypeEntity.getSupplementOrderType())) {
//查询平衡补单的单据类型数据是否存在 //查询平衡补单的单据类型数据是否存在
@ -175,7 +176,7 @@ public class BasicBussinessTypeServiceImpl extends ServiceImpl<BasicBussinessTyp
} }
@Override @Override
public boolean checkBusTypeNameExists(String name, Integer id) { public boolean checkBusTypeNameExists(String name, Long id) {
List<BasicBussinessTypeEntity> list = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>().select("name", "id").eq("name", name)); List<BasicBussinessTypeEntity> list = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>().select("name", "id").eq("name", name));
if (CollUtil.isEmpty(list)) { if (CollUtil.isEmpty(list)) {
return false; return false;

@ -1,12 +1,13 @@
package com.glxp.api.service.sync; package com.glxp.api.service.sync;
import com.baomidou.mybatisplus.extension.service.IService;
import com.glxp.api.entity.sync.BasicDownloadStatusEntity; import com.glxp.api.entity.sync.BasicDownloadStatusEntity;
import com.glxp.api.req.sync.BasicDownloadRequest; import com.glxp.api.req.sync.BasicDownloadRequest;
import java.util.List; import java.util.List;
public interface BasicDownloadService { public interface BasicDownloadService extends IService<BasicDownloadStatusEntity> {
BasicDownloadStatusEntity findByData(String idDatas, Integer status); BasicDownloadStatusEntity findByData(String idDatas, Integer status);

@ -47,6 +47,8 @@ import java.io.IOException;
import java.util.*; import java.util.*;
import java.util.function.Function; import java.util.function.Function;
import static com.glxp.api.constant.BasicProcessStatus.NEW_ALL_UDIS;
@Slf4j @Slf4j
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
@ -111,7 +113,7 @@ public class SpsSyncDownloadService {
public void syncDiProductsTask() { public void syncDiProductsTask() {
BasicExportStatusEntity exportStatus = basicExportService.getOne(Wrappers.lambdaQuery(BasicExportStatusEntity.class) BasicExportStatusEntity exportStatus = basicExportService.getOne(Wrappers.lambdaQuery(BasicExportStatusEntity.class)
.eq(BasicExportStatusEntity::getType, BasicExportTypeEnum.COUNTRY_DI_DATA.getRemark()) .eq(BasicExportStatusEntity::getType, NEW_ALL_UDIS)
.orderByDesc(BasicExportStatusEntity::getStartTime) .orderByDesc(BasicExportStatusEntity::getStartTime)
.last("limit 1") .last("limit 1")
); );
@ -126,7 +128,7 @@ public class SpsSyncDownloadService {
BasicExportStatusEntity basicExportStatusEntity = new BasicExportStatusEntity(); BasicExportStatusEntity basicExportStatusEntity = new BasicExportStatusEntity();
basicExportStatusEntity.setId(CustomUtil.getId()); basicExportStatusEntity.setId(CustomUtil.getId());
basicExportStatusEntity.setIdDatas(ConstantStatus.SYNC_DI_PRODUCTS); basicExportStatusEntity.setIdDatas(ConstantStatus.SYNC_DI_PRODUCTS);
basicExportStatusEntity.setType(BasicExportTypeEnum.COUNTRY_DI_DATA.getRemark()); basicExportStatusEntity.setType(NEW_ALL_UDIS);
basicExportStatusEntity.setUpdateTime(new Date()); basicExportStatusEntity.setUpdateTime(new Date());
basicExportStatusEntity.setStartTime(new Date()); basicExportStatusEntity.setStartTime(new Date());
basicExportStatusEntity.setStatus(BasicExportStatusEnum.WAIT_TRIGGERED.getCode()); basicExportStatusEntity.setStatus(BasicExportStatusEnum.WAIT_TRIGGERED.getCode());
@ -310,6 +312,7 @@ public class SpsSyncDownloadService {
BasicExportTypeEnum exportType = BasicExportTypeEnum.BASIC_DATA; BasicExportTypeEnum exportType = BasicExportTypeEnum.BASIC_DATA;
//文件数据 //文件数据
Map<String, List> jsonMap = new WeakHashMap<>(4); Map<String, List> jsonMap = new WeakHashMap<>(4);
List<String> syncFiles = new ArrayList<>();
Map<BasicExportStatusTimeEnum, Map<String, Object>> totalTimeMap = new WeakHashMap<>(10); Map<BasicExportStatusTimeEnum, Map<String, Object>> totalTimeMap = new WeakHashMap<>(10);
try { try {
//确认有开启物资字典由外向内同步 //确认有开启物资字典由外向内同步
@ -375,6 +378,14 @@ public class SpsSyncDownloadService {
); );
if (CollectionUtil.isNotEmpty(supCertList)) { if (CollectionUtil.isNotEmpty(supCertList)) {
jsonMap.put(SupCertEntity.class.getSimpleName(), supCertList); jsonMap.put(SupCertEntity.class.getSimpleName(), supCertList);
for (SupCertEntity supCertEntity : supCertList) {
if (StrUtil.isNotEmpty(supCertEntity.getFilePath())) {
syncFiles.add(supCertEntity.getFilePath());
}
}
if (CollUtil.isNotEmpty(syncFiles)) {
jsonMap.put("syncFiles", syncFiles);
}
} }
List<SupCertSetEntity> supCertSetList = supCertSetService.list(Wrappers.lambdaQuery(SupCertSetEntity.class) List<SupCertSetEntity> supCertSetList = supCertSetService.list(Wrappers.lambdaQuery(SupCertSetEntity.class)
.le((boolean) map.get("isNew"), SupCertSetEntity::getUpdateTime, now) .le((boolean) map.get("isNew"), SupCertSetEntity::getUpdateTime, now)
@ -825,7 +836,7 @@ public class SpsSyncDownloadService {
} }
} }
syncOrderResponse.setFiles(syncFiles); syncOrderResponse.setSyncFiles(syncFiles);
syncOrderResponse.setCodeEntities(codeEntities); syncOrderResponse.setCodeEntities(codeEntities);
syncOrderResponse.setOrderDetailBizEntities(orderDetailBizEntities); syncOrderResponse.setOrderDetailBizEntities(orderDetailBizEntities);
syncOrderResponse.setOrderDetailCodeEntities(orderDetailCodeEntities); syncOrderResponse.setOrderDetailCodeEntities(orderDetailCodeEntities);

@ -1,6 +1,7 @@
package com.glxp.api.service.sync.impl; package com.glxp.api.service.sync.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.sync.BasicDownloadDao; import com.glxp.api.dao.sync.BasicDownloadDao;
import com.glxp.api.entity.sync.BasicDownloadStatusEntity; import com.glxp.api.entity.sync.BasicDownloadStatusEntity;
@ -15,7 +16,7 @@ import java.util.List;
@Service @Service
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class BasicDownloadServiceImpl implements BasicDownloadService { public class BasicDownloadServiceImpl extends ServiceImpl<BasicDownloadDao,BasicDownloadStatusEntity> implements BasicDownloadService {
@Resource @Resource
BasicDownloadDao basicDownloadDao; BasicDownloadDao basicDownloadDao;

@ -50,7 +50,7 @@ public class SystemPDFTemplateServiceImpl extends ServiceImpl<SystemPDFTemplateD
@Override @Override
public boolean updateById(SysPdfTemplateSaveRequest sysPdfTemplateSaveRequest) { public boolean updateById(SysPdfTemplateSaveRequest sysPdfTemplateSaveRequest) {
return systemPDFTemplateDao.updateById(sysPdfTemplateSaveRequest); return systemPDFTemplateDao.updateEntity(sysPdfTemplateSaveRequest);
} }
@Override @Override

@ -72,7 +72,7 @@ public class SystemParamConfigServiceImpl extends ServiceImpl<SystemParamConfigD
@Override @Override
public boolean updateById(SysParamConfigSaveRequest sysParamConfigSaveRequest) { public boolean updateById(SysParamConfigSaveRequest sysParamConfigSaveRequest) {
sysParamConfigSaveRequest.setUpdateTime(new Date()); sysParamConfigSaveRequest.setUpdateTime(new Date());
return systemParamConfigDao.updateById(sysParamConfigSaveRequest); return systemParamConfigDao.updateEntityById(sysParamConfigSaveRequest);
} }
@Override @Override

@ -6,8 +6,8 @@
resultType="com.glxp.api.entity.auth.AuthAdmin"> resultType="com.glxp.api.entity.auth.AuthAdmin">
SELECT auth_user.*, auth_dept.name deptName, auth_warehouse.name warehouseName SELECT auth_user.*, auth_dept.name deptName, auth_warehouse.name warehouseName
FROM auth_user FROM auth_user
left join auth_dept on auth_user.locDeptCode = auth_dept.code left join auth_dept on auth_user.locDeptCode = auth_dept.code
LEFT JOIN auth_warehouse on auth_user.locInvCode = auth_warehouse.code LEFT JOIN auth_warehouse on auth_user.locInvCode = auth_warehouse.code
<where> <where>
<if test="ids != null and ids.size > 0"> <if test="ids != null and ids.size > 0">
AND id IN AND id IN
@ -27,8 +27,8 @@
<if test="lastUpdateTime != null and lastUpdateTime != ''"> <if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[ <![CDATA[
and DATE_FORMAT(lastModifyTime and DATE_FORMAT(lastModifyTime
, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime} , '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}
, '%Y-%m-%d %H:%i:%S') , '%Y-%m-%d %H:%i:%S')
]]> ]]>
</if> </if>
<if test="deptCode != null and deptCode != ''"> <if test="deptCode != null and deptCode != ''">
@ -77,10 +77,10 @@
</select> </select>
<insert id="insertAuthAdmin" keyProperty="id" parameterType="com.glxp.api.entity.auth.AuthAdmin"> <insert id="insertAuthAdmin" keyProperty="id" parameterType="com.glxp.api.entity.auth.AuthAdmin">
INSERT INTO auth_user( userName, passWord, lastLoginIp, lastLoginTime, createTime, userFlag INSERT INTO auth_user( id, userName, passWord, lastLoginIp, lastLoginTime, createTime, userFlag
, employeeName, CustomerId, lastModifyTime, locDeptCode, locInvCode, comments) , employeeName, CustomerId, lastModifyTime, locDeptCode, locInvCode, comments)
values values
(#{userName}, (#{id}, #{userName},
<choose> <choose>
<when test="passWord != null"> <when test="passWord != null">
#{passWord}, #{passWord},
@ -118,9 +118,10 @@
<insert id="replaceAuthAdmin" keyProperty="id" parameterType="com.glxp.api.entity.auth.AuthAdmin"> <insert id="replaceAuthAdmin" keyProperty="id" parameterType="com.glxp.api.entity.auth.AuthAdmin">
replace replace
INTO auth_user(id, userName, passWord, lastLoginIp, INTO auth_user(id, userName, passWord, lastLoginIp,
lastLoginTime, createTime, userFlag, lastModifyTime, employeeName, CustomerId, locDeptCode, lastLoginTime, createTime, userFlag, lastModifyTime, employeeName, CustomerId,
locInvCode, comments) locDeptCode,
locInvCode, comments)
values (#{id}, values (#{id},
#{userName}, #{userName},
#{passWord}, #{passWord},
@ -189,7 +190,7 @@
<select id="selectNotSelectUser" resultType="com.glxp.api.entity.auth.AuthAdmin"> <select id="selectNotSelectUser" resultType="com.glxp.api.entity.auth.AuthAdmin">
select * select *
from auth_user from auth_user
left join auth_dept_user on auth_user.id = auth_dept_user.userId left join auth_dept_user on auth_user.id = auth_dept_user.userId
<where> <where>
userFlag != 0 userFlag != 0
<if test="deptId != null and '' != deptId"> <if test="deptId != null and '' != deptId">
@ -210,8 +211,8 @@
resultType="com.glxp.api.entity.auth.AuthAdmin"> resultType="com.glxp.api.entity.auth.AuthAdmin">
select u.* select u.*
from auth_user u from auth_user u
left join auth_user_role sur on u.id = sur.user_id left join auth_user_role sur on u.id = sur.user_id
left join auth_role r on r.role_id = sur.role_id left join auth_role r on r.role_id = sur.role_id
<where> <where>
<if test="roleId != null and '' != roleId"> <if test="roleId != null and '' != roleId">
AND r.role_id = #{roleId} AND r.role_id = #{roleId}
@ -224,8 +225,8 @@
resultType="com.glxp.api.entity.auth.AuthAdmin"> resultType="com.glxp.api.entity.auth.AuthAdmin">
select u.* select u.*
from auth_user u from auth_user u
left join auth_user_role sur on u.id = sur.user_id left join auth_user_role sur on u.id = sur.user_id
left join auth_role r on r.role_id = sur.role_id left join auth_role r on r.role_id = sur.role_id
<where> <where>
<if test="ids != null and ids.size() != 0"> <if test="ids != null and ids.size() != 0">
u.id not in u.id not in

@ -2,10 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.dao.auth.DeptDao"> <mapper namespace="com.glxp.api.dao.auth.DeptDao">
<select id="filterInvWarehouse" parameterType="com.glxp.api.req.auth.FilterInvWarehouseRequest" <select id="filterInvWarehouse" parameterType="com.glxp.api.req.auth.FilterInvWarehouseRequest"
resultType="com.glxp.api.entity.auth.DeptEntity"> resultType="com.glxp.api.entity.auth.DeptEntity">
select * ,(select name from auth_dept WHERE a.pcode = code) pName select *, (select name from auth_dept WHERE a.pcode = code) pName
FROM auth_dept a FROM auth_dept a
<where> <where>
<if test="id != '' and id != null"> <if test="id != '' and id != null">
@ -18,7 +17,7 @@
AND a.code = #{code} AND a.code = #{code}
</if> </if>
<if test="name != '' and name != null"> <if test="name != '' and name != null">
AND a.name like concat('%',#{name},'%') AND a.name like concat('%', #{name}, '%')
</if> </if>
<if test="advanceType != null"> <if test="advanceType != null">
AND a.advanceType = #{advanceType} AND a.advanceType = #{advanceType}
@ -38,15 +37,14 @@
<if test="spUse != null"> <if test="spUse != null">
AND a.spUse = #{spUse} AND a.spUse = #{spUse}
</if> </if>
</where> </where>
</select> </select>
<select id="filterAllByUser" parameterType="com.glxp.api.req.auth.FilterInvWarehouseRequest" <select id="filterAllByUser" parameterType="com.glxp.api.req.auth.FilterInvWarehouseRequest"
resultType="com.glxp.api.entity.auth.DeptEntity"> resultType="com.glxp.api.entity.auth.DeptEntity">
select auth_dept.* from auth_dept INNER JOIN auth_warehouse select auth_dept.* from auth_dept
on auth_dept.`code` =auth_warehouse.parentId INNER JOIN auth_warehouse
on auth_dept.`code` = auth_warehouse.parentId
<if test="CustomerId != '' and CustomerId != null"> <if test="CustomerId != '' and CustomerId != null">
INNER JOIN auth_warehouse_user on auth_warehouse_user.`code` = auth_warehouse.code INNER JOIN auth_warehouse_user on auth_warehouse_user.`code` = auth_warehouse.code
</if> </if>
@ -63,7 +61,7 @@
<if test="name != '' and name != null"> <if test="name != '' and name != null">
AND name = #{name} AND name = #{name}
</if> </if>
<if test=" advanceType != null"> <if test="advanceType != null">
AND advanceType = #{advanceType} AND advanceType = #{advanceType}
</if> </if>
<if test="isDefault != null"> <if test="isDefault != null">
@ -84,7 +82,6 @@
</if> </if>
</where> </where>
group by auth_dept.code group by auth_dept.code
</select> </select>
@ -93,7 +90,6 @@
SELECT * SELECT *
FROM auth_dept FROM auth_dept
WHERE id = #{id} WHERE id = #{id}
</select> </select>
<select id="selectByIdCode" <select id="selectByIdCode"
@ -108,12 +104,12 @@
</foreach> </foreach>
</if> </if>
</where> </where>
</select> </select>
<select id="selectMaxCode" parameterType="com.glxp.api.req.auth.FilterInvWarehouseRequest" <select id="selectMaxCode" parameterType="com.glxp.api.req.auth.FilterInvWarehouseRequest"
resultType="com.glxp.api.entity.auth.DeptEntity"> resultType="com.glxp.api.entity.auth.DeptEntity">
select max(code) as code from auth_dept select max(code) as code
from auth_dept
<where> <where>
<if test="id != '' and id != null"> <if test="id != '' and id != null">
AND id = #{id} AND id = #{id}
@ -127,7 +123,7 @@
<if test="name != '' and name != null"> <if test="name != '' and name != null">
AND name = #{name} AND name = #{name}
</if> </if>
<if test=" advanceType != null"> <if test="advanceType != null">
AND advanceType = #{advanceType} AND advanceType = #{advanceType}
</if> </if>
<if test="isDefault != null"> <if test="isDefault != null">
@ -140,13 +136,13 @@
AND `level` = #{level} AND `level` = #{level}
</if> </if>
</where> </where>
</select> </select>
<select id="filterGroupInvWarehouse" parameterType="com.glxp.api.req.auth.FilterInvWarehouseRequest" <select id="filterGroupInvWarehouse" parameterType="com.glxp.api.req.auth.FilterInvWarehouseRequest"
resultType="com.glxp.api.entity.auth.DeptEntity"> resultType="com.glxp.api.entity.auth.DeptEntity">
SELECT * FROM auth_dept SELECT *
FROM auth_dept
<where> <where>
<if test="id != '' and id != null"> <if test="id != '' and id != null">
AND id = #{id} AND id = #{id}
@ -175,14 +171,17 @@
<if test="spUse != null"> <if test="spUse != null">
AND spUse = #{spUse} AND spUse = #{spUse}
</if> </if>
<if test="updateTime!=null and updateTime!=''"> <if test="updateTime != null and updateTime != ''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S') ]]> <![CDATA[
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if> </if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''"> <if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]> <![CDATA[
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if> </if>
</where> </where>
</select> </select>
<select id="getNameByCode" resultType="java.lang.String"> <select id="getNameByCode" resultType="java.lang.String">
select name select name
@ -197,27 +196,25 @@
<insert id="insertInvWarehouse" keyProperty="id" <insert id="insertInvWarehouse" keyProperty="id"
parameterType="com.glxp.api.entity.auth.DeptEntity"> parameterType="com.glxp.api.entity.auth.DeptEntity">
replace replace
INTO auth_dept INTO auth_dept
(pid, code, `name`, advanceType, isDefault, (id, pid, code, `name`, advanceType, isDefault,
status, updateTime, remark,`level`,pcode,spUse, thirdId, thirdId1, thirdId2, thirdId3, thirdId4) status, updateTime, remark, `level`, pcode, spUse, thirdId, thirdId1, thirdId2, thirdId3, thirdId4)
values ( values (#{id}, #{pid},
#{pid}, #{code},
#{code}, #{name},
#{name}, #{advanceType},
#{advanceType}, #{isDefault},
#{isDefault}, #{status},
#{status}, #{updateTime},
#{updateTime}, #{remark},
#{remark}, #{level},
#{level}, #{pcode},
#{pcode}, #{spUse},
#{spUse}, #{thirdId},
#{thirdId}, #{thirdId1},
#{thirdId1}, #{thirdId2},
#{thirdId2}, #{thirdId3},
#{thirdId3}, #{thirdId4})
#{thirdId4}
)
</insert> </insert>
@ -227,58 +224,87 @@
WHERE id = #{id} WHERE id = #{id}
</delete> </delete>
<select id="getDeptById" resultType="com.glxp.api.entity.auth.DeptEntity" > <select id="getDeptById" resultType="com.glxp.api.entity.auth.DeptEntity">
select * select *
from auth_dept from auth_dept
where id in where id in
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")"> <foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</select> </select>
<update id="updateInvWarehouse" parameterType="com.glxp.api.entity.auth.DeptEntity"> <update id="updateInvWarehouse" parameterType="com.glxp.api.entity.auth.DeptEntity">
UPDATE auth_dept UPDATE auth_dept
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="pid != null">pid=#{pid},</if> <if test="pid != null">
<if test="name != null">name=#{name},</if> pid=#{pid},
<if test="code != null">code=#{code},</if> </if>
<if test="advanceType != null">advanceType=#{advanceType},</if> <if test="name != null">
<if test="isDefault != null">isDefault=#{isDefault},</if> name=#{name},
<if test="status != null">status=#{status},</if> </if>
<if test="updateTime != null">updateTime=#{updateTime},</if> <if test="code != null">
<if test="remark != null">remark=#{remark},</if> code=#{code},
<if test="level != null">level=#{level},</if> </if>
<if test="pcode != null">pcode=#{pcode},</if> <if test="advanceType != null">
<if test="thirdId != null">remark=#{thirdId},</if> advanceType=#{advanceType},
<if test="thirdId1 != null">remark=#{thirdId1},</if> </if>
<if test="thirdId2 != null">remark=#{thirdId2},</if> <if test="isDefault != null">
<if test="thirdId3 != null">remark=#{thirdId3},</if> isDefault=#{isDefault},
<if test="thirdId4 != null">remark=#{thirdId4},</if> </if>
<if test="spUse != null">spUse=#{spUse},</if> <if test="status != null">
status=#{status},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="remark != null">
remark=#{remark},
</if>
<if test="level != null">
level=#{level},
</if>
<if test="pcode != null">
pcode=#{pcode},
</if>
<if test="thirdId != null">
remark=#{thirdId},
</if>
<if test="thirdId1 != null">
remark=#{thirdId1},
</if>
<if test="thirdId2 != null">
remark=#{thirdId2},
</if>
<if test="thirdId3 != null">
remark=#{thirdId3},
</if>
<if test="thirdId4 != null">
remark=#{thirdId4},
</if>
<if test="spUse != null">
spUse=#{spUse},
</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<insert id="importInvWarehouse" parameterType="java.util.List"> <insert id="importInvWarehouse" parameterType="java.util.List">
replace into auth_dept (id, pid, code, `name`, advanceType, isDefault, status, replace into auth_dept (id, pid, code, `name`, advanceType, isDefault, status,
updateTime, remark, `level`, pcode, thirdId, thirdId1, thirdId2, thirdId3, updateTime, remark, `level`, pcode, thirdId, thirdId1, thirdId2, thirdId3,
thirdId4,spUse) values thirdId4, spUse) values
<foreach collection="invWarehouseEntities" item="item" index="index" separator=","> <foreach collection="invWarehouseEntities" item="item" index="index" separator=",">
(#{item.id}, (#{item.id},
#{item.pid}, #{item.pid},
#{item.code}, #{item.code},
#{item.name}, #{item.name},
#{item.advanceType}, #{item.advanceType},
#{item.isDefault}, #{item.isDefault},
#{item.status}, #{item.status},
#{item.updateTime}, #{item.updateTime},
#{item.remark}, #{item.level}, #{item.remark}, #{item.level},
#{item.pcode}, #{item.thirdId}, #{item.pcode}, #{item.thirdId},
#{item.thirdId1}, #{item.thirdId2}, #{item.thirdId1}, #{item.thirdId2},
#{item.thirdId3}, #{item.thirdId4},#{item.spUse}) #{item.thirdId3}, #{item.thirdId4}, #{item.spUse})
</foreach> </foreach>
</insert> </insert>
@ -308,28 +334,42 @@
</select> </select>
<select id="selectNameByCode" resultType="java.lang.String"> <select id="selectNameByCode" resultType="java.lang.String">
select name from auth_dept where code = #{code} select name
from auth_dept
where code = #{code}
</select> </select>
<select id="selectByPcode" resultType="com.glxp.api.entity.auth.DeptEntity"> <select id="selectByPcode" resultType="com.glxp.api.entity.auth.DeptEntity">
select * from auth_dept where pcode = #{pcode} select *
from auth_dept
where pcode = #{pcode}
</select> </select>
<select id="selectupDeptAll" parameterType="java.lang.String" resultType="com.glxp.api.entity.auth.DeptEntity"> <select id="selectupDeptAll" parameterType="java.lang.String" resultType="com.glxp.api.entity.auth.DeptEntity">
with recursive table_a as ( with recursive table_a as (
select * from auth_dept ta where code = #{pcode} select *
union all from auth_dept ta
select tb.* from auth_dept tb inner join table_a on table_a.pcode = tb.code where code = #{pcode}
) union all
select * from table_a select tb.*
from auth_dept tb
inner join table_a on table_a.pcode = tb.code
)
select *
from table_a
</select> </select>
<select id="selectLowDeptAll" parameterType="java.lang.String" resultType="com.glxp.api.entity.auth.DeptEntity"> <select id="selectLowDeptAll" parameterType="java.lang.String" resultType="com.glxp.api.entity.auth.DeptEntity">
with recursive table_a as ( with recursive table_a as (
select * from auth_dept ta where pcode = #{pcode} select *
union all from auth_dept ta
select tb.* from auth_dept tb inner join table_a on table_a.code = tb.pcode where pcode = #{pcode}
) union all
select * from table_a select tb.*
from auth_dept tb
inner join table_a on table_a.code = tb.pcode
)
select *
from table_a
</select> </select>
</mapper> </mapper>

@ -79,7 +79,7 @@
<delete id="deleteByUser" parameterType="java.lang.Long"> <delete id="deleteByUser" parameterType="java.lang.Long">
delete delete
from auth_dept_user from auth_dept_user
where userId = #{userId} where userId = #{userId} and deptId != 1
</delete> </delete>
<delete id="deleteByDept" parameterType="java.lang.Long"> <delete id="deleteByDept" parameterType="java.lang.Long">
delete delete

@ -2,7 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.dao.auth.InvBusUserDao"> <mapper namespace="com.glxp.api.dao.auth.InvBusUserDao">
<select id="filterInvBusUser" parameterType="com.glxp.api.req.auth.FilterInvBusUserRequest" <select id="filterInvBusUser" parameterType="com.glxp.api.req.auth.FilterInvBusUserRequest"
resultType="com.glxp.api.entity.auth.InvBusUserEntity"> resultType="com.glxp.api.entity.auth.InvBusUserEntity">
select * select *
@ -17,46 +16,43 @@
<if test="scAction != '' and scAction != null"> <if test="scAction != '' and scAction != null">
AND scAction = #{scAction} AND scAction = #{scAction}
</if> </if>
<if test="selectedCodes != null and selectedCodes.size()!=0"> <if test="selectedCodes != null and selectedCodes.size() != 0">
and scAction not in and scAction not in
<foreach collection="selectedCodes" item="item" open="(" separator="," close=")"> <foreach collection="selectedCodes" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
</where> </where>
</select> </select>
<select id="filterUnSelect" parameterType="com.glxp.api.req.auth.FilterInvBusUserRequest" <select id="filterUnSelect" parameterType="com.glxp.api.req.auth.FilterInvBusUserRequest"
resultType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity"> resultType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity">
select auth_warehouse_bustype.id, select auth_warehouse_bustype.id,
auth_warehouse_bustype.code, auth_warehouse_bustype.code,
auth_warehouse_bustype.action, auth_warehouse_bustype.action,
basic_bussiness_type.name basic_bussiness_type.name
from auth_warehouse_bustype from auth_warehouse_bustype
inner join basic_bussiness_type on auth_warehouse_bustype.action = basic_bussiness_type.action inner join basic_bussiness_type on auth_warehouse_bustype.action = basic_bussiness_type.action
<where> <where>
<if test="subInvCode != '' and subInvCode != null"> <if test="subInvCode != '' and subInvCode != null">
AND code = #{subInvCode} AND code = #{subInvCode}
</if> </if>
<if test="selectedCodes != null and selectedCodes.size()!=0"> <if test="selectedCodes != null and selectedCodes.size() != 0">
and auth_warehouse_bustype.action not in and auth_warehouse_bustype.action not in
<foreach collection="selectedCodes" item="item" open="(" separator="," close=")"> <foreach collection="selectedCodes" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
</where> </where>
</select> </select>
<select id="filterJoinInvBusUser" parameterType="com.glxp.api.req.auth.FilterInvBusUserRequest" <select id="filterJoinInvBusUser" parameterType="com.glxp.api.req.auth.FilterInvBusUserRequest"
resultType="com.glxp.api.res.auth.InvBusUserResponse"> resultType="com.glxp.api.res.auth.InvBusUserResponse">
select auth_user_bustype.*,basic_bussiness_type.name billTypeName select auth_user_bustype.*, basic_bussiness_type.name billTypeName
FROM auth_user_bustype left join basic_bussiness_type on auth_user_bustype.scAction = basic_bussiness_type.action FROM auth_user_bustype
left join basic_bussiness_type on auth_user_bustype.scAction = basic_bussiness_type.action
<where> <where>
<if test="userId != '' and userId != null"> <if test="userId != '' and userId != null">
AND userId = #{userId} AND userId = #{userId}
@ -67,24 +63,20 @@
<if test="scAction != '' and scAction != null"> <if test="scAction != '' and scAction != null">
AND scAction = #{scAction} AND scAction = #{scAction}
</if> </if>
</where> </where>
group by auth_user_bustype.id group by auth_user_bustype.id
</select> </select>
<insert id="insertInvBusUser" keyProperty="id" <insert id="insertInvBusUser"
parameterType="com.glxp.api.entity.auth.InvBusUserEntity"> parameterType="com.glxp.api.entity.auth.InvBusUserEntity">
replace replace
INTO auth_user_bustype INTO auth_user_bustype
(userId, `subInvCode`, scAction, remark) (userId, `subInvCode`, scAction, remark)
values ( values (#{userId},
#{userId}, #{subInvCode},
#{subInvCode}, #{scAction},
#{scAction}, #{remark})
#{remark}
)
</insert> </insert>
@ -103,27 +95,34 @@
<delete id="deleteByscAction" parameterType="Map"> <delete id="deleteByscAction" parameterType="Map">
DELETE DELETE
FROM auth_user_bustype FROM auth_user_bustype
<where> <where>
<if test="subInvCode != '' and subInvCode != null"> <if test="subInvCode != '' and subInvCode != null">
AND subInvCode = #{subInvCode} AND subInvCode = #{subInvCode}
</if> </if>
<if test="selectedCodes != null and selectedCodes.size()!=0"> <if test="selectedCodes != null and selectedCodes.size() != 0">
and scAction in and scAction in
<foreach collection="selectedCodes" item="item" open="(" separator="," close=")"> <foreach collection="selectedCodes" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
</where> </where>
</delete> </delete>
<update id="updateInvBusUser" parameterType="com.glxp.api.entity.auth.InvBusUserEntity"> <update id="updateInvBusUser" parameterType="com.glxp.api.entity.auth.InvBusUserEntity">
UPDATE auth_user_bustype UPDATE auth_user_bustype
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="userId != null">userId=#{userId},</if> <if test="userId != null">
<if test="subInvCode != null">subInvCode=#{subInvCode},</if> userId=#{userId},
<if test="scAction != null">scAction=#{scAction},</if> </if>
<if test="remark != null">remark=#{remark},</if> <if test="subInvCode != null">
subInvCode=#{subInvCode},
</if>
<if test="scAction != null">
scAction=#{scAction},
</if>
<if test="remark != null">
remark=#{remark},
</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
</mapper> </mapper>

@ -135,15 +135,6 @@
#{item.id,jdbcType=INTEGER} #{item.id,jdbcType=INTEGER}
</foreach> </foreach>
</update> </update>
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into auth_warehouse_bustype
(code, `action`, `name`)
values
<foreach collection="list" item="item" separator=",">
(#{item.code,jdbcType=VARCHAR}, #{item.action,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR})
</foreach>
</insert>
<select id="selectListByCode" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectListByCode" parameterType="java.lang.String" resultMap="BaseResultMap">
select auth_warehouse_bustype.id, select auth_warehouse_bustype.id,

@ -244,7 +244,7 @@
WHERE (name = #{name}) limit 1 WHERE (name = #{name}) limit 1
</select> </select>
<insert id="importBasicUnitMaintain" keyProperty="id"> <insert id="importBasicUnitMaintain" >
REPLACE REPLACE
INTO basic_corp INTO basic_corp
( thirdId, erpId, `name`, spell, ( thirdId, erpId, `name`, spell,

@ -13,7 +13,7 @@
<if test="id != '' and id != null"> <if test="id != '' and id != null">
AND id = #{id} AND id = #{id}
</if> </if>
<if test="status != '' and status != null"> <if test=" status != null">
AND status = #{status} AND status = #{status}
</if> </if>
</where> </where>
@ -50,4 +50,4 @@
WHERE genKey = #{genKey} WHERE genKey = #{genKey}
</update> </update>
</mapper> </mapper>

@ -2,12 +2,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.dao.basic.BasicUnitMaintainDao"> <mapper namespace="com.glxp.api.dao.basic.BasicUnitMaintainDao">
<select id="filterList" parameterType="com.glxp.api.req.basic.BasicUnitMaintainFilterRequest" <select id="filterList" parameterType="com.glxp.api.req.basic.BasicUnitMaintainFilterRequest"
resultType="com.glxp.api.entity.basic.BasicUnitMaintainEntity"> resultType="com.glxp.api.entity.basic.BasicUnitMaintainEntity">
SELECT * FROM basic_corp SELECT * FROM basic_corp
<where> <where>
<if test="key != '' and key!=null"> <if test="key != '' and key != null">
and and
( name like concat('%',#{key},'%') ( name like concat('%',#{key},'%')
or spell like concat('%',#{key},'%') or spell like concat('%',#{key},'%')
@ -36,13 +35,11 @@
<if test="outType != null"> <if test="outType != null">
AND ( outType <![CDATA[ <> ]]> #{outType} or outType is NULL) AND ( outType <![CDATA[ <> ]]> #{outType} or outType is NULL)
</if> </if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''"> <if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]> <![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
</if> </if>
</where> </where>
order by updateTime desc order by updateTime desc
</select> </select>
<select id="selectByThirdId" parameterType="com.glxp.api.req.basic.BasicUnitMaintainFilterRequest" <select id="selectByThirdId" parameterType="com.glxp.api.req.basic.BasicUnitMaintainFilterRequest"
@ -79,7 +76,7 @@
addr,status,`type`,creditNo,contact,mobile,thirdId1,thirdId2,thirdId3,thirdId4, addr,status,`type`,creditNo,contact,mobile,thirdId1,thirdId2,thirdId3,thirdId4,
thirdName,thirdName1,thirdName2,thirdName3,thirdName4,updateTime,corpType,outType) thirdName,thirdName1,thirdName2,thirdName3,thirdName4,updateTime,corpType,outType)
values values
( (
#{thirdId}, #{thirdId},
#{erpId}, #{erpId},
#{name}, #{name},
@ -115,7 +112,7 @@
addr,status,`type`,creditNo,contact,mobile,thirdId1,thirdId2,thirdId3,thirdId4, addr,status,`type`,creditNo,contact,mobile,thirdId1,thirdId2,thirdId3,thirdId4,
thirdName,thirdName1,thirdName2,thirdName3,thirdName4,updateTime,corpType,outType) thirdName,thirdName1,thirdName2,thirdName3,thirdName4,updateTime,corpType,outType)
values values
( (
#{thirdId}, #{thirdId},
#{erpId}, #{erpId},
#{name}, #{name},
@ -144,54 +141,108 @@
<insert id="insert" parameterType="com.glxp.api.entity.basic.BasicUnitMaintainEntity"> <insert id="insert" parameterType="com.glxp.api.entity.basic.BasicUnitMaintainEntity">
insert INTO basic_corp(thirdId, erpId, `name`, spell, addr, insert INTO basic_corp(thirdId, erpId, `name`, spell, addr,
status, `type`, creditNo, contact, mobile, thirdId1, thirdId2, thirdId3, thirdId4, status, `type`, creditNo, contact, mobile, thirdId1, thirdId2, thirdId3, thirdId4,
thirdName, thirdName1, thirdName2, thirdName3, thirdName4, updateTime, corpType, outType) thirdName, thirdName1, thirdName2, thirdName3, thirdName4, updateTime, corpType, outType)
values (#{thirdId}, values (#{thirdId},
#{erpId}, #{erpId},
#{name}, #{name},
#{spell}, #{spell},
#{addr}, #{addr},
#{status}, #{status},
#{type}, #{type},
#{creditNo}, #{creditNo},
#{contact}, #{contact},
#{mobile}, #{mobile},
#{thirdId1}, #{thirdId2}, #{thirdId3}, #{thirdId4}, #{thirdId1}, #{thirdId2}, #{thirdId3}, #{thirdId4},
#{thirdName}, #{thirdName1}, #{thirdName2}, #{thirdName3}, #{thirdName4}, #{updateTime}, #{corpType}, #{thirdName}, #{thirdName1}, #{thirdName2}, #{thirdName3}, #{thirdName4}, #{updateTime}, #{corpType},
#{outType}) #{outType})
</insert> </insert>
<update id="updateById" parameterType="com.glxp.api.entity.basic.BasicUnitMaintainEntity"> <update id="updateById" parameterType="com.glxp.api.entity.basic.BasicUnitMaintainEntity">
UPDATE basic_corp UPDATE basic_corp
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="thirdId != null">thirdId=#{thirdId},</if> <if test="thirdId != null">
<if test="thirdId == ''">thirdId=null,</if> thirdId=#{thirdId},
<if test="erpId != null">erpId=#{erpId},</if> </if>
<if test="name != null">`name`=#{name},</if> <if test="thirdId == ''">
<if test="spell != null">spell=#{spell},</if> thirdId=null,
<if test="addr != null">addr=#{addr},</if> </if>
<if test="status != null">status=#{status},</if> <if test="erpId != null">
<if test="type != null">`type`=#{type},</if> erpId=#{erpId},
<if test="creditNo != null">creditNo=#{creditNo},</if> </if>
<if test="contact != null">contact=#{contact},</if> <if test="name != null">
<if test="mobile != null">mobile=#{mobile},</if> `name`=#{name},
<if test="thirdId1 != null">thirdId1=#{thirdId1},</if> </if>
<if test="thirdId2 != null">thirdId2=#{thirdId2},</if> <if test="spell != null">
<if test="thirdId3 != null">thirdId3=#{thirdId3},</if> spell=#{spell},
<if test="thirdId4 != null">thirdId4=#{thirdId4},</if> </if>
<if test="thirdId1 == ''">thirdId1=null,</if> <if test="addr != null">
<if test="thirdId2 == ''">thirdId2=null,</if> addr=#{addr},
<if test="thirdId3 == ''">thirdId3=null,</if> </if>
<if test="thirdId4 == ''">thirdId4=null,</if> <if test="status != null">
<if test="thirdName != null">thirdName=#{thirdName},</if> status=#{status},
<if test="thirdName1 != null">thirdName1=#{thirdName1},</if> </if>
<if test="thirdName2 != null">thirdName2=#{thirdName2},</if> <if test="type != null">
<if test="thirdName3 != null">thirdName3=#{thirdName3},</if> `type`=#{type},
<if test="thirdName4 != null">thirdName4=#{thirdName4},</if> </if>
<if test="updateTime != null">updateTime=#{updateTime},</if> <if test="creditNo != null">
<if test="corpType != null">corpType=#{corpType},</if> creditNo=#{creditNo},
<if test="outType != null">outType=#{outType},</if> </if>
<if test="contact != null">
contact=#{contact},
</if>
<if test="mobile != null">
mobile=#{mobile},
</if>
<if test="thirdId1 != null">
thirdId1=#{thirdId1},
</if>
<if test="thirdId2 != null">
thirdId2=#{thirdId2},
</if>
<if test="thirdId3 != null">
thirdId3=#{thirdId3},
</if>
<if test="thirdId4 != null">
thirdId4=#{thirdId4},
</if>
<if test="thirdId1 == ''">
thirdId1=null,
</if>
<if test="thirdId2 == ''">
thirdId2=null,
</if>
<if test="thirdId3 == ''">
thirdId3=null,
</if>
<if test="thirdId4 == ''">
thirdId4=null,
</if>
<if test="thirdName != null">
thirdName=#{thirdName},
</if>
<if test="thirdName1 != null">
thirdName1=#{thirdName1},
</if>
<if test="thirdName2 != null">
thirdName2=#{thirdName2},
</if>
<if test="thirdName3 != null">
thirdName3=#{thirdName3},
</if>
<if test="thirdName4 != null">
thirdName4=#{thirdName4},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="corpType != null">
corpType=#{corpType},
</if>
<if test="outType != null">
outType=#{outType},
</if>
</trim> </trim>
WHERE id=#{id} WHERE id=#{id}
</update> </update>
@ -234,12 +285,12 @@
</select> </select>
<insert id="importBasicUnitMaintain" keyProperty="id"> <insert id="importBasicUnitMaintain">
replace replace
INTO basic_corp INTO basic_corp
( thirdId, erpId, `name`, spell, ( thirdId, erpId, `name`, spell,
addr, status, `type`, creditNo, contact, mobile, thirdId1, thirdId2, thirdId3, thirdId4, addr, status, `type`, creditNo, contact, mobile, thirdId1, thirdId2, thirdId3, thirdId4,
thirdName, thirdName1, thirdName2, thirdName3, thirdName4, updateTime, corpType,outType) thirdName, thirdName1, thirdName2, thirdName3, thirdName4, updateTime, corpType,outType)
values ( values (
#{thirdId}, #{thirdId},
#{erpId}, #{erpId},

@ -26,14 +26,14 @@
auth_warehouse.name invName, auth_warehouse.name invName,
ip.deptCode, ip.deptCode,
ip.invCode, ip.invCode,
as.name spaceName s.name spaceName
from inv_product ip from inv_product ip
inner join basic_udirel on ip.relIdFk = basic_udirel.id inner join basic_udirel on ip.relIdFk = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid inner join basic_products bp on basic_udirel.uuid = bp.uuid
left join basic_corp on ip.supId = basic_corp.erpId left join basic_corp on ip.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ip.deptCode left join auth_dept on auth_dept.code = ip.deptCode
left join auth_warehouse on auth_warehouse.code = ip.invCode left join auth_warehouse on auth_warehouse.code = ip.invCode
left join auth_space `as` on ip.invSpaceCode = `as`.code left join auth_space s on ip.invSpaceCode = s.code
<where> <where>
bp.diType = 1 bp.diType = 1
<if test="cpmctymc != null and cpmctymc != ''"> <if test="cpmctymc != null and cpmctymc != ''">
@ -85,7 +85,7 @@
</foreach> </foreach>
</if> </if>
</where> </where>
GROUP BY ip.relIdFk, ip.batchNo GROUP BY ip.relIdFk, ip.batchNo, ip.supId
order by ip.updateTime desc order by ip.updateTime desc
</select> </select>

@ -7,6 +7,8 @@
(select `name` from sup_cert s where s.code = m.code and s.CustomerId = m.idFk) certName (select `name` from sup_cert s where s.code = m.code and s.CustomerId = m.idFk) certName
from sup_cert_remind_msg m from sup_cert_remind_msg m
left join sup_company c on m.idFk = c.customerId left join sup_company c on m.idFk = c.customerId
left join sup_cert bc on bc.code = m.code
<where> <where>
<if test="supId != null and supId != ''"> <if test="supId != null and supId != ''">
AND m.idFk = #{supId} AND m.idFk = #{supId}
@ -23,6 +25,10 @@
<if test="type != null"> <if test="type != null">
AND m.type = #{type} AND m.type = #{type}
</if> </if>
<if test="certName != null and certName != ''">
AND bc.name like concat('%', #{certName}, '%')
</if>
</where> </where>
order by m.updateTime desc order by m.updateTime desc
</select> </select>
@ -33,6 +39,7 @@
(select `name` from sup_cert s where s.code = m.code and s.manufacturerIdFk = m.idFk) certName (select `name` from sup_cert s where s.code = m.code and s.manufacturerIdFk = m.idFk) certName
from sup_cert_remind_msg m from sup_cert_remind_msg m
left join sup_manufacturer c on m.idFk = c.customerId left join sup_manufacturer c on m.idFk = c.customerId
left join sup_cert bc on bc.code = m.code
<where> <where>
<if test="supId != null and supId != ''"> <if test="supId != null and supId != ''">
AND c.customerId = #{supId} AND c.customerId = #{supId}
@ -49,6 +56,10 @@
<if test="type != null"> <if test="type != null">
AND m.type = #{type} AND m.type = #{type}
</if> </if>
<if test="certName != null and certName != ''">
AND bc.name like concat('%', #{certName}, '%')
</if>
</where> </where>
order by m.updateTime desc order by m.updateTime desc
</select> </select>
@ -59,6 +70,8 @@
(select `name` from sup_cert s where s.code = m.code and s.productIdFk = m.idFk) certName (select `name` from sup_cert s where s.code = m.code and s.productIdFk = m.idFk) certName
from sup_cert_remind_msg m from sup_cert_remind_msg m
left join sup_product c on m.idFk = c.productId left join sup_product c on m.idFk = c.productId
left join sup_cert bc on bc.code = m.code
<where> <where>
<if test="supId != null and supId != ''"> <if test="supId != null and supId != ''">
AND c.customerId = #{supId} AND c.customerId = #{supId}
@ -75,7 +88,10 @@
<if test="type != null"> <if test="type != null">
AND m.type = #{type} AND m.type = #{type}
</if> </if>
<if test="certName != null and certName != ''">
AND bc.name like concat('%', #{certName}, '%')
</if>
</where> </where>
order by m.updateTime desc order by m.updateTime desc
</select> </select>
</mapper> </mapper>

@ -43,7 +43,7 @@
WHERE paramKey = #{paramKey} WHERE paramKey = #{paramKey}
</select> </select>
<update id="updateById" parameterType="com.glxp.api.entity.system.SystemParamConfigEntity"> <update id="updateEntityById" parameterType="com.glxp.api.entity.system.SystemParamConfigEntity">
UPDATE sys_param_config UPDATE sys_param_config
<set> <set>
<if test="paramName != null">paramName=#{paramName},</if> <if test="paramName != null">paramName=#{paramName},</if>

@ -37,14 +37,7 @@
WHERE id = #{id} WHERE id = #{id}
</select> </select>
<select id="selectById" parameterType="java.lang.String" <update id="updateEntity" parameterType="com.glxp.api.req.system.SysPdfTemplateSaveRequest">
resultType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
select *
FROM sys_pdf_template
WHERE id = #{id}
</select>
<update id="updateById" parameterType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
UPDATE sys_pdf_template UPDATE sys_pdf_template
<set> <set>
<if test="name != null"> <if test="name != null">
@ -117,65 +110,4 @@
from sys_pdf_template from sys_pdf_template
where id = #{id} where id = #{id}
</delete> </delete>
</mapper>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.system.SystemPDFTemplateEntity" useGeneratedKeys="true">
insert into sys_pdf_template
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
`name`,
`type`,
`module`,
param,
`path`,
`rowCount`,
qrcodeCount,
remark,
create_time,
update_time,
jrxmlPath,
bussinessType,
bussinessStatus,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{name,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER},
#{module,jdbcType=INTEGER},
#{param,jdbcType=VARCHAR},
#{path,jdbcType=VARCHAR},
#{rowCount,jdbcType=INTEGER},
#{qrcodeCount,jdbcType=INTEGER},
#{remark,jdbcType=VARCHAR},
#{create_time,jdbcType=TIMESTAMP},
#{update_time,jdbcType=TIMESTAMP},
#{jrxmlPath,jdbcType=VARCHAR},
#{bussinessType,jdbcType=VARCHAR},
#{bussinessStatus,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
`name` = #{name,jdbcType=VARCHAR},
`type` = #{type,jdbcType=INTEGER},
`module` = #{module,jdbcType=INTEGER},
param = #{param,jdbcType=VARCHAR},
`path` = #{path,jdbcType=VARCHAR},
`rowCount` = #{rowCount,jdbcType=INTEGER},
qrcodeCount = #{qrcodeCount,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{create_time,jdbcType=TIMESTAMP},
update_time = #{update_time,jdbcType=TIMESTAMP},
jrxmlPath = #{jrxmlPath,jdbcType=VARCHAR},
bussinessType = #{bussinessType,jdbcType=VARCHAR},
bussinessStatus = #{bussinessStatus,jdbcType=VARCHAR},
</trim>
</insert>
</mapper>

@ -264,4 +264,4 @@
thirdSysFk = #{thirdSysFk,jdbcType=VARCHAR}, thirdSysFk = #{thirdSysFk,jdbcType=VARCHAR},
</trim> </trim>
</insert> </insert>
</mapper> </mapper>

@ -88,6 +88,9 @@ CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkCertExpire', 'tinyint', 1
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'preInBackAction', 'varchar(255) ', 1); CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'preInBackAction', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'backPreinType', 'tinyint', 1); CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'backPreinType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('io_order', 'checkPreInOrders', 'varchar(255)', 1); CALL Pro_Temp_ColumnWork('io_order', 'checkPreInOrders', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order', 'checkPreInSpaceCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order', 'checkPreInInvCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'sortNum', 'int', 1); CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'sortNum', 'int', 1);
@ -302,9 +305,6 @@ CREATE TABLE IF NOT EXISTS `sync_data_change_bustypes`
ROW_FORMAT = DYNAMIC; ROW_FORMAT = DYNAMIC;
# 修改主键为LONG # 修改主键为LONG
CALL Pro_Temp_ColumnWork('basic_hosp_type', 'id', 'bigint', 2); CALL Pro_Temp_ColumnWork('basic_hosp_type', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('basic_udirel', 'id', 'bigint', 2); CALL Pro_Temp_ColumnWork('basic_udirel', 'id', 'bigint', 2);

Loading…
Cancel
Save