Merge remote-tracking branch 'origin/master'

master
wj 2 years ago
commit f544f22cc9

@ -9,12 +9,16 @@ 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.entity.auth.AuthAdmin; import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.auth.DeptEntity; import com.glxp.api.entity.auth.DeptEntity;
import com.glxp.api.entity.auth.DeptUserEntity;
import com.glxp.api.entity.auth.InvWarehouseEntity;
import com.glxp.api.entity.system.SystemParamConfigEntity; import com.glxp.api.entity.system.SystemParamConfigEntity;
import com.glxp.api.req.auth.FilterDeptUserReqeust;
import com.glxp.api.req.auth.FilterInvWarehouseRequest; import com.glxp.api.req.auth.FilterInvWarehouseRequest;
import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.auth.CustomerService; import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.auth.DeptService; import com.glxp.api.service.auth.DeptService;
import com.glxp.api.service.auth.DeptUserService;
import com.glxp.api.service.auth.InvWarehouseService; import com.glxp.api.service.auth.InvWarehouseService;
import com.glxp.api.service.system.SystemParamConfigService; import com.glxp.api.service.system.SystemParamConfigService;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
@ -226,6 +230,11 @@ public class DeptController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
} }
//判断状态
String msg = isCheckStatus(deptEntity.getStatus(), deptEntity);
if (msg != "") {
return ResultVOUtils.error(999, msg);
}
List<DeptEntity> deptEntityList = deptService.selectByNameList(deptEntity.getName()); List<DeptEntity> deptEntityList = deptService.selectByNameList(deptEntity.getName());
if (deptEntityList != null && deptEntityList.size() > 0) { if (deptEntityList != null && deptEntityList.size() > 0) {
for (DeptEntity obj : deptEntityList) { for (DeptEntity obj : deptEntityList) {
@ -244,6 +253,8 @@ public class DeptController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@Resource
DeptUserService deptUserService;
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/spms/inv/warehouse/delete") @PostMapping("/spms/inv/warehouse/delete")
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) { public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) {
@ -252,18 +263,27 @@ public class DeptController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
} }
//todo 代码未迁移完,后续记得修改 DeptEntity deptEntity = deptService.selectById(deleteRequest.getId());
if (deptEntity.getLevel() != null && deptEntity.getLevel() == 1) {
return ResultVOUtils.error(500, "删除失败,一级部门不允许删除!");
}
List<InvWarehouseEntity> invSubWarehouseEntities = invWarehouseService.findByParentId(deptEntity.getCode());
if (CollUtil.isNotEmpty(invSubWarehouseEntities)) {
return ResultVOUtils.error(500, "删除失败,请先移除该部门关联仓库信息!");
}
FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust();
filterDeptUserReqeust.setDeptId(deptEntity.getId().longValue());
List<DeptUserEntity> deptUserEntities = deptUserService.selectDeptUser(filterDeptUserReqeust);
if (CollUtil.isNotEmpty(deptUserEntities)) {
return ResultVOUtils.error(500, "删除失败,请先移除该部门关联用户信息!");
}
List<DeptEntity> deptEntities = deptService.selectByPcode(deptEntity.getCode());
if (deptEntities.size() > 0) {
return ResultVOUtils.error(500, "删除失败,请先移除该部门下的子部门!");
}
// DeptEntity deptEntity = deptService.selectById(deleteRequest.getId());
// InvProductDetailEntity invProductDetailEntity = invProductDetailService.isExit(deptEntity.getCode());
// if (invProductDetailEntity != null) {
// return ResultVOUtils.error(500, "该仓库已有库存,不能删除!");
// }
//
// List<InvSubWarehouseEntity> invSubWarehouseEntities = invSubWarehouseService.findByParentId(deptEntity.getCode());
// if (CollUtil.isNotEmpty(invSubWarehouseEntities)) {
// return ResultVOUtils.error(500, "删除失败,请先移除该部门关联仓库信息!");
// }
boolean b = deptService.deleteById(deleteRequest.getId()); boolean b = deptService.deleteById(deleteRequest.getId());
if (!b) { if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK); return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
@ -298,4 +318,43 @@ public class DeptController {
return ResultVOUtils.success(byCode); return ResultVOUtils.success(byCode);
} }
@AuthRuleAnnotation("")
@PostMapping("/spms/inv/warehouse/selectInvById")
public BaseResponse selectInvById(@RequestBody List<String> InvList) {
if (InvList.size() == 0) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
//先得到部门编码
List<String> String = deptService.selectByIdCode(InvList);
List<InvWarehouseEntity> list = invWarehouseService.selectInvById(String);
return ResultVOUtils.success(list);
}
public String isCheckStatus(Integer status, DeptEntity deptEntity) {
//启用的时候需要判断上级是不是被禁用
if (status == 1) {
//查询所有的上级
List<DeptEntity> deptEntityList = deptService.selectupDeptAll(deptEntity.getPcode());
for (DeptEntity obj : deptEntityList) {
if (obj.getStatus() == 0) {
return "上级存在禁用的部门修改失败!";
}
}
} else {
List<DeptEntity> deptEntityList = deptService.selectLowDeptAll(deptEntity.getCode());
for (DeptEntity obj : deptEntityList) {
if (obj.getStatus() == 1) {
return "下级存在启用的部门修改失败!";
}
}
}
return "";
}
} }

@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.AuthRuleAnnotation;
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.entity.auth.DeptEntity;
import com.glxp.api.entity.auth.DeptUserEntity; import com.glxp.api.entity.auth.DeptUserEntity;
import com.glxp.api.req.auth.FilterDeptUserReqeust; import com.glxp.api.req.auth.FilterDeptUserReqeust;
import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.PageSimpleResponse;
@ -31,7 +32,14 @@ public class DeptUserController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("udi/auth/dept/user/filter") @GetMapping("udi/auth/dept/user/filter")
public BaseResponse filterList(FilterDeptUserReqeust filterDeptUserReqeust) { public BaseResponse filterList(FilterDeptUserReqeust filterDeptUserReqeust) {
filterDeptUserReqeust.setDeptId(filterDeptUserReqeust.getDeptId()); //获取部门id
Long idByCode = deptService.getIdByCode(filterDeptUserReqeust.getDeptId());
DeptEntity deptEntity = deptService.selectById(idByCode + "");
if (deptEntity.getLevel() == 1) {
filterDeptUserReqeust.setDeptId(null);
} else {
filterDeptUserReqeust.setDeptId(idByCode);
}
List<DeptUserResponse> deptEntityList = deptUserService.selectJoinDeptUser(filterDeptUserReqeust); List<DeptUserResponse> deptEntityList = deptUserService.selectJoinDeptUser(filterDeptUserReqeust);
PageInfo<DeptUserResponse> pageInfo = new PageInfo<>(deptEntityList); PageInfo<DeptUserResponse> pageInfo = new PageInfo<>(deptEntityList);
PageSimpleResponse<DeptUserResponse> deptEntityPageSimpleResponse = new PageSimpleResponse<>(); PageSimpleResponse<DeptUserResponse> deptEntityPageSimpleResponse = new PageSimpleResponse<>();

@ -219,6 +219,7 @@ public class InvWarehouseController extends BaseController {
public BaseResponse save(@RequestBody @Valid InvWarehouseEntity invWarehouseEntity, public BaseResponse save(@RequestBody @Valid InvWarehouseEntity invWarehouseEntity,
BindingResult bindingResult) { BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
} }
@ -245,6 +246,7 @@ public class InvWarehouseController extends BaseController {
updateEntity.setUpdateTime(new Date()); updateEntity.setUpdateTime(new Date());
deptService.updateInvWarehouse(updateEntity); deptService.updateInvWarehouse(updateEntity);
invWarehouseEntity.setId(IdUtil.getSnowflake(6, 1).nextId() + ""); invWarehouseEntity.setId(IdUtil.getSnowflake(6, 1).nextId() + "");
invWarehouseEntity.setUpdateTime(new Date());
boolean b = invWarehouseService.insertInvSubWarehouse(invWarehouseEntity); boolean b = invWarehouseService.insertInvSubWarehouse(invWarehouseEntity);
if (!b) { if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK); return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
@ -264,9 +266,27 @@ public class InvWarehouseController extends BaseController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
} }
Integer userCount = warehouseUserService.countUserBySubInvCode(invWarehouseEntity.getCode());
if (userCount > 0) {
return ResultVOUtils.error(500, "修改失败,请先移除该仓库关联用户!");
}
//更新仓库信息 //更新仓库信息
invWarehouseEntity.setUpdateTime(new Date());
boolean b = invWarehouseService.updateInvSubWarehouse(invWarehouseEntity); boolean b = invWarehouseService.updateInvSubWarehouse(invWarehouseEntity);
//如果要是一级仓库就吧全部子集都刷成一样的寄售仓库
if(StrUtil.isBlank(invWarehouseEntity.getParentCode())){
List<InvWarehouseEntity> invWarehouseEntityList=invWarehouseService.selectLowWarehouseAll(invWarehouseEntity.getCode());
for (InvWarehouseEntity obj : invWarehouseEntityList) {
obj.setAdvanceType(invWarehouseEntity.getAdvanceType());
obj.setUpdateTime(new Date());
invWarehouseService.updateInvSubWarehouse(obj);
}
}
//更新部门信息 //更新部门信息
DeptEntity pEntity = deptService.selectByCode(invWarehouseEntity.getParentId()); DeptEntity pEntity = deptService.selectByCode(invWarehouseEntity.getParentId());
pEntity.setUpdateTime(new Date()); pEntity.setUpdateTime(new Date());
@ -323,6 +343,14 @@ public class InvWarehouseController extends BaseController {
// return ResultVOUtils.error(500, "此分库存在库存,不能删除!"); // return ResultVOUtils.error(500, "此分库存在库存,不能删除!");
// } // }
// //
// 判断此分库中是否还有库存
InvWarehouseEntity byWareId = invWarehouseService.getByWareId(deleteRequest.getId());
List<InvWarehouseEntity> byWarePcode = invWarehouseService.getByWarePcode(byWareId.getCode());
if( byWarePcode.size()>0){
return ResultVOUtils.error(500, "此仓库下存在仓库无法删除!");
}
//判断此分库下是否有货位 //判断此分库下是否有货位
List<InvSpace> spaceList = invSpaceService.findBySubWarehouseCode(invWarehouseEntity.getCode()); List<InvSpace> spaceList = invSpaceService.findBySubWarehouseCode(invWarehouseEntity.getCode());
if (CollUtil.isNotEmpty(spaceList)) { if (CollUtil.isNotEmpty(spaceList)) {
@ -444,8 +472,8 @@ public class InvWarehouseController extends BaseController {
//1.获取所有单据类型 //1.获取所有单据类型
FilterBussinessTypeRequest filterBussinessTypeRequest = new FilterBussinessTypeRequest(); FilterBussinessTypeRequest filterBussinessTypeRequest = new FilterBussinessTypeRequest();
filterBussinessTypeRequest.setEnable(true); filterBussinessTypeRequest.setEnable(true);
if (invWarehouseEntity.getAdvanceType()) { if (invWarehouseEntity.getAdvanceType() == 2) {
filterBussinessTypeRequest.setAdvanceType(true); filterBussinessTypeRequest.setAdvanceType(2);
} }
List<BasicBussinessTypeEntity> basicBussinessTypeEntities = basicBussinessTypeService.findList(filterBussinessTypeRequest); List<BasicBussinessTypeEntity> basicBussinessTypeEntities = basicBussinessTypeService.findList(filterBussinessTypeRequest);
@ -610,4 +638,10 @@ public class InvWarehouseController extends BaseController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@PostMapping("/warehouse/inout/getDeptById")
public BaseResponse getDeptById(@RequestBody List<Integer> deptIds) {
List<DeptEntity> list = deptService.getDeptById(deptIds);
return ResultVOUtils.success(list);
}
} }

@ -64,15 +64,26 @@ 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 = deptUserService.selectByUserId(authAdminResponse.getId()); List<DeptUserResponse> deptUserResponses=null;
if("key".equals(filterAuthUserRequest.getKey())){
deptUserResponses = deptUserService.selectByUserIdKey(authAdminResponse.getId());
}else{
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){
depts.add(deptUserResponse.getDeptId()); depts.add(deptUserResponse.getDeptId());
deptName = deptName + "," + deptUserResponse.getDeptName(); deptName = deptName + "," + deptUserResponse.getDeptName();
} }
}
if(deptName.length()!=0){
authAdminResponse.setDeptName(deptName.substring(1)); authAdminResponse.setDeptName(deptName.substring(1));
}else{
authAdminResponse.setDeptName(deptName);
}
authAdminResponse.setDepts(depts); authAdminResponse.setDepts(depts);
} }
authAdminResponse.setRoles(roles); authAdminResponse.setRoles(roles);

@ -389,4 +389,15 @@ public class BasicBussinessTypeController extends BaseController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@GetMapping("/udiwms/busType/selectList")
public BaseResponse selectList() {
FilterBussinessTypeRequest bussinessTypeFilterRequest=new FilterBussinessTypeRequest();
bussinessTypeFilterRequest.setAction("2");
bussinessTypeFilterRequest.setMainAction("WareHouseOut");
bussinessTypeFilterRequest.setCorpType(2);
List<BasicBussinessTypeEntity> bussinessTypeEntities = basicBussinessTypeService.findList(bussinessTypeFilterRequest);
return ResultVOUtils.success(bussinessTypeEntities);
}
} }

@ -428,7 +428,7 @@ public class IoCodeTempController extends BaseController {
//过期提醒: //过期提醒:
// SystemParamConfigEntity expireParamConfigEntity = systemParamConfigService.selectByParamKey("expire_date_tip"); // SystemParamConfigEntity expireParamConfigEntity = systemParamConfigService.selectByParamKey("expire_date_tip");
if (bussinessTypeEntity.isCheckExpire() && !addOrderRequest.isIgnoreExpire()) { if (bussinessTypeEntity.getCheckVailDate()==1 && !addOrderRequest.isIgnoreExpire()) {
if (StrUtil.isNotEmpty(udiEntity.getExpireDate())) { if (StrUtil.isNotEmpty(udiEntity.getExpireDate())) {
String expireDate = "20" + udiEntity.getExpireDate(); String expireDate = "20" + udiEntity.getExpireDate();
long expireTime = DateUtil.parseDateExpire(expireDate); long expireTime = DateUtil.parseDateExpire(expireDate);
@ -441,7 +441,7 @@ public class IoCodeTempController extends BaseController {
//失效期提醒 //失效期提醒
SystemParamConfigEntity recentParamConfigEntity = systemParamConfigService.selectByParamKey("recent_date_tip"); SystemParamConfigEntity recentParamConfigEntity = systemParamConfigService.selectByParamKey("recent_date_tip");
long recent = Long.parseLong(recentParamConfigEntity.getParamValue()); long recent = Long.parseLong(recentParamConfigEntity.getParamValue());
if (bussinessTypeEntity.isCheckVailDate() && recent > 0 && !addOrderRequest.isIgnoreRecentExpire()) { if (bussinessTypeEntity.getCheckVailDate()==1 && recent > 0 && !addOrderRequest.isIgnoreRecentExpire()) {
if (StrUtil.isNotEmpty(udiEntity.getExpireDate())) { if (StrUtil.isNotEmpty(udiEntity.getExpireDate())) {
String expireDate = "20" + udiEntity.getExpireDate(); String expireDate = "20" + udiEntity.getExpireDate();
long expireTime = DateUtil.parseDateExpire(expireDate); long expireTime = DateUtil.parseDateExpire(expireDate);

@ -275,7 +275,7 @@ public class IoPurChangeService {
billNo += ioOrderEntity.getBillNo() + ","; billNo += ioOrderEntity.getBillNo() + ",";
//插入业务单表 //插入业务单表
for (PurReceiveDetailEntity obj : m.getValue()) { for (PurReceiveDetailEntity obj : m.getValue()) {
BasicProductsEntity basicProductsEntity = purPlanDetailService.selectIoOrderDetailBiz(obj.getId()); BasicProductsEntity basicProductsEntity = receivedetailService.selectIoOrderDetailBiz(obj.getId());
IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity(); IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity();
ioOrderDetailBizEntity.setOrderIdFk(ioOrderEntity.getBillNo()); ioOrderDetailBizEntity.setOrderIdFk(ioOrderEntity.getBillNo());
ioOrderDetailBizEntity.setBindRlFk(obj.getRelIdFk()); ioOrderDetailBizEntity.setBindRlFk(obj.getRelIdFk());

@ -1,6 +1,7 @@
package com.glxp.api.controller.sync; package com.glxp.api.controller.sync;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
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;
@ -60,7 +61,9 @@ public class SpsSyncExportStatusController {
@PostMapping("/spssync/basic/udiinfo/deleteByStatus") @PostMapping("/spssync/basic/udiinfo/deleteByStatus")
public BaseResponse deleteByStatus(@RequestBody DeleteRequest deleteRequest) { public BaseResponse deleteByStatus(@RequestBody DeleteRequest deleteRequest) {
if (StrUtil.isBlank(deleteRequest.getId())) {
return ResultVOUtils.error(500, "缺少唯一标识");
}
boolean b = basicExportService.deleteById(deleteRequest.getId()); boolean b = basicExportService.deleteById(deleteRequest.getId());
redisUtil.del(deleteRequest.getId()); redisUtil.del(deleteRequest.getId());
if (b) if (b)

@ -17,6 +17,8 @@ public interface DeptDao {
List<DeptEntity> filterGroupInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest); List<DeptEntity> filterGroupInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest);
List<String> selectByIdCode(@Param("List") List<String> list);
boolean insertInvWarehouse(DeptEntity DeptEntity); boolean insertInvWarehouse(DeptEntity DeptEntity);
boolean updateInvWarehouse(DeptEntity DeptEntity); boolean updateInvWarehouse(DeptEntity DeptEntity);
@ -49,6 +51,10 @@ public interface DeptDao {
boolean updateTime(@Param("code") String code, @Param("updateTime") Date updateTime); boolean updateTime(@Param("code") String code, @Param("updateTime") Date updateTime);
List<DeptEntity> getDeptById(@Param("ids") List<Integer> ids);
List<DeptEntity> selectByPcode(@Param("pcode") String pcode);
DeptEntity selectByThirdSys(@Param("thirdIdSys") String thirdIdSys, @Param("thirdId") String thirdId); DeptEntity selectByThirdSys(@Param("thirdIdSys") String thirdIdSys, @Param("thirdId") String thirdId);
/** /**
@ -63,4 +69,8 @@ public interface DeptDao {
* @return * @return
*/ */
String selectNameByCode(@Param("code") String code); String selectNameByCode(@Param("code") String code);
List<DeptEntity> selectupDeptAll(@Param("pcode") String pCode);
List<DeptEntity> selectLowDeptAll(@Param("pcode") String pCode);
} }

@ -16,6 +16,8 @@ public interface DeptUserDao {
List<DeptUserResponse> selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust); List<DeptUserResponse> selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust);
List<DeptUserResponse> selectJoinDeptUserKey(FilterDeptUserReqeust filterDeptUserReqeust);
boolean delete(@Param("deptId") Long deptId, @Param("userId") Long userId); boolean delete(@Param("deptId") Long deptId, @Param("userId") Long userId);
int deleteById(Integer id); int deleteById(Integer id);

@ -21,6 +21,11 @@ public interface InvWarehouseDao extends BaseMapperPlus<InvWarehouseDao, InvWare
InvWarehouseEntity selectMaxCode(FilterInvSubWarehouseRequest filterInvSubWarehouseRequest); InvWarehouseEntity selectMaxCode(FilterInvSubWarehouseRequest filterInvSubWarehouseRequest);
InvWarehouseEntity getByWareId(@Param("id") String id);
List<InvWarehouseEntity> getByWarePcode(@Param("parentCode") String parentCode);
boolean insertInvSubWarehouse(InvWarehouseEntity invWarehouseEntity); boolean insertInvSubWarehouse(InvWarehouseEntity invWarehouseEntity);
boolean updateInvSubWarehouse(InvWarehouseEntity invWarehouseEntity); boolean updateInvSubWarehouse(InvWarehouseEntity invWarehouseEntity);
@ -96,6 +101,8 @@ public interface InvWarehouseDao extends BaseMapperPlus<InvWarehouseDao, InvWare
*/ */
String selectParentIdByCode(@Param("invCode") String invCode); String selectParentIdByCode(@Param("invCode") String invCode);
List<InvWarehouseEntity> selectInvById(@Param("InvList") List<String> InvList);
List<InvWarehouseEntity> selectLowWarehouseAll(@Param("pcode") String pCode);
} }

@ -21,4 +21,5 @@ public interface BasicBusTypeChangeDao extends BaseMapper<BasicBusTypeChangeEnti
* @return * @return
*/ */
List<BasicBusTypeChangeResponse> filterList(FilterBusTypeChangeRequest filterBusTypeChangeRequest); List<BasicBusTypeChangeResponse> filterList(FilterBusTypeChangeRequest filterBusTypeChangeRequest);
} }

@ -1,12 +1,14 @@
package com.glxp.api.dao.inout; package com.glxp.api.dao.inout;
import com.glxp.api.dao.BaseMapperPlus; import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.basic.BasicProductsEntity;
import com.glxp.api.entity.inout.PurReceiveDetailEntity; import com.glxp.api.entity.inout.PurReceiveDetailEntity;
import com.glxp.api.req.inout.FilterReceiveDetailRequest; import com.glxp.api.req.inout.FilterReceiveDetailRequest;
import com.glxp.api.req.inout.UpdateReceiveDetailRequest; import com.glxp.api.req.inout.UpdateReceiveDetailRequest;
import com.glxp.api.res.inout.ReceiveDetailResponse; import com.glxp.api.res.inout.ReceiveDetailResponse;
import com.glxp.api.res.inout.ReceiveResponse; import com.glxp.api.res.inout.ReceiveResponse;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -17,5 +19,5 @@ public interface ReceiveDetailDao extends BaseMapperPlus<ReceiveDetailDao, PurRe
boolean updateReceiveDetail(UpdateReceiveDetailRequest updateReceiveDetailRequest); boolean updateReceiveDetail(UpdateReceiveDetailRequest updateReceiveDetailRequest);
BasicProductsEntity selectIoOrderDetailBiz(@Param("id") long id);
} }

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import java.util.Date;
@Data @Data
@TableName(value = "auth_warehouse") @TableName(value = "auth_warehouse")
public class InvWarehouseEntity { public class InvWarehouseEntity {
@ -84,7 +86,10 @@ public class InvWarehouseEntity {
* *
*/ */
@TableField(value = "advanceType") @TableField(value = "advanceType")
private Boolean advanceType; private Integer advanceType;
@TableField(value = "updateTime")
private Date updateTime;
@TableField(exist = false) @TableField(exist = false)
public String thirdName; public String thirdName;

@ -390,11 +390,11 @@ public class BasicBussinessTypeEntity {
@TableField(value = "fillCodeRel") @TableField(value = "fillCodeRel")
private boolean fillCodeRel; private boolean fillCodeRel;
@TableField(value = "checkVailDate") @TableField(value = "checkVailDate")
private boolean checkVailDate; private Integer checkVailDate;
@TableField(value = "checkExpire") @TableField(value = "checkExpire")
private boolean checkExpire; private Integer checkExpire;
@TableField(value = "checkCertExpire") @TableField(value = "checkCertExpire")
private boolean checkCertExpire; private Integer checkCertExpire;
// 预验收退库单据类型 // 预验收退库单据类型
@TableField(value = "preInBackAction") @TableField(value = "preInBackAction")
@ -404,4 +404,9 @@ public class BasicBussinessTypeEntity {
private Integer backPreinType; private Integer backPreinType;
@TableField(value = "checkPreInOrders") @TableField(value = "checkPreInOrders")
private String checkPreInOrders; private String checkPreInOrders;
// 寄售使用禁止无库存出库
@TableField(value = "advancePreIn")
private boolean advancePreIn;
@TableField(value = "sortNum")
private Integer sortNum;
} }

@ -19,6 +19,11 @@ public class ThrSystemDetailEntity {
private String localAction; private String localAction;
private String thirdAction; private String thirdAction;
/**
*
*/
private Integer time;
public String getValue() { public String getValue() {
if (value == null) if (value == null)
return null; return null;

@ -28,5 +28,5 @@ public class FilterAuthUserRequest extends ListPageRequest {
*/ */
private String deptCode; private String deptCode;
private String invCode; //仓库号 private String invCode; //仓库号
private String key;
} }

@ -11,7 +11,7 @@ public class FilterInvSubWarehouseRequest extends ListPageRequest {
private String name; private String name;
private String parentId; private String parentId;
private Boolean defaultInv; private Boolean defaultInv;
private Boolean advanceType; private Integer advanceType;
public String thirdId; public String thirdId;
public String thirdId1; public String thirdId1;

@ -294,12 +294,16 @@ public class BussinessTypeSaveRequest {
private boolean fillCodeRel; private boolean fillCodeRel;
private boolean checkVailDate;
private boolean checkExpire; private Integer checkVailDate;
private boolean checkCertExpire; private Integer checkExpire;
private Integer checkCertExpire;
private String preInBackAction; private String preInBackAction;
private Integer backPreinType; private Integer backPreinType;
private Integer sortNum;
private String checkPreInOrders; private String checkPreInOrders;
private Boolean advancePreIn;
} }

@ -44,7 +44,7 @@ public class FilterBussinessTypeRequest extends ListPageRequest {
/** /**
* *
*/ */
private Boolean advanceType; private Integer advanceType;
private String type; private String type;
@ -108,4 +108,7 @@ public class FilterBussinessTypeRequest extends ListPageRequest {
private Boolean fillCodeRel; private Boolean fillCodeRel;
private String vueType; private String vueType;
private Integer corpType;
private Integer sortNum;
private Integer actionType;
} }

@ -21,5 +21,5 @@ public class InvSubWarehouseResponse {
private boolean defaultInv; private boolean defaultInv;
private String parentCode; private String parentCode;
private String parentInvName; private String parentInvName;
private Boolean advanceType; private Integer advanceType;
} }

@ -14,4 +14,7 @@ public class BasicBusTypeChangeResponse extends BasicBusTypeChangeEntity {
*/ */
private String targetBusName; private String targetBusName;
private String targetName;
} }

@ -144,10 +144,12 @@ public class BasicBussinessTypeResponse {
private boolean fillCodeRel; private boolean fillCodeRel;
private boolean checkVailDate; private Integer checkVailDate;
private boolean checkExpire; private Integer checkExpire;
private boolean checkCertExpire; private Integer checkCertExpire;
private String preInBackAction; private String preInBackAction;
private Integer backPreinType; private Integer backPreinType;
private String checkPreInOrders; private String checkPreInOrders;
private Boolean advancePreIn;
private Integer sortNum;
} }

@ -10,7 +10,7 @@ import java.util.List;
public interface DeptService { public interface DeptService {
List<String> selectByIdCode(List<String> list);
DeptEntity findDefault(Boolean advaceType, Boolean isDefault); DeptEntity findDefault(Boolean advaceType, Boolean isDefault);
DeptEntity selectMaxCode(FilterInvWarehouseRequest filterInvWarehouseRequest); DeptEntity selectMaxCode(FilterInvWarehouseRequest filterInvWarehouseRequest);
@ -35,6 +35,8 @@ public interface DeptService {
boolean deleteById(String id); boolean deleteById(String id);
List<DeptEntity> selectByPcode(String pcode);
List<DeptEntity> selectByNameList(String name); List<DeptEntity> selectByNameList(String name);
/** /**
@ -73,4 +75,10 @@ public interface DeptService {
boolean updateTime(String code, Date updateTime); boolean updateTime(String code, Date updateTime);
List<DeptEntity> getDeptById( List<Integer> ids);
List<DeptEntity> selectupDeptAll(String pCode);
List<DeptEntity> selectLowDeptAll(String pCode);
} }

@ -13,6 +13,8 @@ public interface DeptUserService {
List<DeptUserResponse> selectByUserId(Long userId); List<DeptUserResponse> selectByUserId(Long userId);
List<DeptUserResponse> selectByUserIdKey(Long userId);
List<DeptUserResponse> selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust); List<DeptUserResponse> selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust);
boolean delete(Long deptId, Long userId); boolean delete(Long deptId, Long userId);

@ -12,6 +12,10 @@ import java.util.List;
public interface InvWarehouseService { public interface InvWarehouseService {
InvWarehouseEntity getByWareId( String id);
List<InvWarehouseEntity> getByWarePcode(@Param("parentCode") String parentCode);
InvWarehouseEntity findById(String id); InvWarehouseEntity findById(String id);
InvWarehouseEntity selectByThrCode(String code, String thirdSys); InvWarehouseEntity selectByThrCode(String code, String thirdSys);
@ -86,5 +90,9 @@ public interface InvWarehouseService {
String selectParentIdByCode(String invCode); String selectParentIdByCode(String invCode);
List<InvWarehouseEntity> selectInvById(List<String> InvList);
List<InvWarehouseEntity> findByLastTime(Date lastUpdateTime); List<InvWarehouseEntity> findByLastTime(Date lastUpdateTime);
List<InvWarehouseEntity> selectLowWarehouseAll(String pCode);
} }

@ -22,6 +22,11 @@ public class DeptServiceImpl implements DeptService {
@Resource @Resource
DeptDao deptDao; DeptDao deptDao;
@Override
public List<String> selectByIdCode(List<String> list) {
return deptDao.selectByIdCode(list);
}
@Override @Override
public DeptEntity findDefault(Boolean advaceType, Boolean isDefault) { public DeptEntity findDefault(Boolean advaceType, Boolean isDefault) {
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest(); FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
@ -138,6 +143,11 @@ public class DeptServiceImpl implements DeptService {
return deptDao.deleteById(id); return deptDao.deleteById(id);
} }
@Override
public List<DeptEntity> selectByPcode(String pcode) {
return deptDao.selectByPcode(pcode);
}
@Override @Override
public void importInvWarehouse(List<DeptEntity> invWarehouseEntities) { public void importInvWarehouse(List<DeptEntity> invWarehouseEntities) {
if (CollUtil.isNotEmpty(invWarehouseEntities)) { if (CollUtil.isNotEmpty(invWarehouseEntities)) {
@ -173,4 +183,20 @@ public class DeptServiceImpl implements DeptService {
public boolean updateTime(String code, Date updateTime) { public boolean updateTime(String code, Date updateTime) {
return deptDao.updateTime(code, updateTime); return deptDao.updateTime(code, updateTime);
} }
@Override
public List<DeptEntity> getDeptById(List<Integer> ids) {
return deptDao.getDeptById(ids);
}
@Override
public List<DeptEntity> selectupDeptAll(String pCode) {
return deptDao.selectupDeptAll(pCode);
}
@Override
public List<DeptEntity> selectLowDeptAll(String pCode) {
return deptDao.selectLowDeptAll(pCode);
}
} }

@ -37,6 +37,13 @@ public class DeptUserServiceImpl implements DeptUserService {
return deptUserDao.selectJoinDeptUser(filterDeptUserReqeust); return deptUserDao.selectJoinDeptUser(filterDeptUserReqeust);
} }
@Override
public List<DeptUserResponse> selectByUserIdKey(Long userId) {
FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust();
filterDeptUserReqeust.setUserId(userId);
return deptUserDao.selectJoinDeptUserKey(filterDeptUserReqeust);
}
@Override @Override
public List<DeptUserResponse> selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust) { public List<DeptUserResponse> selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust) {
if (filterDeptUserReqeust.getPage() != null) { if (filterDeptUserReqeust.getPage() != null) {

@ -35,6 +35,16 @@ public class InvWarehouseServiceImpl implements InvWarehouseService {
@Resource @Resource
private ThrSystemDao thrSystemDao; private ThrSystemDao thrSystemDao;
@Override
public InvWarehouseEntity getByWareId(String id) {
return invWarehouseDao.getByWareId(id);
}
@Override
public List<InvWarehouseEntity> getByWarePcode(String parentCode) {
return invWarehouseDao.getByWarePcode(parentCode);
}
@Override @Override
public InvWarehouseEntity findById(String id) { public InvWarehouseEntity findById(String id) {
FilterInvSubWarehouseRequest filterInvSubWarehouseRequest = new FilterInvSubWarehouseRequest(); FilterInvSubWarehouseRequest filterInvSubWarehouseRequest = new FilterInvSubWarehouseRequest();
@ -235,8 +245,18 @@ public class InvWarehouseServiceImpl implements InvWarehouseService {
return invWarehouseDao.selectParentIdByCode(invCode); return invWarehouseDao.selectParentIdByCode(invCode);
} }
@Override
public List<InvWarehouseEntity> selectInvById(List<String> InvList) {
return invWarehouseDao.selectInvById(InvList);
}
@Override @Override
public List<InvWarehouseEntity> findByLastTime(Date lastUpdateTime) { public List<InvWarehouseEntity> findByLastTime(Date lastUpdateTime) {
return invWarehouseDao.selectList(new QueryWrapper<InvWarehouseEntity>().gt("updateTime", lastUpdateTime)); return invWarehouseDao.selectList(new QueryWrapper<InvWarehouseEntity>().gt("updateTime", lastUpdateTime));
} }
@Override
public List<InvWarehouseEntity> selectLowWarehouseAll(String pCode) {
return invWarehouseDao.selectLowWarehouseAll(pCode);
}
} }

@ -1,7 +1,6 @@
package com.glxp.api.service.basic; package com.glxp.api.service.basic;
import com.glxp.api.entity.basic.BasicBusTypeChangeEntity; import com.glxp.api.entity.basic.BasicBusTypeChangeEntity;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.req.basic.FilterBusTypeChangeRequest; import com.glxp.api.req.basic.FilterBusTypeChangeRequest;
import com.glxp.api.res.basic.BasicBusTypeChangeResponse; import com.glxp.api.res.basic.BasicBusTypeChangeResponse;

@ -5,6 +5,7 @@ import com.glxp.api.req.basic.FilterBusTypeChangeRequest;
import com.glxp.api.req.basic.FilterBusTypePreRequest; import com.glxp.api.req.basic.FilterBusTypePreRequest;
import com.glxp.api.res.basic.BasicBusTypePreResponse; import com.glxp.api.res.basic.BasicBusTypePreResponse;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -79,4 +80,6 @@ public interface IBasicBusTypePreService {
* @return * @return
*/ */
boolean verifyExists(BasicBusTypePreEntity basicBusTypePreEntity); boolean verifyExists(BasicBusTypePreEntity basicBusTypePreEntity);
List<BasicBusTypePreEntity> findByLastTime(Date lastUpdateTime);
} }

@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.basic.BasicBusTypeChangeDao; import com.glxp.api.dao.basic.BasicBusTypeChangeDao;
import com.glxp.api.entity.basic.BasicBusTypeChangeEntity; import com.glxp.api.entity.basic.BasicBusTypeChangeEntity;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.req.basic.FilterBusTypeChangeRequest; import com.glxp.api.req.basic.FilterBusTypeChangeRequest;
import com.glxp.api.res.basic.BasicBusTypeChangeResponse; import com.glxp.api.res.basic.BasicBusTypeChangeResponse;
import com.glxp.api.service.auth.CustomerService; import com.glxp.api.service.auth.CustomerService;

@ -105,6 +105,10 @@ public class BasicBusTypePreServiceImpl implements IBasicBusTypePreService {
return false; return false;
} }
@Override
public List<BasicBusTypePreEntity> findByLastTime(Date lastUpdateTime) {
return basicBusTypePreDao.selectList(new QueryWrapper<BasicBusTypePreEntity>().gt("updateTime", lastUpdateTime));
}
/** /**
* / * /
* *

@ -326,7 +326,7 @@ public class IoAddInoutService {
IoOrderEntity order = orderService.findByBillNo(orderId); IoOrderEntity order = orderService.findByBillNo(orderId);
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(order.getAction()); BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(order.getAction());
if (StrUtil.isBlank(bussinessTypeEntity.getSupplementOrderType())) { if (StrUtil.isBlank(bussinessTypeEntity.getSupplementOrderType())) {
return ResultVOUtils.error(ResultEnum.valueOf("此类型单据不可补单")); return ResultVOUtils.error(500,"此单据类型不可补单");
} }
IoOrderEntity supplementOrder = new IoOrderEntity(); IoOrderEntity supplementOrder = new IoOrderEntity();
BeanUtil.copyProperties(order, supplementOrder); BeanUtil.copyProperties(order, supplementOrder);

@ -1,5 +1,6 @@
package com.glxp.api.service.inout; package com.glxp.api.service.inout;
import com.glxp.api.entity.basic.BasicProductsEntity;
import com.glxp.api.entity.inout.PurReceiveEntity; import com.glxp.api.entity.inout.PurReceiveEntity;
import com.glxp.api.req.inout.FilterReceiveRequest; import com.glxp.api.req.inout.FilterReceiveRequest;
import com.glxp.api.res.inout.ReceiveResponse; import com.glxp.api.res.inout.ReceiveResponse;
@ -21,4 +22,7 @@ public interface ReceiveService {
boolean delReceive(String orderIdFk); boolean delReceive(String orderIdFk);
} }

@ -1,5 +1,6 @@
package com.glxp.api.service.inout; package com.glxp.api.service.inout;
import com.glxp.api.entity.basic.BasicProductsEntity;
import com.glxp.api.entity.inout.PurReceiveDetailEntity; import com.glxp.api.entity.inout.PurReceiveDetailEntity;
import com.glxp.api.req.inout.FilterReceiveDetailRequest; import com.glxp.api.req.inout.FilterReceiveDetailRequest;
import com.glxp.api.req.inout.FilterReceiveRequest; import com.glxp.api.req.inout.FilterReceiveRequest;
@ -22,5 +23,5 @@ public interface ReceivedetailService {
boolean delDetail(String id); boolean delDetail(String id);
BasicProductsEntity selectIoOrderDetailBiz(long id);
} }

@ -3,6 +3,7 @@ package com.glxp.api.service.inout.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.inout.ReceiveDetailDao; import com.glxp.api.dao.inout.ReceiveDetailDao;
import com.glxp.api.entity.basic.BasicProductsEntity;
import com.glxp.api.entity.inout.PurReceiveDetailEntity; import com.glxp.api.entity.inout.PurReceiveDetailEntity;
import com.glxp.api.req.inout.FilterReceiveDetailRequest; import com.glxp.api.req.inout.FilterReceiveDetailRequest;
import com.glxp.api.req.inout.UpdateReceiveDetailRequest; import com.glxp.api.req.inout.UpdateReceiveDetailRequest;
@ -55,5 +56,8 @@ public class ReceiveDetailServiceImpl implements ReceivedetailService {
return true; return true;
} }
@Override
public BasicProductsEntity selectIoOrderDetailBiz(long id) {
return receiveDetailDao.selectIoOrderDetailBiz(id);
}
} }

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.inout.ReceiveDao; import com.glxp.api.dao.inout.ReceiveDao;
import com.glxp.api.dao.inout.ReceiveDetailDao; import com.glxp.api.dao.inout.ReceiveDetailDao;
import com.glxp.api.entity.basic.BasicProductsEntity;
import com.glxp.api.entity.inout.PurReceiveDetailEntity; import com.glxp.api.entity.inout.PurReceiveDetailEntity;
import com.glxp.api.entity.inout.PurReceiveEntity; import com.glxp.api.entity.inout.PurReceiveEntity;
import com.glxp.api.req.inout.FilterReceiveRequest; import com.glxp.api.req.inout.FilterReceiveRequest;
@ -67,4 +68,6 @@ public class ReceiveServiceImpl implements ReceiveService {
} }
} }

@ -50,10 +50,11 @@ public class ThrSystemDetailServiceImpl implements ThrSystemDetailService {
return data; return data;
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void updateInterfaceStatus(List<ThrSystemDetailEntity> list) { public void updateInterfaceStatus(List<ThrSystemDetailEntity> list) {
for (ThrSystemDetailEntity thrSystemDetailEntity : list) { for (ThrSystemDetailEntity thrSystemDetailEntity : list) {
//请求默认0分钟
thrSystemDetailEntity.setTime(0);
thrSystemDetailDao.updateBasicThirdSysDetail(thrSystemDetailEntity); thrSystemDetailDao.updateBasicThirdSysDetail(thrSystemDetailEntity);
} }
} }

@ -15,7 +15,7 @@ import com.glxp.api.entity.system.ScheduledEntity;
import com.glxp.api.idc.service.IdcService; import com.glxp.api.idc.service.IdcService;
import com.glxp.api.req.system.ScheduledRequest; import com.glxp.api.req.system.ScheduledRequest;
//
//@Component //@Component
//@EnableScheduling //@EnableScheduling
public class AsyncFetchUdiTask implements SchedulingConfigurer { public class AsyncFetchUdiTask implements SchedulingConfigurer {

@ -15,7 +15,7 @@ import com.glxp.api.entity.system.ScheduledEntity;
import com.glxp.api.idc.service.IdcService; import com.glxp.api.idc.service.IdcService;
import com.glxp.api.req.system.ScheduledRequest; import com.glxp.api.req.system.ScheduledRequest;
//
//@Component //@Component
//@EnableScheduling //@EnableScheduling
public class AsyncUdiTask implements SchedulingConfigurer { public class AsyncUdiTask implements SchedulingConfigurer {

@ -94,6 +94,21 @@
</select> </select>
<select id="selectByIdCode"
resultType="java.lang.String">
SELECT code
FROM auth_dept
<where>
<if test="List != null and List.size() != 0">
and id in
<foreach collection="List" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</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
@ -267,6 +282,19 @@
where code = #{code} where code = #{code}
</update> </update>
<select id="getDeptById" resultType="com.glxp.api.entity.auth.DeptEntity" >
select *
from auth_dept
where id in
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="selectByPcode" resultType="com.glxp.api.entity.auth.DeptEntity">
select * from auth_dept where pcode = #{pcode}
</select>
<select id="selectByThirdSys" resultType="com.glxp.api.entity.auth.DeptEntity"> <select id="selectByThirdSys" resultType="com.glxp.api.entity.auth.DeptEntity">
select * select *
@ -283,4 +311,21 @@
<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="selectLowDeptAll" parameterType="java.lang.String" resultType="com.glxp.api.entity.auth.DeptEntity">
with recursive table_a as (
select * from auth_dept ta where pcode = #{pcode}
union all
select tb.* from auth_dept tb inner join table_a on table_a.code = tb.pcode
)
select * from table_a
</select>
<select id="selectupDeptAll" parameterType="java.lang.String" resultType="com.glxp.api.entity.auth.DeptEntity">
with recursive table_a as (
select * from auth_dept ta where code = #{pcode}
union all
select tb.* from auth_dept tb inner join table_a on table_a.pcode = tb.code
)
select * from table_a
</select>
</mapper> </mapper>

@ -17,6 +17,30 @@
</where> </where>
</select> </select>
<select id="selectJoinDeptUserKey" parameterType="com.glxp.api.req.auth.FilterDeptUserReqeust"
resultType="com.glxp.api.res.auth.DeptUserResponse">
SELECT auth_dept_user.*,
auth_user.userName,
auth_user.employeeName,
auth_dept.`name` deptName,
auth_user.comments
FROM auth_dept_user
left JOIN auth_user
on auth_dept_user.userId = auth_user.id
left JOIN auth_dept on auth_dept_user.deptId = auth_dept.id
<where>
<if test="deptId != null">
and deptId = #{deptId}
</if>
<if test="userId != null">
and userId = #{userId}
</if>
<if test="key != null and key != ''">
and (auth_user.userName like concat('%', #{key}, '%') or
auth_user.employeeName like concat('%', #{key}, '%'))
</if>
</where>
</select>
<select id="selectJoinDeptUser" parameterType="com.glxp.api.req.auth.FilterDeptUserReqeust" <select id="selectJoinDeptUser" parameterType="com.glxp.api.req.auth.FilterDeptUserReqeust"
resultType="com.glxp.api.res.auth.DeptUserResponse"> resultType="com.glxp.api.res.auth.DeptUserResponse">

@ -57,6 +57,18 @@
limit 1 limit 1
</select> </select>
<select id="getByWareId" resultType="com.glxp.api.entity.auth.InvWarehouseEntity">
select *
FROM auth_warehouse
WHERE id = #{id}
</select>
<select id="getByWarePcode" resultType="com.glxp.api.entity.auth.InvWarehouseEntity">
select *
FROM auth_warehouse
WHERE parentCode = #{parentCode}
</select>
<select id="filterGroupInvSub" parameterType="com.glxp.api.req.auth.FilterInvWarehouseRequest" <select id="filterGroupInvSub" parameterType="com.glxp.api.req.auth.FilterInvWarehouseRequest"
resultType="com.glxp.api.entity.auth.InvWarehouseEntity"> resultType="com.glxp.api.entity.auth.InvWarehouseEntity">
@ -292,7 +304,8 @@
AND a.advanceType = #{advanceType} AND a.advanceType = #{advanceType}
</if> </if>
<if test="key != null and key != ''"> <if test="key != null and key != ''">
AND a.name like concat('%', #{key}, '%') AND (a.name like concat('%', #{key}, '%') or
a.code = #{key})
</if> </if>
</where> </where>
</select> </select>
@ -373,4 +386,26 @@
from auth_warehouse from auth_warehouse
where code = #{invCode} where code = #{invCode}
</select> </select>
<select id="selectInvById" resultType="com.glxp.api.entity.auth.InvWarehouseEntity">
select *
from auth_warehouse
<where>
<if test="InvList != null and InvList.size() != 0">
and parentId in
<foreach collection="InvList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="selectLowWarehouseAll" parameterType="java.lang.String" resultType="com.glxp.api.entity.auth.InvWarehouseEntity">
with recursive table_a as (
select * from auth_warehouse ta where parentCode = #{pcode}
union all
select tb.* from auth_warehouse tb inner join table_a on table_a.code = tb.parentCode
)
select * from table_a
</select>
</mapper> </mapper>

@ -2,10 +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.BasicBusTypeChangeDao"> <mapper namespace="com.glxp.api.dao.basic.BasicBusTypeChangeDao">
<select id="filterList" resultType="com.glxp.api.res.basic.BasicBusTypeChangeResponse"> <select id="filterList" resultType="com.glxp.api.res.basic.BasicBusTypeChangeResponse">
select bc.*, bu.name targetName, bbc.originName targetBusName SELECT bc.*,
from basic_bustype_change bc bu.name targetName,
left join basic_bussiness_type bu on bc.targetAction = bu.action (select originName from basic_bustype_change where originAction = bc.targetBusAction) as targetBusName
left join basic_bustype_change bbc on bc.originAction = bbc.targetAction FROM basic_bustype_change bc
LEFT JOIN basic_bussiness_type bu ON bc.targetAction = bu.action
<where> <where>
<if test="originAction != null and originAction != ''"> <if test="originAction != null and originAction != ''">
AND bc.originAction = #{originAction} AND bc.originAction = #{originAction}

@ -53,7 +53,7 @@
]]> ]]>
</if> </if>
</where> </where>
order by bu.updateTime desc order by bu.sortNum
</select> </select>
<insert id="insertIgnoreBussinessType" parameterType="com.glxp.api.entity.basic.BasicBussinessTypeEntity"> <insert id="insertIgnoreBussinessType" parameterType="com.glxp.api.entity.basic.BasicBussinessTypeEntity">
@ -70,7 +70,7 @@
vailGroupBuy, busType, inStock, actionType, thrCheckEnable, thrCheckWebNew, vailGroupBuy, busType, inStock, actionType, thrCheckEnable, thrCheckWebNew,
thrCheckPdaUn, thrCheckPdaEd, thrCheckUdims, thrCheckPc, thrCheckSp, thrCheckPdaUn, thrCheckPdaEd, thrCheckUdims, thrCheckPc, thrCheckSp,
thrCheckChange, thrCheckBalance, thrCheckCopy, fillCodeRel, checkVailDate, thrCheckChange, thrCheckBalance, thrCheckCopy, fillCodeRel, checkVailDate,
checkExpire, checkCertExpire, preInBackAction, backPreinType, checkPreInOrders) checkExpire, checkCertExpire, preInBackAction, backPreinType, checkPreInOrders,sortNum)
values (#{mainAction}, #{action}, #{name}, #{enable}, #{remark}, #{thirdSysFk}, #{genUnit}, #{innerOrder}, values (#{mainAction}, #{action}, #{name}, #{enable}, #{remark}, #{thirdSysFk}, #{genUnit}, #{innerOrder},
#{secCheckEnable}, #{checkEnable}, #{checkUdims}, #{checkPdaEd}, #{checkPdaUn}, #{checkPc}, #{secCheckEnable}, #{checkEnable}, #{checkUdims}, #{checkPdaEd}, #{checkPdaUn}, #{checkPc},
#{checkWebNew}, #{checkSp}, #{checkChange}, #{secCheckUdims}, #{secCheckPdaEd}, #{secCheckPdaUn}, #{checkWebNew}, #{checkSp}, #{checkChange}, #{secCheckUdims}, #{secCheckPdaEd}, #{secCheckPdaUn},
@ -82,7 +82,7 @@
#{vailGroupBuy}, #{busType}, #{inStock}, #{actionType}, #{thrCheckEnable}, #{thrCheckWebNew}, #{vailGroupBuy}, #{busType}, #{inStock}, #{actionType}, #{thrCheckEnable}, #{thrCheckWebNew},
#{thrCheckPdaUn}, #{thrCheckPdaEd}, #{thrCheckUdims}, #{thrCheckPc}, #{thrCheckSp}, #{thrCheckPdaUn}, #{thrCheckPdaEd}, #{thrCheckUdims}, #{thrCheckPc}, #{thrCheckSp},
#{thrCheckChange}, #{thrCheckBalance}, #{thrCheckCopy}, #{fillCodeRel}, #{checkVailDate}, #{thrCheckChange}, #{thrCheckBalance}, #{thrCheckCopy}, #{fillCodeRel}, #{checkVailDate},
#{checkExpire}, #{checkCertExpire}, #{preInBackAction}, #{backPreinType}, #{checkPreInOrders}) #{checkExpire}, #{checkCertExpire}, #{preInBackAction}, #{backPreinType}, #{checkPreInOrders}, #{sortNum})
</insert> </insert>
<select id="selectBusList" resultType="com.glxp.api.entity.basic.BasicBussinessTypeEntity"> <select id="selectBusList" resultType="com.glxp.api.entity.basic.BasicBussinessTypeEntity">
@ -119,7 +119,15 @@
<if test="busType != null"> <if test="busType != null">
AND bu.busType = #{busType} AND bu.busType = #{busType}
</if> </if>
<if test="corpType != null">
AND bu.corpType = #{corpType}
</if>
<if test="sortNum != null">
AND bu.sortNum = #{sortNum}
</if>
<if test="actionType != null">
AND bu.actionType = #{actionType}
</if>
<if test="actionList != null and actionList.size() != 0"> <if test="actionList != null and actionList.size() != 0">
AND bu.action in AND bu.action in
<foreach collection="actionList" index="index" item="item" separator="," open="(" close=")"> <foreach collection="actionList" index="index" item="item" separator="," open="(" close=")">

@ -25,16 +25,46 @@
<update id="updateReceiveDetail" parameterType="com.glxp.api.req.inout.UpdateReceiveDetailRequest"> <update id="updateReceiveDetail" parameterType="com.glxp.api.req.inout.UpdateReceiveDetailRequest">
UPDATE pur_receive_detail UPDATE pur_receive_detail
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="orderIdFk != null">orderIdFk=#{orderIdFk},</if> <if test="orderIdFk != null">
<if test="relIdFk != null">relIdFk=#{relIdFk},</if> orderIdFk=#{orderIdFk},
<if test="nameCode != null">nameCode=#{nameCode},</if> </if>
<if test="count != null">count=#{count},</if> <if test="relIdFk != null">
<if test="supId != null">supId=#{supId},</if> relIdFk=#{relIdFk},
<if test="productDate != null">productDate=#{productDate},</if> </if>
<if test="batchNo != null">batchNo=#{batchNo},</if> <if test="nameCode != null">
<if test="expireDate != null">expireDate=#{expireDate},</if> nameCode=#{nameCode},
</if>
<if test="count != null">
count=#{count},
</if>
<if test="supId != null">
supId=#{supId},
</if>
<if test="productDate != null">
productDate=#{productDate},
</if>
<if test="batchNo != null">
batchNo=#{batchNo},
</if>
<if test="expireDate != null">
expireDate=#{expireDate},
</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<select id="selectIoOrderDetailBiz" parameterType="long"
resultType="com.glxp.api.entity.basic.BasicProductsEntity">
SELECT b2.*
FROM pur_receive_detail p1
LEFT JOIN basic_udirel b1 on b1.id = p1.productId
LEFT JOIN basic_products b2 on b1.uuid = b2.uuid
<where>
<if test="id != null and id != ''">
AND p1.id = #{id}
</if>
</where>
GROUP BY uuid
</select>
</mapper> </mapper>

@ -14,6 +14,7 @@
<if test="name != null">name=#{name},</if> <if test="name != null">name=#{name},</if>
<if test="fromType != null">fromType=#{fromType},</if> <if test="fromType != null">fromType=#{fromType},</if>
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if> <if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
<if test="time != null">time=#{time},</if>
</trim> </trim>
WHERE id=#{id} WHERE id=#{id}
</update> </update>

@ -66,8 +66,8 @@ CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkExpire', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkCertExpire', 'tinyint', 1); 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('basic_bussiness_type', 'checkPreInOrders', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'createType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'batchNo', 'varchar(255) ', 1); CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'batchNo', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'productDate', 'varchar(255) ', 1); CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'productDate', 'varchar(255) ', 1);
@ -186,6 +186,14 @@ CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_biz', 'updateTime', 'dateti
CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_label', 'updateTime', 'datetime', 1); CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_label', 'updateTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_statemen', 'updateTime', 'datetime', 1); CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_statemen', 'updateTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('thr_system_detail', 'time', 'int(5)', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'advancePreIn', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'sortNum', 'int', 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', 'checkPreInOrders', 'varchar(255)', 1);
# CALL Pro_Temp_ColumnWork('sup_cert_set', 'foreign', 'tinyint', 3); # CALL Pro_Temp_ColumnWork('sup_cert_set', 'foreign', 'tinyint', 3);
# CALL Pro_Temp_ColumnWork('sup_cert_set', 'needForeign', 'tinyint', 1); # CALL Pro_Temp_ColumnWork('sup_cert_set', 'needForeign', 'tinyint', 1);

Loading…
Cancel
Save