代码备份

workplace
yewj 10 months ago
parent 4dac4209af
commit b1eca2aab3

@ -59,5 +59,9 @@ public interface RedissonCacheKey {
* *
*/ */
String INV_COUNT_SUBMIT_ORDER = "inv_count_submit_order"; String INV_COUNT_SUBMIT_ORDER = "inv_count_submit_order";
/**
*
*/
String RM_WORK_BUS_TYPE = "rmWorkBusType";
} }

@ -104,7 +104,7 @@ public class BasicCollectPointCategoryController extends BaseController {
SysWorkplace sysWorkplace = sysWorkplaceService.getOne(new LambdaQueryWrapper<SysWorkplace>().eq(SysWorkplace::getConstituencies, basicCollectPointCategory.getCode()).last("limit 1")); SysWorkplace sysWorkplace = sysWorkplaceService.getOne(new LambdaQueryWrapper<SysWorkplace>().eq(SysWorkplace::getConstituencies, basicCollectPointCategory.getCode()).last("limit 1"));
if (sysWorkplace != null) { if (sysWorkplace != null) {
return ResultVOUtils.error(500, "删除失败,请先移除该组别下的用户"); return ResultVOUtils.error(500, "删除失败,请先移除该组别下的工位");
} }
QueryWrapper wrapper = new QueryWrapper(); QueryWrapper wrapper = new QueryWrapper();

@ -45,7 +45,7 @@ public class BasicCollectUserController {
@PostMapping("/udiwms/sysWorkplace/userBindWork") @PostMapping("/udiwms/sysWorkplace/userBindWork")
public BaseResponse userBindWork(@RequestBody BasicCollectUserRequest request) { public BaseResponse userBindWork(@RequestBody BasicCollectUserRequest request) {
Boolean save = basicCollectUserService.bindWorkplace(request); Boolean save = basicCollectUserService.bindWorkplace(request);
if (!save) { if (!save) {
return ResultVOUtils.error("该用户已经绑定该工位"); return ResultVOUtils.error("该用户已经绑定该工位");
} }
@ -53,12 +53,10 @@ public class BasicCollectUserController {
} }
@PostMapping("/udiwms/sysWorkplace/delUserBindWork") @PostMapping("/udiwms/sysWorkplace/delUserBindWork")
public BaseResponse delUserBindWork(@RequestBody BasicCollectUserEntity entity) { public BaseResponse delUserBindWork(@RequestBody BasicCollectUserEntity entity) {
boolean remove = basicCollectUserService.removeById(entity); boolean remove = basicCollectUserService.removeById(entity);
if (!remove){ if (!remove) {
return ResultVOUtils.error("删除失败"); return ResultVOUtils.error("删除失败");
} }
return ResultVOUtils.success("删除成功!"); return ResultVOUtils.success("删除成功!");

@ -4,8 +4,10 @@ package com.glxp.api.controller.basic;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.CusRedissonAnnotation;
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.RedissonCacheKey;
import com.glxp.api.controller.BaseController; import com.glxp.api.controller.BaseController;
import com.glxp.api.entity.basic.SysWorkplaceDocumentEntity; import com.glxp.api.entity.basic.SysWorkplaceDocumentEntity;
import com.glxp.api.req.basic.WorkBindBusTypeRequest; import com.glxp.api.req.basic.WorkBindBusTypeRequest;
@ -83,6 +85,7 @@ public class SysWorkplaceDocumentController extends BaseController {
return ResultVOUtils.success("更新成功"); return ResultVOUtils.success("更新成功");
} }
@CusRedissonAnnotation(cacheName = RedissonCacheKey.RM_WORK_BUS_TYPE, key = {"#entity.documentTypeCode"}, waitTime = 3, timeOutMsg = "请勿重复提交")
@PostMapping("/udiwms/sysWorkplace/removeBusTypeById") @PostMapping("/udiwms/sysWorkplace/removeBusTypeById")
public BaseResponse removeBusTypeById(@RequestBody SysWorkplaceDocumentEntity entity) { public BaseResponse removeBusTypeById(@RequestBody SysWorkplaceDocumentEntity entity) {
Boolean save = sysWorkplaceDocumentService.removeById(entity.getId()); Boolean save = sysWorkplaceDocumentService.removeById(entity.getId());

@ -531,7 +531,7 @@ public class IoOrderController extends BaseController {
public BaseResponse checkSubmitEnable(IoOrderEntity orderEntity) { public BaseResponse checkSubmitEnable(IoOrderEntity orderEntity) {
if (orderEntity == null) { if (orderEntity == null) {
return ResultVOUtils.error(500, "提交失败,请先添加物资"); return ResultVOUtils.error(500, "请先录入单据信息");
} }
if (orderEntity.getStatus() == ORDER_STATUS_CHECK_PROCESS || orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_PROCESS if (orderEntity.getStatus() == ORDER_STATUS_CHECK_PROCESS || orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_PROCESS
|| orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_PROCESSING) { || orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_PROCESSING) {

@ -116,5 +116,11 @@ public class SysWorkplaceDocumentEntity {
@TableField(value = "orderCirType") @TableField(value = "orderCirType")
private Integer orderCirType; private Integer orderCirType;
/**
* 1:; 2:
*/
@TableField(value = "inoutType")
private Integer inoutType;
} }

@ -1,5 +1,6 @@
package com.glxp.api.res.basic; package com.glxp.api.res.basic;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -114,5 +115,22 @@ public class SysWorkplaceDocumentResponse {
*/ */
@TableField(value = "orderCirType") @TableField(value = "orderCirType")
private Integer orderCirType; private Integer orderCirType;
/**
* 1:; 2:
*/
private Integer inoutType;
private String innerBusName;
private String outBusName;
private String thrBusName;
public String getThrBusName() {
if (StrUtil.isNotEmpty(innerBusName))
return innerBusName;
else if (StrUtil.isNotEmpty(outBusName)) {
return outBusName;
}
return thrBusName;
}
} }

@ -16,8 +16,7 @@ import java.util.Date;
*/ */
@Data @Data
public class UserWorkResponse { public class UserWorkResponse {
private String id; private String id;
@ -42,15 +41,12 @@ public class UserWorkResponse {
private Date updateTime; private Date updateTime;
private String chargeUser; private String chargeUser;
private Long constituencies; private Long constituencies;
private Integer operationType; private Integer operationType;
@ -60,7 +56,6 @@ public class UserWorkResponse {
private Integer warnType; private Integer warnType;
private String unitTittle; private String unitTittle;
@ -84,6 +79,4 @@ public class UserWorkResponse {
} }

@ -991,7 +991,7 @@ public class IoAddInoutService {
public BaseResponse checkSubmitEnable(IoOrderEntity orderEntity) { public BaseResponse checkSubmitEnable(IoOrderEntity orderEntity) {
if (orderEntity == null) { if (orderEntity == null) {
return ResultVOUtils.error(500, "提交失败,请先添加物资"); return ResultVOUtils.error(500, "请先录入单据信息");
} }
if (orderEntity.getStatus() == ORDER_STATUS_CHECK_PROCESS || orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_PROCESS if (orderEntity.getStatus() == ORDER_STATUS_CHECK_PROCESS || orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_PROCESS
|| orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_PROCESSING) { || orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_PROCESSING) {

@ -2,30 +2,39 @@
<!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.BasicCollectUserMapper"> <mapper namespace="com.glxp.api.dao.basic.BasicCollectUserMapper">
<select id="filterList" resultType="com.glxp.api.res.basic.UserWorkResponse"> <select id="filterList" resultType="com.glxp.api.res.basic.UserWorkResponse">
select bcu.id,sw.workplaceName,sw.invCode,sw.workplaceId,sw.constituencies, select bcu.id,
au.userName,au.employeeName,sw.createTime as createTime,sw.workplaceStatus,sw.workplaceType,sw.invRemindNumber,ad.name deptCodeName sw.workplaceName,
from basic_collect_user bcu sw.invCode,
left join auth_user au on bcu.userId = au.id sw.workplaceId,
left join sys_workplace sw on bcu.workplaceCode = sw.workplaceId sw.constituencies,
left join auth_dept ad on ad.code = sw.deptCode au.userName,
au.employeeName,
sw.createTime as createTime,
sw.workplaceStatus,
sw.workplaceType,
sw.invRemindNumber,
ad.name deptCodeName
from basic_collect_user bcu
left join auth_user au on bcu.userId = au.id
left join sys_workplace sw on bcu.workplaceCode = sw.workplaceId
left join auth_dept ad on ad.code = sw.deptCode
<where> <where>
<if test=" userId != null and userId != ''"> <if test="userId != null and userId != ''">
AND bcu.userId = #{userId} AND bcu.userId = #{userId}
</if> </if>
<if test=" workplaceCode != null and workplaceCode != ''"> <if test="workplaceCode != null and workplaceCode != ''">
AND bcu.workplaceCode = #{workplaceCode} AND bcu.workplaceCode = #{workplaceCode}
</if> </if>
<if test="userKey != null and userKey != ''"> <if test="userKey != null and userKey != ''">
AND (au.employeeName like concat('%', #{userKey}, '%') AND (au.employeeName like concat('%', #{userKey}, '%')
or au.userName like concat('%', #{userKey}, '%') or au.userName like concat('%', #{userKey}, '%')
) )
</if> </if>
<if test="workKey != null and workKey != ''"> <if test="workKey != null and workKey != ''">
AND (sw.workplaceName like concat('%', #{workKey}, '%') AND (sw.workplaceName like concat('%', #{workKey}, '%')
or sw.workplaceId like concat('%', #{workKey}, '%') or sw.workplaceId like concat('%', #{workKey}, '%')
) )
</if> </if>
</where> </where>
</select> </select>
</mapper> </mapper>

@ -1,11 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!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.SysWorkplaceDocumentDao"> <mapper namespace="com.glxp.api.dao.basic.SysWorkplaceDocumentDao">
<select id="filterList" resultType="com.glxp.api.res.basic.SysWorkplaceDocumentResponse"> <select id="filterList" resultType="com.glxp.api.res.basic.SysWorkplaceDocumentResponse">
select sys_workplace_document.*,aw.name invName select sys_workplace_document.*,
from sys_workplace_document aw.name invName,
left join auth_warehouse aw on aw.code = sys_workplace_document.invCode basic_bussiness_type.name innerBusName,
basic_collect_bustype.name outBusName
from sys_workplace_document
left join auth_warehouse aw on aw.code = sys_workplace_document.invCode
left join basic_bussiness_type on sys_workplace_document.documentTypeCode = basic_bussiness_type.action
left join basic_collect_bustype on basic_collect_bustype.fromBusTypeCode = sys_workplace_document.documentTypeCode
<where> <where>
<if test="workplaceCode != '' and workplaceCode != null"> <if test="workplaceCode != '' and workplaceCode != null">
AND workplaceCode = #{workplaceCode} AND workplaceCode = #{workplaceCode}
@ -15,8 +20,8 @@
</if> </if>
<if test="busKey != null and busKey != ''"> <if test="busKey != null and busKey != ''">
AND (sys_workplace_document.documentTypeCode like concat('%', #{busKey}, '%') AND (sys_workplace_document.documentTypeCode like concat('%', #{busKey}, '%')
or sys_workplace_document.busName like concat('%', #{busKey}, '%') or sys_workplace_document.busName like concat('%', #{busKey}, '%')
) )
</if> </if>
</where> </where>
</select> </select>

Loading…
Cancel
Save