相关业务流程调整

master
anthonywj 2 years ago
parent 7574f29e0e
commit 263035ea3a

@ -7,6 +7,7 @@ import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.controller.BaseController;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.auth.DeptEntity;
import com.glxp.api.entity.system.SystemParamConfigEntity;
@ -25,7 +26,7 @@ import javax.validation.Valid;
import java.util.*;
@RestController
public class DeptController {
public class DeptController extends BaseController {
@Resource
DeptService deptService;
@ -38,7 +39,6 @@ public class DeptController {
InvWarehouseService invWarehouseService;
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filter")
public BaseResponse filterInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest) {
@ -75,10 +75,17 @@ public class DeptController {
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filterByUser")
public BaseResponse filterByUser(FilterInvWarehouseRequest filterInvWarehouseRequest) {
AuthAdmin authAdmin = customerService.getUserBean();
if (isHosUser()) {
AuthAdmin authAdmin = customerService.getUserBean();
filterInvWarehouseRequest.setUserId(authAdmin.getId());
}else {
}
filterInvWarehouseRequest.setPid(0);
filterInvWarehouseRequest.setStatus(1);
filterInvWarehouseRequest.setUserId(authAdmin.getId());
List<DeptEntity> mInvWarehouseEntities = deptService.filterAllByUser(filterInvWarehouseRequest);
return ResultVOUtils.success(mInvWarehouseEntities);
}
@ -146,9 +153,9 @@ public class DeptController {
public BaseResponse filterAllByUser(FilterInvWarehouseRequest filterInvWarehouseRequest) {
List<DeptEntity> invWarehouseEntities;
AuthAdmin authAdmin = customerService.getUserBean();
if(authAdmin.getCustomerId().equals("110")){
if (authAdmin.getCustomerId().equals("110")) {
filterInvWarehouseRequest.setUserId(authAdmin.getId());
}else{
} else {
filterInvWarehouseRequest.setUserId(null);
}

@ -28,14 +28,19 @@ public class DeptUserController {
DeptUserService deptUserService;
@Resource
DeptService deptService;
@AuthRuleAnnotation("")
@GetMapping("udi/auth/dept/user/filter")
public BaseResponse filterList(FilterDeptUserReqeust filterDeptUserReqeust) {
//获取部门id
Long idByCode = deptService.getIdByCode(filterDeptUserReqeust.getDeptId());
filterDeptUserReqeust.setDeptId(idByCode);
DeptEntity deptEntity = deptService.selectById(idByCode + "");
if (deptEntity.getLevel() == 1) {
filterDeptUserReqeust.setDeptId(null);
} else {
filterDeptUserReqeust.setDeptId(idByCode);
}
List<DeptUserResponse> deptEntityList = deptUserService.selectJoinDeptUser(filterDeptUserReqeust);
PageInfo<DeptUserResponse> pageInfo = new PageInfo<>(deptEntityList);
PageSimpleResponse<DeptUserResponse> deptEntityPageSimpleResponse = new PageSimpleResponse<>();

@ -223,8 +223,8 @@ public class SysUserController extends BaseController {
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
// 修改角色
// userService.insertUserAuth(authAdmin.getId(), authUserSaveRequest.getRoles());
// 修改角色
userService.insertUserAuth(authAdmin.getId(), authUserSaveRequest.getRoles());
//修改所属部门
deptUserService.deleteByUser(authUserSaveRequest.getId());

@ -139,7 +139,7 @@ public class IoOrderController extends BaseController {
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(addOrderRequest.getBillNo());
if (CollUtil.isEmpty(orderDetailCodeEntities)) {
return ResultVOUtils.error(500, "单据未扫码或扫码异常,请检查后重新提交!");
return ResultVOUtils.error(500, "单据未扫码或扫码校验无法通过,提交失败,请检查后重新提交!");
}
IoOrderEntity orderEntity = orderService.findByBillNo(addOrderRequest.getBillNo());
ioAddInoutService.dealProcess(orderEntity);
@ -191,7 +191,7 @@ public class IoOrderController extends BaseController {
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(addOrderRequest.getBillNo());
if (CollUtil.isEmpty(orderDetailCodeEntities)) {
return ResultVOUtils.error(500, "单据还未扫码或UDI码存在异常无法提交!");
return ResultVOUtils.error(500, "单据还未扫码或和扫码校验存在异常无法提交!");
}
if (checkInoutService.checkManual(addOrderRequest.getBillNo())) {
@ -200,11 +200,11 @@ public class IoOrderController extends BaseController {
if (StrUtil.isNotEmpty(errMsg)) {
return ResultVOUtils.error(500, "单据未校验完成,请检查后重新提交!");
return ResultVOUtils.error(500, "单据校验提交失败,请检查后重新提交!");
}
errMsg = checkInoutService.codeOrderCheck(orderDetailCodeEntities, orderDetailBizEntities);
if (StrUtil.isNotEmpty(errMsg)) {
return ResultVOUtils.error(500, "单据未校验完成,请检查后重新提交!");
return ResultVOUtils.error(500, "单据校验提交失败,请检查后重新提交!");
}
saveOrderWeb(addOrderRequest);
IoOrderEntity orderEntity = orderService.findByBillNo(addOrderRequest.getBillNo());
@ -213,7 +213,7 @@ public class IoOrderController extends BaseController {
orderService.update(orderEntity);
checkInoutService.check(addOrderRequest.getBillNo());
} else {
return ResultVOUtils.error(500, "单据未校验完成,请先录入业务单据!");
return ResultVOUtils.error(500, "单据校验提交失败,请先录入业务单据!");
}
} else {
IoOrderEntity orderEntity = orderService.findByBillNo(addOrderRequest.getBillNo());

@ -358,4 +358,8 @@ public class BasicBussinessTypeEntity {
@TableField(value = "busType")
private Integer busType; //1:正常2送货3.到货
@TableField(value = "inStock")
private boolean inStock;
}

@ -167,6 +167,6 @@ public class UdiRelevanceEntity {
@TableField(value = "isDateBy")
private Integer isDateBy;
@TableField(value = "needCert")
private Boolean needCert; //判断是否需要证书
private boolean needCert; //是否需要资质材料
}

@ -276,4 +276,6 @@ public class BussinessTypeSaveRequest {
private int vailGroupBuy; //校验是否集采产品 0:全部1只采集集采产品2只采集非集采产品
private Integer busType; //1:正常2送货3.到货
private boolean inStock;
}

@ -95,8 +95,7 @@ public class UdiRelevanceSaveRequest {
private Boolean relSubmit;
private boolean dispatch; //是否可配送
private boolean groupBuy; //是否集采产品
private boolean needCert; //是否需要资质材料
}

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

@ -128,5 +128,7 @@ public class BasicBussinessTypeResponse {
private Integer busType; //1:正常2送货3.到货
private boolean inStock;
}

@ -104,6 +104,8 @@ public class UdiRelevanceResponse {
private Long relId;
private boolean dispatch; //是否可配送
private boolean groupBuy; //是否集采产品
private boolean needCert; //是否需要资质材料
public int getBhzxxsbzsl() {
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {

@ -62,7 +62,14 @@ public class IoChangeInoutService {
BasicBusTypePreEntity basicBusTypePreEntity = basicBusTypePreService.findByOriginAction(orderEntity.getAction());
List<IoCodeEntity> codeEnttities = codeService.findByOrderId(orderEntity.getBillNo());
buildInOrder(basicBusTypePreEntity, codeEnttities, orderEntity);
if (basicBusTypePreEntity != null) {
buildInOrder(basicBusTypePreEntity, codeEnttities, orderEntity);
}else {
//结束,不生成库存,
}
}
@ -153,7 +160,9 @@ public class IoChangeInoutService {
}
}
} else {
filterSupMaps.put(bussinessChangeTypeEntity.getDefaultInvCode(), useInList);
// 原先单据流程
filterSupMaps.put("test", useInList);
// filterSupMaps.put(bussinessChangeTypeEntity.getDefaultInvCode(), useInList);
}
//根据往来单位生成入库单
for (String corpName : filterSupMaps.keySet()) {
@ -181,12 +190,24 @@ public class IoChangeInoutService {
outOrder.setFromDeptCode(null);
} else {
outOrder.setCustomerId(Constant.SYSTEM_CUSTOMER_ID);
outOrder.setFromInvCode(bussinessChangeTypeEntity.getDefaultInvCode());
outOrder.setFromDeptCode(bussinessChangeTypeEntity.getDefaultDeptCode());
InvWarehouseEntity curInv = invWarehouseService.findByInvSubByCode(orderEntity.getInvCode());
InvWarehouseEntity upInv = invWarehouseService.findByInvSubByCode(curInv.getParentCode());
outOrder.setFromInvCode(upInv.getCode());
outOrder.setFromDeptCode(upInv.getParentId());
//原先流程---使用流转单据默认仓库
// outOrder.setFromInvCode(bussinessChangeTypeEntity.getDefaultInvCode());
// outOrder.setFromDeptCode(bussinessChangeTypeEntity.getDefaultDeptCode());
outOrder.setFromCorp(null);
}
outOrder.setCorpOrderId(CustomUtil.getId() + "x");
InvWarehouseEntity invWarehouseEntity = invWarehouseService.findByInvSubByCode(bussinessChangeTypeEntity.getInvCode());
//原先流程---使用流转单据默认仓库
// InvWarehouseEntity invWarehouseEntity = invWarehouseService.findByInvSubByCode(bussinessChangeTypeEntity.getInvCode());
// outOrder.setInvCode(invWarehouseEntity.getCode());
// outOrder.setDeptCode(invWarehouseEntity.getParentId());
InvWarehouseEntity invWarehouseEntity = invWarehouseService.findByInvSubByCode(orderEntity.getInvCode());
outOrder.setInvCode(invWarehouseEntity.getCode());
outOrder.setDeptCode(invWarehouseEntity.getParentId());
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("additional_auto_submit");

@ -431,6 +431,8 @@ public class IoCheckInoutService {
bizEntity.setCheckSuccess(true);
codeEntity.setCheckSuccess(true);
bizEntity.setScanCount(codeEntity.getReCount());
ioOrderCheckResultResponse.setScanCount(bizEntity.getScanCount());
ioOrderCheckResultResponse.setCheckSuccess(true);
isPass = true;
orderCheckResultResponses.add(ioOrderCheckResultResponse);
break;
@ -456,6 +458,7 @@ public class IoCheckInoutService {
ioOrderCheckResultResponse.setSProductDate(codeEntity.getProductDate());
ioOrderCheckResultResponse.setSExpireDate(codeEntity.getExpireDate());
ioOrderCheckResultResponse.setCount(0);
ioOrderCheckResultResponse.setScanCount(codeEntity.getReCount());
orderCheckResultResponses.add(ioOrderCheckResultResponse);
}
}
@ -579,6 +582,7 @@ public class IoCheckInoutService {
if (orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_AUDITED) {
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_CHECK);
orderEntity.setUpdateTime(new Date());
orderEntity.setAuditTime(new Date());
orderService.update(orderEntity);
genInv(orderEntity, bussinessTypeEntity);
}
@ -661,8 +665,10 @@ public class IoCheckInoutService {
}
}
//校验是否是不入库存单据
if (bussinessTypeEntity.getBusType() == ConstantStatus.BUS_TYPE_NORMAL) {
if (bussinessTypeEntity.isInStock()) {
// if (bussinessTypeEntity.getBusType() == ConstantStatus.BUS_TYPE_NORMAL) {
//生成库存
if (bussinessTypeEntity.isPreIn()) {
genInvService.genPreInInv(orderEntity.getBillNo());

@ -4,9 +4,9 @@ server:
spring:
datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://192.168.0.66:3364/udi_spms_ljy?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_spms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: Glxp@6066
password: 123456
hikari:
connection-timeout: 60000
maximum-pool-size: 20

@ -3,17 +3,16 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.auth.DeptUserDao">
<select id="selectDeptUser" parameterType="com.glxp.api.req.auth.FilterDeptUserReqeust"
resultType="com.glxp.api.entity.auth.DeptUserEntity">>
SELECT *
FROM auth_dept_user
resultType="com.glxp.api.entity.auth.DeptUserEntity">
>
SELECT *
FROM auth_dept_user
<where>
<if test="deptId != null ">
<if test="deptId != null">
and deptId = #{deptId}
</if>
<if test="userId != null ">
<if test="userId != null">
and userId = #{userId}
</if>
</where>
@ -22,11 +21,15 @@
<select id="selectJoinDeptUser" 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
SELECT auth_dept_user.*,
auth_user.userName,
auth_user.employeeName,
auth_dept.`name` deptName,
auth_user.comments
FROM auth_dept_user
INNER JOIN auth_user
on auth_dept_user.userId = auth_user.id
INNER JOIN auth_dept on auth_dept_user.deptId = auth_dept.id
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}
@ -39,6 +42,7 @@
auth_user.employeeName like concat('%', #{key}, '%'))
</if>
</where>
group by auth_dept_user.userId
</select>
@ -64,27 +68,21 @@
>
delete
from auth_dept_user
where deptId in
where deptId in
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<insert id="insertBatch" keyProperty="id" parameterType="java.util.List">
insert INTO auth_dept_user
(
deptId,userId
)
values
(deptId, userId)
values
<foreach collection="list" item="item" index="index"
separator=",">
(
#{item.deptId},
#{item.userId}
)
(#{item.deptId},
#{item.userId})
</foreach>
</insert>
</mapper>

@ -84,7 +84,7 @@
AND auth_warehouse.advanceType = #{advanceType}
</if>
<if test="spUse != '' and spUse != null">
AND auth_dept.spUse = #{spUse}
AND auth_warehouse.spUse = #{spUse}
</if>
<if test="superiorCode != '' and superiorCode != null">
AND (auth_dept.code = #{superiorPcode}

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

@ -68,7 +68,7 @@
entrutSpms, codeFillCheck, defaultSubInv, defaultInv, orderVisibleType,
checkCopy, secCheckCopy, originAction, advanceType, changeEnable,
spUse, preIn, supplementAll, createUser, createTime, preInBack, vailDispatch,
vailGroupBuy, busType)
vailGroupBuy, busType, inStock)
values (#{mainAction},
#{action},
#{name},
@ -120,7 +120,7 @@
#{preIn},
#{supplementAll},
#{createUser},
#{createTime}, #{preInBack}, #{vailDispatch}, #{vailGroupBuy}#{busType})
#{createTime}, #{preInBack}, #{vailDispatch}, #{vailGroupBuy}#{busType}, #{inStock})
</insert>
<select id="selectBusList" resultType="com.glxp.api.entity.basic.BasicBussinessTypeEntity">

@ -587,7 +587,7 @@
isLock,
lockStatus, isAdavence, useMuti, useNum, supName, createTime, updateTime, modifyTime, createUser,
updateUser,
remark, useExpireTime, dispatch, groupBuy)
remark, useExpireTime, dispatch, groupBuy, needCert)
values (#{id},
#{uuid},
#{mainId},
@ -610,7 +610,7 @@
#{modifyTime},
#{createUser},
#{updateUser},
#{remark}, #{useExpireTime}, #{dispatch}, #{groupBuy})
#{remark}, #{useExpireTime}, #{dispatch}, #{groupBuy}, #{needCert})
</insert>
<insert id="insertUdiRelevanceignore" keyProperty="id"
@ -622,7 +622,7 @@
isLock,
lockStatus, isAdavence, useMuti, useNum, supName, createTime, updateTime, modifyTime, createUser,
updateUser,
remark, useExpireTime, dispatch, groupBuy)
remark, useExpireTime, dispatch, groupBuy, needCert)
values (#{id},
#{uuid},
#{mainId},
@ -645,7 +645,7 @@
#{modifyTime},
#{createUser},
#{updateUser},
#{remark}, #{useExpireTime}, #{dispatch}, #{groupBuy})
#{remark}, #{useExpireTime}, #{dispatch}, #{groupBuy}#{needCert})
</insert>
<delete id="deleteById" parameterType="Map">
@ -761,6 +761,9 @@
<if test="relCode != '' and relCode != null">
relCode=#{relCode},
</if>
<if test="needCert != null">
needCert=#{needCert},
</if>
</trim>
WHERE id = #{id}
</update>
@ -788,7 +791,7 @@
isLock,
lockStatus, isAdavence, useMuti, useNum, supName, createTime, updateTime, modifyTime, createUser,
updateUser,
remark, useExpireTime, dispatch, groupBuy)
remark, useExpireTime, dispatch, groupBuyneedCert)
values
<foreach collection="udiRelevanceEntities" item="item" index="index" separator=",">
@ -814,7 +817,7 @@
#{item.modifyTime},
#{item.createUser},
#{item.updateUser},
#{item.remark}, #{item.useExpireTime}, #{item.dispatch}, #{item.groupBuy})
#{item.remark}, #{item.useExpireTime}, #{item.dispatch}, #{item.groupBuy}#{item.needCert})
</foreach>
</insert>
@ -924,7 +927,7 @@
<select id="selectRelIdByNameCode" resultType="java.lang.String">
select basic_udirel.id
from basic_udirel
inner join basic_products on basic_udirel.uuid = basic_products.uuid
inner join basic_products on basic_udirel.uuid = basic_products.uuid
where basic_products.nameCode = #{nameCode}
</select>
</mapper>

@ -25,7 +25,7 @@
auth_warehouse.name invName,
ip.deptCode,
ip.invCode,
auth_space.name spaceName
as.name spaceName
from inv_product ip
inner join basic_udirel on ip.relIdFk = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid

@ -24,6 +24,8 @@ CALL Pro_Temp_ColumnWork('basic_udirel', 'needCert', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailDispatch', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailGroupBuy', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'busType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'inStock', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'batchNo', 'varchar(255) ', 1);

Loading…
Cancel
Save