diff --git a/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java b/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java index 699544b1..a84411cb 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java @@ -1,6 +1,7 @@ package com.glxp.api.controller.basic; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -13,7 +14,9 @@ import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.constant.BusinessType; import com.glxp.api.constant.ConstantType; import com.glxp.api.controller.BaseController; +import com.glxp.api.entity.auth.WarehouseBussinessTypeEntity; import com.glxp.api.entity.basic.BasicBussinessTypeEntity; +import com.glxp.api.req.auth.FilterInvBusTypeRequest; import com.glxp.api.req.basic.BusNoUserRequest; import com.glxp.api.req.basic.BussinessTypeSaveRequest; import com.glxp.api.req.basic.FilterBussinessTypeRequest; @@ -23,7 +26,10 @@ import com.glxp.api.res.basic.BasicBussinessTypeResponse; import com.glxp.api.res.basic.BussinessTypExportResponse; import com.glxp.api.res.basic.CandidateRequest; import com.glxp.api.service.auth.CustomerService; +import com.glxp.api.service.auth.InvBusUserService; +import com.glxp.api.service.auth.WarehouseBussinessTypeService; import com.glxp.api.service.basic.IBasicBussinessTypeService; +import com.glxp.api.service.inout.IoOrderService; import com.glxp.api.util.CustomUtil; import com.glxp.api.util.FileUtils; import lombok.extern.slf4j.Slf4j; @@ -54,6 +60,8 @@ public class BasicBussinessTypeController extends BaseController { private IBasicBussinessTypeService basicBussinessTypeService; @Resource private CustomerService customerService; + @Resource + WarehouseBussinessTypeService warehouseBussinessTypeService; /** * 查询单据类型列表 @@ -185,12 +193,33 @@ public class BasicBussinessTypeController extends BaseController { if (StrUtil.isNotEmpty(bussinessTypeFilterRequest.getVueType())) { + List result = new ArrayList<>(); List bussinessTypeEntities = basicBussinessTypeService.findByVueType(bussinessTypeFilterRequest.getVueType()); + if (StrUtil.isNotEmpty(bussinessTypeFilterRequest.getInvCode()) || StrUtil.isNotEmpty(bussinessTypeFilterRequest.getCode())) { + //过滤是否是当前仓库底下单据类型 + FilterBussinessTypeRequest tempRequest = new FilterBussinessTypeRequest(); + tempRequest.setCode(bussinessTypeFilterRequest.getCode()); + tempRequest.setInvCode(bussinessTypeFilterRequest.getInvCode()); + List bussinessTypeResponses = basicBussinessTypeService.filterJoinByInv(tempRequest); + if (CollUtil.isNotEmpty(bussinessTypeResponses)) { + for (BasicBussinessTypeResponse bussinessTypExportResponse : bussinessTypeResponses) { + for (BasicBussinessTypeEntity basicBussinessTypeEntity : bussinessTypeEntities) { + if (bussinessTypExportResponse.getAction().equals(basicBussinessTypeEntity.getAction())) { + result.add(basicBussinessTypeEntity); + } + } + } + + } + } else { + result.addAll(bussinessTypeEntities); + } + PageInfo pageInfo; - pageInfo = new PageInfo<>(bussinessTypeEntities); + pageInfo = new PageInfo<>(result); PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); pageSimpleResponse.setTotal(pageInfo.getTotal()); - pageSimpleResponse.setList(bussinessTypeEntities); + pageSimpleResponse.setList(result); return ResultVOUtils.success(pageSimpleResponse); } else { @@ -202,10 +231,10 @@ public class BasicBussinessTypeController extends BaseController { bussinessTypeFilterRequest); } else { //当前用户为供应商,查询单据类型添加允许供应商使用参数 - if (bussinessTypeFilterRequest.getSpUse() == null) + if (bussinessTypeFilterRequest.getSpUse() == null) { bussinessTypeFilterRequest.setSpUse(3); - bussinessTypeEntities = basicBussinessTypeService.filterJoinByInv( - bussinessTypeFilterRequest); + } + bussinessTypeEntities = basicBussinessTypeService.filterJoinByInv(bussinessTypeFilterRequest); } @@ -220,6 +249,10 @@ public class BasicBussinessTypeController extends BaseController { } + @Resource + IoOrderService orderService; + @Resource + InvBusUserService invBusUserService; /** * 删除单据类型 @@ -238,21 +271,24 @@ public class BasicBussinessTypeController extends BaseController { String id = deleteRequest.getId(); BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.selectById(id); - //TODO 单据使用绑定和仓库绑定校验未做,等其他模块功能做完之后进行完善 - /*OrderFilterRequest orderFilterRequest = new OrderFilterRequest(); - orderFilterRequest.setAction(bussinessTypeEntity.getAction()); - OrderEntity orderEntity = orderService.findOne(orderFilterRequest); - if (orderEntity != null) { + //判断是否存在该单据类型单据 + boolean isExitOrder = orderService.isExitByAction(bussinessTypeEntity.getAction()); + if (isExitOrder) { return ResultVOUtils.error(500, "已存在该类型扫码单据,无法删除!"); } + //判断是否被仓库绑定 + boolean isExitUser = invBusUserService.isExitByAction(bussinessTypeEntity.getAction()); + if (isExitUser) { + return ResultVOUtils.error(500, "该单据类型已被用户绑定,请先移除后删除!"); + } + + //判断是否被用户绑定 + boolean isExitInv = warehouseBussinessTypeService.isExitByAction(bussinessTypeEntity.getAction()); + if (isExitInv) { + return ResultVOUtils.error(500, "该单据类型已被仓库绑定,请先移除后删除!"); + } - FilterInvBusTypeRequest filterInvBusTypeRequest = new FilterInvBusTypeRequest(); - filterInvBusTypeRequest.setAction(bussinessTypeEntity.getAction()); - List warehouseBussinessTypeEntities = warehouseBussinessTypeService.filterList(filterInvBusTypeRequest); - if (CollUtil.isNotEmpty(warehouseBussinessTypeEntities)) { - return ResultVOUtils.error(500, "单据类型已被仓库分库绑定,无法删除"); - }*/ return basicBussinessTypeService.deleteBussinessType(id) == true ? ResultVOUtils.success("删除成功") : ResultVOUtils.error(500, "删除失败,系统繁忙"); } diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java index f2b06c58..819d5b1d 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java @@ -402,7 +402,7 @@ public class IoOrderReviewController extends BaseController { //前端第二次次验收 public BaseResponse thirdUpdateReview(AuthAdmin authAdmin, IoOrderEntity orderEntity) { orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_REW); - orderEntity.setReviewUser(authAdmin.getId() + ""); + orderEntity.setCheckUser(authAdmin.getId() + ""); orderEntity.setUpdateTime(new Date()); orderEntity.setCheckTime(new Date()); orderEntity.setDeliveryStatus(ConstantStatus.ORDER_DELIVERY_STATUS_ED); diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrProductsAddDiController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrProductsAddDiController.java index 9e61b177..eff18821 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrProductsAddDiController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrProductsAddDiController.java @@ -346,7 +346,6 @@ public class ThrProductsAddDiController { } - /** * 更新DI产品信息 * @@ -358,12 +357,12 @@ public class ThrProductsAddDiController { @Log(title = "DI产品信息", businessType = BusinessType.UPDATE) public BaseResponse updateThrAddDiProductsList() { - FilterThrProductsRequest filterThrProductsRequest=new FilterThrProductsRequest(); + FilterThrProductsRequest filterThrProductsRequest = new FilterThrProductsRequest(); filterThrProductsRequest.setStatus(2); filterThrProductsRequest.setDiType(1); - List thrProductsAddDiEntityList=thrProductsAddDiService.filterThrProductsDiLists(filterThrProductsRequest); + List thrProductsAddDiEntityList = thrProductsAddDiService.filterThrProductsDiLists(filterThrProductsRequest); - for (ThrProductsAddDiEntity thrProductsAddDiEntity:thrProductsAddDiEntityList){ + for (ThrProductsAddDiEntity thrProductsAddDiEntity : thrProductsAddDiEntityList) { thrProductsAddDiEntity.setAuditTime(new Date()); thrProductsAddDiEntity.setAuditUser(customerService.getUserId() + ""); thrProductsAddDiService.updateDiProduct(thrProductsAddDiEntity); diff --git a/src/main/java/com/glxp/api/dao/auth/WarehouseBussinessTypeDao.java b/src/main/java/com/glxp/api/dao/auth/WarehouseBussinessTypeDao.java index a55e75fc..0ab04879 100644 --- a/src/main/java/com/glxp/api/dao/auth/WarehouseBussinessTypeDao.java +++ b/src/main/java/com/glxp/api/dao/auth/WarehouseBussinessTypeDao.java @@ -1,5 +1,7 @@ package com.glxp.api.dao.auth; +import com.glxp.api.dao.BaseMapperPlus; +import com.glxp.api.entity.auth.InvBusUserEntity; import com.glxp.api.entity.auth.WarehouseBussinessTypeEntity; import com.glxp.api.req.auth.FilterInvBusTypeRequest; import org.apache.ibatis.annotations.Mapper; @@ -8,14 +10,14 @@ import org.apache.ibatis.annotations.Param; import java.util.List; @Mapper -public interface WarehouseBussinessTypeDao { +public interface WarehouseBussinessTypeDao extends BaseMapperPlus { WarehouseBussinessTypeEntity selectById(Integer id); int deleteByPrimaryKey(Integer id); int insert(WarehouseBussinessTypeEntity record); - int insertOrUpdate(WarehouseBussinessTypeEntity record); +// int insertOrUpdate(WarehouseBussinessTypeEntity record); int insertOrUpdateSelective(WarehouseBussinessTypeEntity record); @@ -47,4 +49,4 @@ public interface WarehouseBussinessTypeDao { * @return */ List selectByActions(@Param("subInvCode") String subInvCode, @Param("actions") List actions); -} \ No newline at end of file +} diff --git a/src/main/java/com/glxp/api/entity/auth/InvBusUserEntity.java b/src/main/java/com/glxp/api/entity/auth/InvBusUserEntity.java index 64fe937c..da7173c2 100644 --- a/src/main/java/com/glxp/api/entity/auth/InvBusUserEntity.java +++ b/src/main/java/com/glxp/api/entity/auth/InvBusUserEntity.java @@ -1,13 +1,24 @@ package com.glxp.api.entity.auth; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; + @Data +@TableName(value = "auth_user_bustype") public class InvBusUserEntity { + @TableId(value = "id", type = IdType.AUTO) private Integer id; + @TableField(value = "userId") private String userId; + @TableField(value = "subInvCode") private String subInvCode; + @TableField(value = "scAction") private String scAction; + @TableField(value = "remark") private String remark; } diff --git a/src/main/java/com/glxp/api/entity/auth/WarehouseBussinessTypeEntity.java b/src/main/java/com/glxp/api/entity/auth/WarehouseBussinessTypeEntity.java index a3d35858..1d403b21 100644 --- a/src/main/java/com/glxp/api/entity/auth/WarehouseBussinessTypeEntity.java +++ b/src/main/java/com/glxp/api/entity/auth/WarehouseBussinessTypeEntity.java @@ -1,31 +1,41 @@ package com.glxp.api.entity.auth; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; /** * 仓库字典-单据类型关联表 */ @Data +@TableName(value = "auth_warehouse_bustype") public class WarehouseBussinessTypeEntity { /** * id */ + @TableId(value = "id", type = IdType.AUTO) private Integer id; /** * 仓位码 */ + @TableField(value = "code") private String code; /** * 业务类型 */ + @TableField(value = "action") private String action; /** * 业务名称 */ + @TableField(value = "name") private String name; + @TableField(exist = false) private boolean select; -} \ No newline at end of file +} diff --git a/src/main/java/com/glxp/api/entity/auth/WarehouseUserEntity.java b/src/main/java/com/glxp/api/entity/auth/WarehouseUserEntity.java index 7fb18e6b..1f4698cd 100644 --- a/src/main/java/com/glxp/api/entity/auth/WarehouseUserEntity.java +++ b/src/main/java/com/glxp/api/entity/auth/WarehouseUserEntity.java @@ -34,4 +34,4 @@ public class WarehouseUserEntity { private String employeeName; -} \ No newline at end of file +} diff --git a/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java b/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java index 10030eac..8de2b3ae 100644 --- a/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java +++ b/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java @@ -111,6 +111,10 @@ public class IoOrderEntity { @TableField(value = "auditTime") private Date auditTime; + + @TableField(value = "checkUser") + private String checkUser; + @TableField(value = "checkTime") private Date checkTime; diff --git a/src/main/java/com/glxp/api/idc/utils/TableUtils.java b/src/main/java/com/glxp/api/idc/utils/TableUtils.java index 7142172f..750f8032 100644 --- a/src/main/java/com/glxp/api/idc/utils/TableUtils.java +++ b/src/main/java/com/glxp/api/idc/utils/TableUtils.java @@ -21,7 +21,7 @@ public class TableUtils { "/productCert/sup_cert/id/productId/productIdFk/updateTime/filePath/type=3/产品资质证书信息", "//udicompany/id///updateTime///国际库医疗器械注册人信息", "basicType//basic_hosp_type/id///updateTime///物资字典分类", - "//io_order_invoice/id///updateTime/filePath//发票信息", + "//io_order_invoice/id///updateTime/licenseUrl//发票信息", }; diff --git a/src/main/java/com/glxp/api/res/inout/IoOrderResponse.java b/src/main/java/com/glxp/api/res/inout/IoOrderResponse.java index c64a0fac..940b6d74 100644 --- a/src/main/java/com/glxp/api/res/inout/IoOrderResponse.java +++ b/src/main/java/com/glxp/api/res/inout/IoOrderResponse.java @@ -176,6 +176,8 @@ public class IoOrderResponse { */ private String reviewUserName; + private String checkUserName; + /** * 往来单位名称 */ diff --git a/src/main/java/com/glxp/api/res/inv/InvPreinOrderResponse.java b/src/main/java/com/glxp/api/res/inv/InvPreinOrderResponse.java index 8b8168e1..8a01efc9 100644 --- a/src/main/java/com/glxp/api/res/inv/InvPreinOrderResponse.java +++ b/src/main/java/com/glxp/api/res/inv/InvPreinOrderResponse.java @@ -73,6 +73,7 @@ public class InvPreinOrderResponse { private String createUserName; private String updateUserName; private String reviewUserName; + private String checkUserName; private String fromCorpName; private String deptName; diff --git a/src/main/java/com/glxp/api/service/auth/InvBusUserService.java b/src/main/java/com/glxp/api/service/auth/InvBusUserService.java index 05b82be2..0499d190 100644 --- a/src/main/java/com/glxp/api/service/auth/InvBusUserService.java +++ b/src/main/java/com/glxp/api/service/auth/InvBusUserService.java @@ -5,6 +5,7 @@ import com.glxp.api.entity.auth.InvBusUserEntity; import com.glxp.api.entity.auth.WarehouseBussinessTypeEntity; import com.glxp.api.req.auth.FilterInvBusUserRequest; import com.glxp.api.res.auth.InvBusUserResponse; + import java.util.List; public interface InvBusUserService { @@ -24,6 +25,10 @@ public interface InvBusUserService { boolean deleteById(String id); boolean deleteByUnion(String userId, String subInvCode); - boolean deleteByscAction( String subInvCode, List selectedCodes); + + boolean deleteByscAction(String subInvCode, List selectedCodes); + + + boolean isExitByAction(String action); } diff --git a/src/main/java/com/glxp/api/service/auth/WarehouseBussinessTypeService.java b/src/main/java/com/glxp/api/service/auth/WarehouseBussinessTypeService.java index 20341e8f..eac6ed96 100644 --- a/src/main/java/com/glxp/api/service/auth/WarehouseBussinessTypeService.java +++ b/src/main/java/com/glxp/api/service/auth/WarehouseBussinessTypeService.java @@ -51,4 +51,7 @@ public interface WarehouseBussinessTypeService { */ List selectByActions(String subInvCode, List actions); + + boolean isExitByAction(String action); + } diff --git a/src/main/java/com/glxp/api/service/auth/impl/InvBusUserServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/InvBusUserServiceImpl.java index b4c43889..0a0b2f3a 100644 --- a/src/main/java/com/glxp/api/service/auth/impl/InvBusUserServiceImpl.java +++ b/src/main/java/com/glxp/api/service/auth/impl/InvBusUserServiceImpl.java @@ -1,6 +1,7 @@ package com.glxp.api.service.auth.impl; import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.pagehelper.PageHelper; import com.glxp.api.dao.auth.InvBusUserDao; import com.glxp.api.entity.auth.InvBusUserEntity; @@ -98,10 +99,15 @@ public class InvBusUserServiceImpl implements InvBusUserService { } @Override - public boolean deleteByscAction(String subInvCode,List selectedCodes) { + public boolean deleteByscAction(String subInvCode, List selectedCodes) { if (CollectionUtils.isEmpty(selectedCodes) || StrUtil.isEmpty(subInvCode)) { return false; } - return invBusUserDao.deleteByscAction(subInvCode,selectedCodes); + return invBusUserDao.deleteByscAction(subInvCode, selectedCodes); + } + + @Override + public boolean isExitByAction(String action) { + return invBusUserDao.exists(new QueryWrapper().eq("scAction", action)); } } diff --git a/src/main/java/com/glxp/api/service/auth/impl/WarehouseBussinessTypeServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/WarehouseBussinessTypeServiceImpl.java index 2ca38493..a7bbb12e 100644 --- a/src/main/java/com/glxp/api/service/auth/impl/WarehouseBussinessTypeServiceImpl.java +++ b/src/main/java/com/glxp/api/service/auth/impl/WarehouseBussinessTypeServiceImpl.java @@ -1,6 +1,7 @@ package com.glxp.api.service.auth.impl; import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.pagehelper.PageHelper; import com.glxp.api.dao.auth.WarehouseBussinessTypeDao; import com.glxp.api.entity.auth.WarehouseBussinessTypeEntity; @@ -99,4 +100,9 @@ public class WarehouseBussinessTypeServiceImpl implements WarehouseBussinessType public List selectByActions(String subInvCode, List actions) { return warehouseBussinessTypeDao.selectByActions(subInvCode, actions); } + + @Override + public boolean isExitByAction(String action) { + return warehouseBussinessTypeDao.exists(new QueryWrapper().eq("action", action)); + } } diff --git a/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java b/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java index f40b0a7a..b43771e8 100644 --- a/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java +++ b/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java @@ -151,17 +151,21 @@ public class IoAddInoutService { insertList.clear(); return; } - //三期校验 - String checkOriginMsg = checkOriginCode(warehouseEntity); - if (StrUtil.isNotEmpty(checkOriginMsg)) { - orderEntity.setErrMsg(checkOriginMsg); - orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR); - orderEntity.setUpdateTime(new Date()); - orderService.update(orderEntity); - insertList.clear(); - return; + + if (bussinessTypeEntity.isCodeFillCheck()) { + //三期校验 + String checkOriginMsg = checkOriginCode(warehouseEntity); + if (StrUtil.isNotEmpty(checkOriginMsg)) { + orderEntity.setErrMsg(checkOriginMsg); + orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR); + orderEntity.setUpdateTime(new Date()); + orderService.update(orderEntity); + insertList.clear(); + return; + } } + //产品是否已维护已关联 if ((warehouseEntity.getRelId() == null)) { orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR); diff --git a/src/main/java/com/glxp/api/service/inout/IoOrderService.java b/src/main/java/com/glxp/api/service/inout/IoOrderService.java index a288ee0b..ca1b8386 100644 --- a/src/main/java/com/glxp/api/service/inout/IoOrderService.java +++ b/src/main/java/com/glxp/api/service/inout/IoOrderService.java @@ -119,4 +119,7 @@ public interface IoOrderService { * @return */ BaseResponse submitToThrSys(String billNo); + + + boolean isExitByAction(String action); } diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java index 72a0bf0b..939f764b 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java @@ -727,6 +727,11 @@ public class IoOrderServiceImpl implements IoOrderService { } } + @Override + public boolean isExitByAction(String action) { + return orderDao.exists(new QueryWrapper().eq("action", action)); + } + /** * 查询此单据关联的所有单据 * diff --git a/src/main/resources/mybatis/mapper/auth/WarehouseBussinessTypeDao.xml b/src/main/resources/mybatis/mapper/auth/WarehouseBussinessTypeDao.xml index f081c5dd..a5348b50 100644 --- a/src/main/resources/mybatis/mapper/auth/WarehouseBussinessTypeDao.xml +++ b/src/main/resources/mybatis/mapper/auth/WarehouseBussinessTypeDao.xml @@ -22,17 +22,16 @@ - delete from auth_warehouse_bustype + delete + from auth_warehouse_bustype where id = #{id,jdbcType=INTEGER} - insert into auth_warehouse_bustype (code, `action`, `name` - ) - values (#{code,jdbcType=VARCHAR}, #{action,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR} - ) + insert into auth_warehouse_bustype (code, `action`, `name`) + values (#{code,jdbcType=VARCHAR}, #{action,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}) @@ -81,9 +80,9 @@ update auth_warehouse_bustype - set code = #{code,jdbcType=VARCHAR}, - `action` = #{action,jdbcType=VARCHAR}, - `name` = #{name,jdbcType=VARCHAR} + set code = #{code,jdbcType=VARCHAR}, + `action` = #{action,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR} where id = #{id,jdbcType=INTEGER} @@ -145,44 +144,43 @@ insert into auth_warehouse_bustype - (code, `action`, `name`) - values + (code, `action`, `name`) + values - (#{item.code,jdbcType=VARCHAR}, #{item.action,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR} - ) + (#{item.code,jdbcType=VARCHAR}, #{item.action,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}) - - - insert into auth_warehouse_bustype - - - id, - - code, - `action`, - `name`, - - values - - - #{id,jdbcType=INTEGER}, - - #{code,jdbcType=VARCHAR}, - #{action,jdbcType=VARCHAR}, - #{name,jdbcType=VARCHAR}, - - on duplicate key update - - - id = #{id,jdbcType=INTEGER}, - - code = #{code,jdbcType=VARCHAR}, - `action` = #{action,jdbcType=VARCHAR}, - `name` = #{name,jdbcType=VARCHAR}, - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -239,14 +237,15 @@ auth_warehouse_bustype.action, basic_bussiness_type.name 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 code = #{code} @@ -284,9 +282,11 @@ - \ No newline at end of file + diff --git a/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml b/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml index ab5ed1b1..a487d249 100644 --- a/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml @@ -9,6 +9,7 @@ (select employeeName from auth_user au where au.id = io.createUser) createUserName, (select employeeName from auth_user au2 where au2.id = io.updateUser) updateUserName, (select employeeName from auth_user au3 where au3.id = io.reviewUser) reviewUserName, + (select employeeName from auth_user au4 where au4.id = io.checkUser) checkUserName, (select name from auth_dept ad2 where ad2.code = io.fromDeptCode) fromDeptName, (select name from auth_warehouse aw2 where aw2.code = io.fromInvCode) fromInvName, (select name from basic_corp bc where bc.erpId = io.fromCorp) fromCorpName, @@ -99,11 +100,12 @@ or ( - `action` in + `action` in #{item} - and status = 7 - ) + + and status = 7 + ) @@ -151,7 +153,8 @@ AND busType = #{busType} - AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') + AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and + date_format(#{endTime}, '%Y-%m-%d') order by createTime desc @@ -183,6 +186,7 @@ (select employeeName from auth_user au where au.id = io.createUser) createUserName, (select employeeName from auth_user au2 where au2.id = io.updateUser) updateUserName, (select employeeName from auth_user au3 where au3.id = io.reviewUser) reviewUserName, + (select employeeName from auth_user au4 where au4.id = io.checkUser) checkUserName, (select name from auth_dept ad2 where ad2.code = io.fromDeptCode) fromDeptName, (select name from auth_warehouse aw2 where aw2.code = io.fromInvCode) fromInvName, (select name from basic_corp bc where bc.erpId = io.fromCorp) fromCorpName, @@ -206,7 +210,8 @@ AND invCode = #{invCode} - AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') + AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and + date_format(#{endTime}, '%Y-%m-%d') AND date_format(createTime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d') diff --git a/src/main/resources/mybatis/mapper/inv/InvPreinOrderDao.xml b/src/main/resources/mybatis/mapper/inv/InvPreinOrderDao.xml index 4bd97c9d..774b1746 100644 --- a/src/main/resources/mybatis/mapper/inv/InvPreinOrderDao.xml +++ b/src/main/resources/mybatis/mapper/inv/InvPreinOrderDao.xml @@ -7,10 +7,11 @@ (select name from basic_bussiness_type bus where bus.action = io.action) billTypeName, (select name from auth_dept ad where ad.code = io.deptCode) deptName, (select name from auth_warehouse aw where aw.code = io.invCode) invName, - ( SELECT fromType FROM io_order ior WHERE ior.billNo = io.billNo ) orderFromType, + (SELECT fromType FROM io_order ior WHERE ior.billNo = io.billNo) orderFromType, (select employeeName from auth_user au where au.id = io.createUser) createUserName, (select employeeName from auth_user au2 where au2.id = io.updateUser) updateUserName, (select employeeName from auth_user au3 where au3.id = io.reviewUser) reviewUserName, + (select employeeName from auth_user au4 where au4.id = io.checkUser) checkUserName, (select name from basic_corp bc where bc.erpId = io.fromCorp) fromCorpName from inv_prein_order as io @@ -22,7 +23,7 @@ AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and - date_format(#{endTime}, '%Y-%m-%d') + date_format(#{endTime}, '%Y-%m-%d') AND date_format(createTime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d') diff --git a/src/main/resources/schemas/schema_v2.1.sql b/src/main/resources/schemas/schema_v2.1.sql index 947b9db3..5c47c43d 100644 --- a/src/main/resources/schemas/schema_v2.1.sql +++ b/src/main/resources/schemas/schema_v2.1.sql @@ -10,6 +10,8 @@ CALL Pro_Temp_ColumnWork('io_order', 'processStatus', 'tinyint ', 1); CALL Pro_Temp_ColumnWork('io_order', 'suppleCount', 'tinyint ', 1); CALL Pro_Temp_ColumnWork('io_order', 'relKey', 'varchar(255) ', 1); CALL Pro_Temp_ColumnWork('io_order', 'checkTime', 'datetime ', 1); +CALL Pro_Temp_ColumnWork('io_order', 'checkUser', 'varchar(255) ', 1); + CALL Pro_Temp_ColumnWork('io_code_lost', 'nameCode', 'varchar(255) ', 1);