新增单据类型删除时校验单据,用户,仓库是否存在,

新增页面单据类型关联仓库查询,新增单据核对人,更改核对时间
master
anthonywj 2 years ago
parent 8fc19cfeb0
commit f8437f1c1a

@ -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<BasicBussinessTypeEntity> result = new ArrayList<>();
List<BasicBussinessTypeEntity> 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<BasicBussinessTypeResponse> 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<BasicBussinessTypeEntity> pageInfo;
pageInfo = new PageInfo<>(bussinessTypeEntities);
pageInfo = new PageInfo<>(result);
PageSimpleResponse<BasicBussinessTypeEntity> 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<WarehouseBussinessTypeEntity> warehouseBussinessTypeEntities = warehouseBussinessTypeService.filterList(filterInvBusTypeRequest);
if (CollUtil.isNotEmpty(warehouseBussinessTypeEntities)) {
return ResultVOUtils.error(500, "单据类型已被仓库分库绑定,无法删除");
}*/
return basicBussinessTypeService.deleteBussinessType(id) == true ? ResultVOUtils.success("删除成功") : ResultVOUtils.error(500, "删除失败,系统繁忙");
}

@ -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);

@ -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<ThrProductsAddDiEntity> thrProductsAddDiEntityList=thrProductsAddDiService.filterThrProductsDiLists(filterThrProductsRequest);
List<ThrProductsAddDiEntity> thrProductsAddDiEntityList = thrProductsAddDiService.filterThrProductsDiLists(filterThrProductsRequest);
for (ThrProductsAddDiEntity thrProductsAddDiEntity:thrProductsAddDiEntityList){
for (ThrProductsAddDiEntity thrProductsAddDiEntity : thrProductsAddDiEntityList) {
thrProductsAddDiEntity.setAuditTime(new Date());
thrProductsAddDiEntity.setAuditUser(customerService.getUserId() + "");
thrProductsAddDiService.updateDiProduct(thrProductsAddDiEntity);

@ -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<WarehouseBussinessTypeDao, WarehouseBussinessTypeEntity, WarehouseBussinessTypeEntity> {
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<WarehouseBussinessTypeEntity> selectByActions(@Param("subInvCode") String subInvCode, @Param("actions") List<String> actions);
}
}

@ -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;
}

@ -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;
}
}

@ -34,4 +34,4 @@ public class WarehouseUserEntity {
private String employeeName;
}
}

@ -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;

@ -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//发票信息",
};

@ -176,6 +176,8 @@ public class IoOrderResponse {
*/
private String reviewUserName;
private String checkUserName;
/**
*
*/

@ -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;

@ -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<String> selectedCodes);
boolean deleteByscAction(String subInvCode, List<String> selectedCodes);
boolean isExitByAction(String action);
}

@ -51,4 +51,7 @@ public interface WarehouseBussinessTypeService {
*/
List<WarehouseBussinessTypeEntity> selectByActions(String subInvCode, List<String> actions);
boolean isExitByAction(String action);
}

@ -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<String> selectedCodes) {
public boolean deleteByscAction(String subInvCode, List<String> 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<InvBusUserEntity>().eq("scAction", action));
}
}

@ -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<WarehouseBussinessTypeEntity> selectByActions(String subInvCode, List<String> actions) {
return warehouseBussinessTypeDao.selectByActions(subInvCode, actions);
}
@Override
public boolean isExitByAction(String action) {
return warehouseBussinessTypeDao.exists(new QueryWrapper<WarehouseBussinessTypeEntity>().eq("action", action));
}
}

@ -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);

@ -119,4 +119,7 @@ public interface IoOrderService {
* @return
*/
BaseResponse submitToThrSys(String billNo);
boolean isExitByAction(String action);
}

@ -727,6 +727,11 @@ public class IoOrderServiceImpl implements IoOrderService {
}
}
@Override
public boolean isExitByAction(String action) {
return orderDao.exists(new QueryWrapper<IoOrderEntity>().eq("action", action));
}
/**
*
*

@ -22,17 +22,16 @@
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete from auth_warehouse_bustype
delete
from auth_warehouse_bustype
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
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})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
@ -81,9 +80,9 @@
<update id="updateByPrimaryKey" parameterType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity">
<!--@mbg.generated-->
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}
</update>
<update id="updateBatch" parameterType="java.util.List">
@ -145,44 +144,43 @@
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into auth_warehouse_bustype
(code, `action`, `name`)
values
(code, `action`, `name`)
values
<foreach collection="list" item="item" separator=",">
(#{item.code,jdbcType=VARCHAR}, #{item.action,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}
)
(#{item.code,jdbcType=VARCHAR}, #{item.action,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR})
</foreach>
</insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into auth_warehouse_bustype
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
code,
`action`,
`name`,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{code,jdbcType=VARCHAR},
#{action,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
code = #{code,jdbcType=VARCHAR},
`action` = #{action,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
</trim>
</insert>
<!-- <insert id="insertOrUpdate" keyColumn="id" keyProperty="id"-->
<!-- parameterType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity" useGeneratedKeys="true">-->
<!-- &lt;!&ndash;@mbg.generated&ndash;&gt;-->
<!-- insert into auth_warehouse_bustype-->
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
<!-- <if test="id != null">-->
<!-- id,-->
<!-- </if>-->
<!-- code,-->
<!-- `action`,-->
<!-- `name`,-->
<!-- </trim>-->
<!-- values-->
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
<!-- <if test="id != null">-->
<!-- #{id,jdbcType=INTEGER},-->
<!-- </if>-->
<!-- #{code,jdbcType=VARCHAR},-->
<!-- #{action,jdbcType=VARCHAR},-->
<!-- #{name,jdbcType=VARCHAR},-->
<!-- </trim>-->
<!-- on duplicate key update-->
<!-- <trim suffixOverrides=",">-->
<!-- <if test="id != null">-->
<!-- id = #{id,jdbcType=INTEGER},-->
<!-- </if>-->
<!-- code = #{code,jdbcType=VARCHAR},-->
<!-- `action` = #{action,jdbcType=VARCHAR},-->
<!-- `name` = #{name,jdbcType=VARCHAR},-->
<!-- </trim>-->
<!-- </insert>-->
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
@ -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}
</select>
<select id="filterList" parameterType="com.glxp.api.req.auth.FilterInvBusTypeRequest"
resultType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity">
SELECT * FROM auth_warehouse_bustype
SELECT *
FROM auth_warehouse_bustype
<where>
<if test="id != '' and id != null">
AND id = #{id}
@ -258,7 +257,6 @@
AND `action` = #{action}
</if>
</where>
</select>
<select id="selectById" resultMap="BaseResultMap">
select *
@ -272,7 +270,7 @@
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}
</select>
@ -284,9 +282,11 @@
</delete>
<select id="selectByActions" resultType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity">
select * from auth_warehouse_bustype where code = #{subInvCode} and action in
select *
from auth_warehouse_bustype where code = #{subInvCode}
and action in
<foreach collection="actions" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
</mapper>
</mapper>

@ -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 @@
</if>
<if test="invoiceActions2 != null and invoiceActions2.size() != 0">
or (
`action` in
`action` in
<foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach> and status = 7
)
</foreach>
and status = 7
)
</if>
</if>
</where>
@ -151,7 +153,8 @@
AND busType = #{busType}
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
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')
</if>
</where>
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}
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
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')
</if>
<if test="startTime != null and startTime != '' and (endTime == null or endTime == '')">
AND date_format(createTime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d')

@ -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
<where>
@ -22,7 +23,7 @@
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
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')
</if>
<if test="startTime != null and startTime != '' and (endTime == null or endTime == '')">
AND date_format(createTime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d')

@ -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);

Loading…
Cancel
Save