1.添加单据上传接收日志查询,删除接口
parent
70b4ccef64
commit
c6ce533caf
@ -1,4 +1,4 @@
|
||||
package com.glxp.api.controller.system;
|
||||
package com.glxp.api.controller.thrsys;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.glxp.api.entity.system.ThirdSysApiEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.glxp.api.controller.system;
|
||||
package com.glxp.api.controller.thrsys;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.glxp.api.annotation.AuthRuleAnnotation;
|
@ -0,0 +1,52 @@
|
||||
package com.glxp.api.controller.thrsys;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.glxp.api.common.res.BaseResponse;
|
||||
import com.glxp.api.common.util.ResultVOUtils;
|
||||
import com.glxp.api.req.thrsys.FilterThrOrderUploadLogRequest;
|
||||
import com.glxp.api.res.thrsys.ThrOrderUploadLogResponse;
|
||||
import com.glxp.api.service.thrsys.ThrOrderUploadLogService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class ThrOrderUploadLogController {
|
||||
|
||||
@Resource
|
||||
private ThrOrderUploadLogService thrOrderUploadLogService;
|
||||
|
||||
/**
|
||||
* 查询单据上传日志
|
||||
*
|
||||
* @param uploadLogRequest
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/udiwms/inout/order/uploadLog/filter")
|
||||
public BaseResponse filter(FilterThrOrderUploadLogRequest uploadLogRequest) {
|
||||
List<ThrOrderUploadLogResponse> list = thrOrderUploadLogService.filterList(uploadLogRequest);
|
||||
PageInfo<ThrOrderUploadLogResponse> pageInfo = new PageInfo<>(list);
|
||||
return ResultVOUtils.page(pageInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除上传单据日志
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/udiwms/inout/order/uploadLog/delete")
|
||||
public BaseResponse delete(Integer id) {
|
||||
boolean result = thrOrderUploadLogService.delete(id);
|
||||
if (result) {
|
||||
return ResultVOUtils.success("删除成功");
|
||||
}
|
||||
return ResultVOUtils.error(500, "删除失败");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.glxp.api.dao.inout;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.glxp.api.entity.inout.IoOrderUploadLogEntity;
|
||||
import com.glxp.api.req.thrsys.FilterThrOrderUploadLogRequest;
|
||||
import com.glxp.api.res.thrsys.ThrOrderUploadLogResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IoOrderUploadLogDao extends BaseMapper<IoOrderUploadLogEntity> {
|
||||
|
||||
/**
|
||||
* 查询上传日志列表
|
||||
*
|
||||
* @param uploadLogRequest
|
||||
* @return
|
||||
*/
|
||||
List<ThrOrderUploadLogResponse> filterList(FilterThrOrderUploadLogRequest uploadLogRequest);
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.glxp.api.res.thrsys;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 单据上传日志响应参数
|
||||
*/
|
||||
@Data
|
||||
public class ThrOrderUploadLogResponse {
|
||||
|
||||
/**
|
||||
* 单据类型名称
|
||||
*/
|
||||
private String billTypeName;
|
||||
|
||||
}
|
@ -1,116 +0,0 @@
|
||||
package com.glxp.api.res.thrsys;
|
||||
|
||||
import com.glxp.api.entity.thrsys.ThrOrderUploadBustypesEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 单据上传接口响应数据
|
||||
*/
|
||||
@Data
|
||||
public class ThrOrderUploadResponse {
|
||||
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 是否自动上传
|
||||
*/
|
||||
private Boolean autoUpload;
|
||||
|
||||
/**
|
||||
* 同步时间间隔
|
||||
*/
|
||||
private Integer orderSyncTime;
|
||||
|
||||
/**
|
||||
* 待校验单据
|
||||
*/
|
||||
private Integer orderUnCheck;
|
||||
|
||||
/**
|
||||
* 未验收单据
|
||||
*/
|
||||
private Integer orderUnReceive;
|
||||
|
||||
/**
|
||||
* 已完成单据
|
||||
*/
|
||||
private Integer orderScanFinish;
|
||||
|
||||
/**
|
||||
* UDIMS平台
|
||||
*/
|
||||
private Integer checkUdims;
|
||||
|
||||
/**
|
||||
* PDA已校验
|
||||
*/
|
||||
private Integer checkPdaEd;
|
||||
|
||||
/**
|
||||
* pda未校验
|
||||
*/
|
||||
private Integer checkPdaUn;
|
||||
|
||||
/**
|
||||
* 扫码通
|
||||
*/
|
||||
private Integer checkPc;
|
||||
|
||||
/**
|
||||
* 网页端新增
|
||||
*/
|
||||
private Integer checkWebNew;
|
||||
|
||||
/**
|
||||
* 缺量补单
|
||||
*/
|
||||
private Integer checkChange;
|
||||
|
||||
/**
|
||||
* 自助平台同步
|
||||
*/
|
||||
private Integer checkSp;
|
||||
|
||||
/**
|
||||
* 平衡补单
|
||||
*/
|
||||
private Integer checkBalacne;
|
||||
|
||||
/**
|
||||
* 单据上传起始时间
|
||||
*/
|
||||
private String orderStartTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Data createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Data updateTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 上传单据类型集合
|
||||
*/
|
||||
List<ThrOrderUploadBustypesEntity> busTypes;
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.glxp.api.service.thrsys;
|
||||
|
||||
import com.glxp.api.req.thrsys.FilterThrOrderUploadLogRequest;
|
||||
import com.glxp.api.res.thrsys.ThrOrderUploadLogResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 上传日志Service
|
||||
*/
|
||||
public interface ThrOrderUploadLogService {
|
||||
|
||||
/**
|
||||
* 查询上传日志列表
|
||||
*
|
||||
* @param uploadLogRequest
|
||||
* @return
|
||||
*/
|
||||
List<ThrOrderUploadLogResponse> filterList(FilterThrOrderUploadLogRequest uploadLogRequest);
|
||||
|
||||
/**
|
||||
* 删除上传日志
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
boolean delete(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.glxp.api.service.thrsys.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.inout.IoOrderUploadLogDao;
|
||||
import com.glxp.api.req.thrsys.FilterThrOrderUploadLogRequest;
|
||||
import com.glxp.api.res.thrsys.ThrOrderUploadLogResponse;
|
||||
import com.glxp.api.service.thrsys.ThrOrderUploadLogService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ThrOrderUploadLogServiceImpl implements ThrOrderUploadLogService {
|
||||
|
||||
@Resource
|
||||
private IoOrderUploadLogDao uploadLogDao;
|
||||
|
||||
@Override
|
||||
public List<ThrOrderUploadLogResponse> filterList(FilterThrOrderUploadLogRequest uploadLogRequest) {
|
||||
if (null == uploadLogRequest) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (null != uploadLogRequest && null != uploadLogRequest.getLimit()) {
|
||||
PageHelper.offsetPage((uploadLogRequest.getPage() - 1) * uploadLogRequest.getLimit(), uploadLogRequest.getLimit());
|
||||
}
|
||||
return uploadLogDao.filterList(uploadLogRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delete(Integer id) {
|
||||
return uploadLogDao.deleteById(id) == 1 ? true : false;
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
<?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">
|
||||
<mapper namespace="com.glxp.api.dao.inout.IoOrderUploadLogDao">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.api.entity.inout.IoOrderUploadLogEntity">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table io_order_upload_log-->
|
||||
<id column="id" jdbcType="INTEGER" property="id"/>
|
||||
<result column="billNo" jdbcType="VARCHAR" property="billNo"/>
|
||||
<result column="billDate" jdbcType="TIMESTAMP" property="billDate"/>
|
||||
<result column="billType" jdbcType="VARCHAR" property="billType"/>
|
||||
<result column="thrBillNo" jdbcType="VARCHAR" property="thrBillNo"/>
|
||||
<result column="submitTime" jdbcType="TIMESTAMP" property="submitTime"/>
|
||||
<result column="status" jdbcType="INTEGER" property="status"/>
|
||||
<result column="result" jdbcType="VARCHAR" property="result"/>
|
||||
<result column="fromType" jdbcType="TINYINT" property="fromType"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id,
|
||||
billNo,
|
||||
billDate,
|
||||
billType,
|
||||
thrBillNo,
|
||||
submitTime,
|
||||
`status`,
|
||||
`result`,
|
||||
fromType
|
||||
</sql>
|
||||
|
||||
<select id="filterList" resultType="com.glxp.api.res.thrsys.ThrOrderUploadLogResponse">
|
||||
select log.*, (select `name` from basic_bussiness_type where action = log.billType) billTypeName
|
||||
from io_order_upload_log log
|
||||
<where>
|
||||
<if test="billNo != null and billNo != ''">
|
||||
AND log.billNo like concat('%', #{billNo}, '%')
|
||||
</if>
|
||||
<if test="thirdBillNo != null and thirdBillNo != ''">
|
||||
AND log.thrBillNo like concat('%', #{thirdBillNo}, '%')
|
||||
</if>
|
||||
<if test="submitTime != null">
|
||||
AND date_format(log.submitTime, '%Y-%m-%d') = date_format(#{submitTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND log.status = #{status}
|
||||
</if>
|
||||
<if test="fromType != null">
|
||||
AND log.fromType = #{fromType}
|
||||
</if>
|
||||
</where>
|
||||
order by log.submitTime desc
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue