订单详情(进度需要考虑是否计入审核中的数量)
This commit is contained in:
parent
8f6e296bb2
commit
8516fa0759
|
@ -35,7 +35,7 @@ import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.ip.IpUtils;
|
import com.ruoyi.common.utils.ip.IpUtils;
|
||||||
import com.ruoyi.framework.manager.AsyncManager;
|
import com.ruoyi.framework.manager.AsyncManager;
|
||||||
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
||||||
import com.ruoyi.system.domain.SysOperLog;
|
import com.ruoyi.system.operLog.domain.SysOperLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志记录处理
|
* 操作日志记录处理
|
||||||
|
|
|
@ -11,9 +11,9 @@ import com.ruoyi.common.utils.ip.AddressUtils;
|
||||||
import com.ruoyi.common.utils.ip.IpUtils;
|
import com.ruoyi.common.utils.ip.IpUtils;
|
||||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
import com.ruoyi.system.domain.SysLogininfor;
|
import com.ruoyi.system.domain.SysLogininfor;
|
||||||
import com.ruoyi.system.domain.SysOperLog;
|
import com.ruoyi.system.operLog.domain.SysOperLog;
|
||||||
import com.ruoyi.system.service.ISysLogininforService;
|
import com.ruoyi.system.service.ISysLogininforService;
|
||||||
import com.ruoyi.system.service.ISysOperLogService;
|
import com.ruoyi.system.operLog.service.ISysOperLogService;
|
||||||
import eu.bitwalker.useragentutils.UserAgent;
|
import eu.bitwalker.useragentutils.UserAgent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.ruoyi.system.domain;
|
package com.ruoyi.system.operLog.domain;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.ruoyi.system.operLog.domain;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wjh
|
||||||
|
* 2024/12/6
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SysOperLogQuery extends SysOperLogVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("业务ID")
|
||||||
|
private Long bizId;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.ruoyi.system.operLog.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wjh
|
||||||
|
* 2024/12/6
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SysOperLogVO extends SysOperLog{
|
||||||
|
}
|
|
@ -1,7 +1,9 @@
|
||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.operLog.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.system.domain.SysOperLog;
|
import com.ruoyi.system.operLog.domain.SysOperLog;
|
||||||
|
import com.ruoyi.system.operLog.domain.SysOperLogQuery;
|
||||||
|
import com.ruoyi.system.operLog.domain.SysOperLogVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志 数据层
|
* 操作日志 数据层
|
||||||
|
@ -20,10 +22,10 @@ public interface SysOperLogMapper
|
||||||
/**
|
/**
|
||||||
* 查询系统操作日志集合
|
* 查询系统操作日志集合
|
||||||
*
|
*
|
||||||
* @param operLog 操作日志对象
|
* @param query 操作日志对象
|
||||||
* @return 操作日志集合
|
* @return 操作日志集合
|
||||||
*/
|
*/
|
||||||
public List<SysOperLog> selectOperLogList(SysOperLog operLog);
|
public List<SysOperLogVO> selectOperLogList(SysOperLogQuery query);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除系统操作日志
|
* 批量删除系统操作日志
|
||||||
|
@ -39,7 +41,7 @@ public interface SysOperLogMapper
|
||||||
* @param operId 操作ID
|
* @param operId 操作ID
|
||||||
* @return 操作日志对象
|
* @return 操作日志对象
|
||||||
*/
|
*/
|
||||||
public SysOperLog selectOperLogById(Long operId);
|
public SysOperLogVO selectOperLogById(Long operId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清空操作日志
|
* 清空操作日志
|
|
@ -2,9 +2,9 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.mapper.SysOperLogMapper">
|
<mapper namespace="com.ruoyi.system.operLog.mapper.SysOperLogMapper">
|
||||||
|
|
||||||
<resultMap type="SysOperLog" id="SysOperLogResult" autoMapping="true">
|
<resultMap type="SysOperLogVO" id="SysOperLogResult" autoMapping="true">
|
||||||
<result column="biz_ids" property="bizIds" typeHandler="com.ruoyi.common.mybatis.typehandler.StringSplitListTypeHandler"/>
|
<result column="biz_ids" property="bizIds" typeHandler="com.ruoyi.common.mybatis.typehandler.StringSplitListTypeHandler"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
|
<select id="selectOperLogList" parameterType="SysOperLogQuery" resultMap="SysOperLogResult">
|
||||||
<include refid="selectOperLogVo"/>
|
<include refid="selectOperLogVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="operIp != null and operIp != ''">
|
<if test="operIp != null and operIp != ''">
|
||||||
|
@ -99,6 +99,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="operName != null and operName != ''">
|
<if test="operName != null and operName != ''">
|
||||||
AND oper_name like concat('%', #{operName}, '%')
|
AND oper_name like concat('%', #{operName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="bizId != null">
|
||||||
|
and find_in_set(#{bizId}, biz_ids)
|
||||||
|
</if>
|
||||||
|
<if test="bizType != null and bizType != ''">
|
||||||
|
and biz_type = #{bizType}
|
||||||
|
</if>
|
||||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
AND oper_time >= #{params.beginTime}
|
AND oper_time >= #{params.beginTime}
|
||||||
</if>
|
</if>
|
|
@ -1,7 +1,9 @@
|
||||||
package com.ruoyi.system.service;
|
package com.ruoyi.system.operLog.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.system.domain.SysOperLog;
|
import com.ruoyi.system.operLog.domain.SysOperLog;
|
||||||
|
import com.ruoyi.system.operLog.domain.SysOperLogQuery;
|
||||||
|
import com.ruoyi.system.operLog.domain.SysOperLogVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志 服务层
|
* 操作日志 服务层
|
||||||
|
@ -20,10 +22,10 @@ public interface ISysOperLogService
|
||||||
/**
|
/**
|
||||||
* 查询系统操作日志集合
|
* 查询系统操作日志集合
|
||||||
*
|
*
|
||||||
* @param operLog 操作日志对象
|
* @param query 操作日志对象
|
||||||
* @return 操作日志集合
|
* @return 操作日志集合
|
||||||
*/
|
*/
|
||||||
public List<SysOperLog> selectOperLogList(SysOperLog operLog);
|
public List<SysOperLogVO> selectOperLogList(SysOperLogQuery query);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除系统操作日志
|
* 批量删除系统操作日志
|
||||||
|
@ -39,7 +41,7 @@ public interface ISysOperLogService
|
||||||
* @param operId 操作ID
|
* @param operId 操作ID
|
||||||
* @return 操作日志对象
|
* @return 操作日志对象
|
||||||
*/
|
*/
|
||||||
public SysOperLog selectOperLogById(Long operId);
|
public SysOperLogVO selectOperLogById(Long operId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清空操作日志
|
* 清空操作日志
|
|
@ -1,11 +1,14 @@
|
||||||
package com.ruoyi.system.service.impl;
|
package com.ruoyi.system.operLog.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.system.operLog.domain.SysOperLogQuery;
|
||||||
|
import com.ruoyi.system.operLog.domain.SysOperLogVO;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.system.domain.SysOperLog;
|
import com.ruoyi.system.operLog.domain.SysOperLog;
|
||||||
import com.ruoyi.system.mapper.SysOperLogMapper;
|
import com.ruoyi.system.operLog.mapper.SysOperLogMapper;
|
||||||
import com.ruoyi.system.service.ISysOperLogService;
|
import com.ruoyi.system.operLog.service.ISysOperLogService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志 服务层处理
|
* 操作日志 服务层处理
|
||||||
|
@ -32,13 +35,13 @@ public class SysOperLogServiceImpl implements ISysOperLogService
|
||||||
/**
|
/**
|
||||||
* 查询系统操作日志集合
|
* 查询系统操作日志集合
|
||||||
*
|
*
|
||||||
* @param operLog 操作日志对象
|
* @param query 操作日志对象
|
||||||
* @return 操作日志集合
|
* @return 操作日志集合
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<SysOperLog> selectOperLogList(SysOperLog operLog)
|
public List<SysOperLogVO> selectOperLogList(SysOperLogQuery query)
|
||||||
{
|
{
|
||||||
return operLogMapper.selectOperLogList(operLog);
|
return operLogMapper.selectOperLogList(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,7 +63,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService
|
||||||
* @return 操作日志对象
|
* @return 操作日志对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SysOperLog selectOperLogById(Long operId)
|
public SysOperLogVO selectOperLogById(Long operId)
|
||||||
{
|
{
|
||||||
return operLogMapper.selectOperLogById(operId);
|
return operLogMapper.selectOperLogById(operId);
|
||||||
}
|
}
|
|
@ -580,7 +580,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
user.setCreateBy(operator.getNickName());
|
user.setCreateBy(operator.getNickName());
|
||||||
int insert = userMapper.insertUser(user);
|
int insert = userMapper.insertUser(user);
|
||||||
ServiceUtil.assertion(insert != 1, "新增用户失败");
|
ServiceUtil.assertion(insert != 1, "新增用户失败");
|
||||||
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.ADD, user, null);
|
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.ADD, user, null, user.getUserId());
|
||||||
return insert;
|
return insert;
|
||||||
}
|
}
|
||||||
else if (isUpdateSupport) {
|
else if (isUpdateSupport) {
|
||||||
|
@ -590,19 +590,19 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
user.setUpdateBy(operator.getNickName());
|
user.setUpdateBy(operator.getNickName());
|
||||||
int update = userMapper.updateUser(user);
|
int update = userMapper.updateUser(user);
|
||||||
ServiceUtil.assertion(update != 1, "修改用户失败");
|
ServiceUtil.assertion(update != 1, "修改用户失败");
|
||||||
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.UPDATE, user, null);
|
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.UPDATE, user, null, user.getUserId());
|
||||||
return update;
|
return update;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
String msg = "用户工号为 " + user.getUserNo() + " 的数据已存在";
|
String msg = "用户工号为 " + user.getUserNo() + " 的数据已存在";
|
||||||
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.FAIL, user, msg);
|
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.FAIL, user, msg, old.getUserId());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String msg = "用户工号为 " + user.getUserNo() + " 的数据导入失败:" + e.getMessage();
|
String msg = "用户工号为 " + user.getUserNo() + " 的数据导入失败:" + e.getMessage();
|
||||||
log.error(msg, e);
|
log.error(msg, e);
|
||||||
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.FAIL, user, msg);
|
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.FAIL, user, msg, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,4 +36,7 @@ public class LogImportDetail extends BaseEntity
|
||||||
@ApiModelProperty("导入结果信息")
|
@ApiModelProperty("导入结果信息")
|
||||||
private String message;
|
private String message;
|
||||||
|
|
||||||
|
@Excel(name = "业务数据ID")
|
||||||
|
@ApiModelProperty("业务数据ID")
|
||||||
|
private Long bstId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
blid.type,
|
blid.type,
|
||||||
blid.content,
|
blid.content,
|
||||||
blid.message,
|
blid.message,
|
||||||
|
blid.bst_id,
|
||||||
bli.biz_type as log_biz_type
|
bli.biz_type as log_biz_type
|
||||||
from bst_log_import_detail blid
|
from bst_log_import_detail blid
|
||||||
left join bst_log_import bli on bli.log_id = blid.log_id
|
left join bst_log_import bli on bli.log_id = blid.log_id
|
||||||
|
@ -22,6 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="query.detailId != null "> and blid.detail_id = #{query.detailId}</if>
|
<if test="query.detailId != null "> and blid.detail_id = #{query.detailId}</if>
|
||||||
<if test="query.logId != null "> and blid.log_id = #{query.logId}</if>
|
<if test="query.logId != null "> and blid.log_id = #{query.logId}</if>
|
||||||
<if test="query.type != null and query.type != ''"> and blid.type = #{query.type}</if>
|
<if test="query.type != null and query.type != ''"> and blid.type = #{query.type}</if>
|
||||||
|
<if test="query.bstId != null "> and blid.bst_id = #{query.bstId}</if>
|
||||||
|
<if test="query.logBizType != null and query.logBizType != ''">and bli.biz_type = #{query.logBizType}</if>
|
||||||
${query.params.dataScope}
|
${query.params.dataScope}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
@ -63,12 +66,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="type != null and type != ''">type,</if>
|
<if test="type != null and type != ''">type,</if>
|
||||||
<if test="content != null and content != ''">content,</if>
|
<if test="content != null and content != ''">content,</if>
|
||||||
<if test="message != null">message,</if>
|
<if test="message != null">message,</if>
|
||||||
|
<if test="bstId != null">bst_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="logId != null">#{logId},</if>
|
<if test="logId != null">#{logId},</if>
|
||||||
<if test="type != null and type != ''">#{type},</if>
|
<if test="type != null and type != ''">#{type},</if>
|
||||||
<if test="content != null and content != ''">#{content},</if>
|
<if test="content != null and content != ''">#{content},</if>
|
||||||
<if test="message != null">#{message},</if>
|
<if test="message != null">#{message},</if>
|
||||||
|
<if test="bstId != null">#{bstId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -85,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="data.type != null and data.type != ''">type = #{data.type},</if>
|
<if test="data.type != null and data.type != ''">type = #{data.type},</if>
|
||||||
<if test="data.content != null and data.content != ''">content = #{data.content},</if>
|
<if test="data.content != null and data.content != ''">content = #{data.content},</if>
|
||||||
<if test="data.message != null">message = #{data.message},</if>
|
<if test="data.message != null">message = #{data.message},</if>
|
||||||
|
<if test="data.bstId != null">bst_id = #{data.bstId},</if>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<delete id="deleteLogImportDetailByDetailId" parameterType="Long">
|
<delete id="deleteLogImportDetailByDetailId" parameterType="Long">
|
||||||
|
|
|
@ -65,12 +65,14 @@ public interface ILogImportDetailService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 插入一条结果
|
* 插入一条结果
|
||||||
|
*
|
||||||
* @param logId 日志ID
|
* @param logId 日志ID
|
||||||
* @param type 类型
|
* @param type 类型
|
||||||
* @param content 内容
|
* @param content 内容
|
||||||
* @param message 信息
|
* @param message 信息
|
||||||
|
* @param bstId
|
||||||
*/
|
*/
|
||||||
int addResult(Long logId, LogImportDetailType type, Object content, String message);
|
int addResult(Long logId, LogImportDetailType type, Object content, String message, Long bstId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询日志统计,并以日志ID分组
|
* 查询日志统计,并以日志ID分组
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
package com.ruoyi.yh.logImportDetail.service.impl;
|
package com.ruoyi.yh.logImportDetail.service.impl;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.ruoyi.common.utils.collection.CollectionUtils;
|
|
||||||
import com.ruoyi.yh.logImportDetail.domain.enums.LogImportDetailType;
|
import com.ruoyi.yh.logImportDetail.domain.enums.LogImportDetailType;
|
||||||
import com.ruoyi.yh.logImportDetail.domain.vo.LogImportDetailStatisticsByLogIdVO;
|
import com.ruoyi.yh.logImportDetail.domain.vo.LogImportDetailStatisticsByLogIdVO;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -102,7 +99,7 @@ public class LogImportDetailServiceImpl implements ILogImportDetailService
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int addResult(Long logId, LogImportDetailType type, Object content, String message) {
|
public int addResult(Long logId, LogImportDetailType type, Object content, String message, Long bstId) {
|
||||||
if (logId == null || type == null || content == null) {
|
if (logId == null || type == null || content == null) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -111,6 +108,7 @@ public class LogImportDetailServiceImpl implements ILogImportDetailService
|
||||||
data.setType(type.getType());
|
data.setType(type.getType());
|
||||||
data.setContent(JSON.toJSONString(content));
|
data.setContent(JSON.toJSONString(content));
|
||||||
data.setMessage(message);
|
data.setMessage(message);
|
||||||
|
data.setBstId(bstId);
|
||||||
return logImportDetailMapper.insertLogImportDetail(data);
|
return logImportDetailMapper.insertLogImportDetail(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<insert id="insertPrice" parameterType="Price" useGeneratedKeys="true" keyProperty="priceId">
|
<insert id="insertPrice" parameterType="Price" useGeneratedKeys="true" keyProperty="priceId">
|
||||||
insert into bst_price
|
insert into bst_price
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="priceId != null">price_id,</if>
|
||||||
<if test="deptId != null">dept_id,</if>
|
<if test="deptId != null">dept_id,</if>
|
||||||
<if test="status != null and status != ''">`status`,</if>
|
<if test="status != null and status != ''">`status`,</if>
|
||||||
<if test="category != null">category,</if>
|
<if test="category != null">category,</if>
|
||||||
|
@ -118,6 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="quantityDenominator != null">quantity_denominator,</if>
|
<if test="quantityDenominator != null">quantity_denominator,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="priceId != null">#{priceId},</if>
|
||||||
<if test="deptId != null">#{deptId},</if>
|
<if test="deptId != null">#{deptId},</if>
|
||||||
<if test="status != null and status != ''">#{status},</if>
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
<if test="category != null">#{category},</if>
|
<if test="category != null">#{category},</if>
|
||||||
|
|
|
@ -349,15 +349,16 @@ public class PriceServiceImpl implements PriceService
|
||||||
// 新增
|
// 新增
|
||||||
int insert = this.insertPrice(price);
|
int insert = this.insertPrice(price);
|
||||||
ServiceUtil.assertion(insert != 1, "新增失败");
|
ServiceUtil.assertion(insert != 1, "新增失败");
|
||||||
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.ADD, price, null);
|
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.ADD, price, null, price.getPriceId());
|
||||||
return insert;
|
return insert;
|
||||||
} else {
|
} else {
|
||||||
// 校验
|
// 校验
|
||||||
BeanValidators.validateWithException(validator, price, ValidGroup.Update.class);
|
BeanValidators.validateWithException(validator, price, ValidGroup.Update.class);
|
||||||
// 修改
|
// 修改
|
||||||
|
price.setPriceId(old.getPriceId());
|
||||||
int update = this.updatePrice(price);
|
int update = this.updatePrice(price);
|
||||||
ServiceUtil.assertion(update != 1, "新增失败");
|
ServiceUtil.assertion(update != 1, "修改失败");
|
||||||
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.UPDATE, price, null);
|
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.UPDATE, price, null, price.getPriceId());
|
||||||
return update;
|
return update;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -365,12 +366,12 @@ public class PriceServiceImpl implements PriceService
|
||||||
// 不覆盖
|
// 不覆盖
|
||||||
else {
|
else {
|
||||||
String msg = "单价ID为 " + price.getPriceId() + " 的数据已存在";
|
String msg = "单价ID为 " + price.getPriceId() + " 的数据已存在";
|
||||||
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.FAIL, price, msg);
|
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.FAIL, price, msg, price.getPriceId());
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String msg = "单价ID为 " + price.getPriceId() + " 的数据导入失败:" + e.getMessage();
|
String msg = "单价ID为 " + price.getPriceId() + " 的数据导入失败:" + e.getMessage();
|
||||||
log.error(msg, e);
|
log.error(msg, e);
|
||||||
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.FAIL, price, msg);
|
logImportDetailService.addResult(importLog.getLogId(), LogImportDetailType.FAIL, price, msg, price.getPriceId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ruoyi.yh.prodOrder.domain.dto;
|
package com.ruoyi.yh.prodOrder.domain.dto;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.interfaces.LogBizParam;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
@ -16,7 +17,6 @@ public class ProdOrderSyncQuery {
|
||||||
@ApiModelProperty("业务状态列表")
|
@ApiModelProperty("业务状态列表")
|
||||||
private List<String> statusList;
|
private List<String> statusList;
|
||||||
|
|
||||||
@ApiModelProperty("生产订单ID")
|
@ApiModelProperty("ERP生产订单ID")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,17 +292,17 @@ public class ProdOrderServiceImpl implements ProdOrderService
|
||||||
if (old == null) {
|
if (old == null) {
|
||||||
int insert = this.insertProdOrder(prodOrder);
|
int insert = this.insertProdOrder(prodOrder);
|
||||||
ServiceUtil.assertion(insert != 1, "新增失败");
|
ServiceUtil.assertion(insert != 1, "新增失败");
|
||||||
logImportDetailService.addResult(logId, LogImportDetailType.ADD, prodOrder, null);
|
logImportDetailService.addResult(logId, LogImportDetailType.ADD, prodOrder, null, prodOrder.getId());
|
||||||
return insert;
|
return insert;
|
||||||
} else {
|
} else {
|
||||||
prodOrder.setId(old.getId());
|
prodOrder.setId(old.getId());
|
||||||
int update = this.updateProdOrder(prodOrder);
|
int update = this.updateProdOrder(prodOrder);
|
||||||
ServiceUtil.assertion(update != 1, "修改失败");
|
ServiceUtil.assertion(update != 1, "修改失败");
|
||||||
logImportDetailService.addResult(logId, LogImportDetailType.UPDATE, prodOrder, null);
|
logImportDetailService.addResult(logId, LogImportDetailType.UPDATE, prodOrder, null, prodOrder.getId());
|
||||||
return update;
|
return update;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logImportDetailService.addResult(logId, LogImportDetailType.FAIL, prodOrder, e.getMessage());
|
logImportDetailService.addResult(logId, LogImportDetailType.FAIL, prodOrder, e.getMessage(), null);
|
||||||
return 0;
|
return 0;
|
||||||
} finally {
|
} finally {
|
||||||
redisLock.unlock(RedisLockKey.SYNC_PROD_BILL, lockKey);
|
redisLock.unlock(RedisLockKey.SYNC_PROD_BILL, lockKey);
|
||||||
|
|
|
@ -2,6 +2,9 @@ package com.ruoyi.web.monitor;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.ruoyi.system.operLog.domain.SysOperLogQuery;
|
||||||
|
import com.ruoyi.system.operLog.domain.SysOperLogVO;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
@ -16,8 +19,8 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.system.domain.SysOperLog;
|
import com.ruoyi.system.operLog.domain.SysOperLog;
|
||||||
import com.ruoyi.system.service.ISysOperLogService;
|
import com.ruoyi.system.operLog.service.ISysOperLogService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志记录
|
* 操作日志记录
|
||||||
|
@ -33,20 +36,20 @@ public class SysOperlogController extends BaseController
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
|
@PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysOperLog operLog)
|
public TableDataInfo list(SysOperLogQuery query)
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
List<SysOperLog> list = operLogService.selectOperLogList(operLog);
|
List<SysOperLogVO> list = operLogService.selectOperLogList(query);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
|
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
|
@PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, SysOperLog operLog)
|
public void export(HttpServletResponse response, SysOperLogQuery query)
|
||||||
{
|
{
|
||||||
List<SysOperLog> list = operLogService.selectOperLogList(operLog);
|
List<SysOperLogVO> list = operLogService.selectOperLogList(query);
|
||||||
ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
|
ExcelUtil<SysOperLogVO> util = new ExcelUtil<SysOperLogVO>(SysOperLogVO.class);
|
||||||
util.exportExcel(response, list, "操作日志");
|
util.exportExcel(response, list, "操作日志");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,8 @@ public class ProdOrderController extends BaseController
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
{
|
{
|
||||||
return success(prodOrderService.selectProdOrderById(id));
|
ProdOrderVO detail = prodOrderService.selectProdOrderById(id);
|
||||||
|
return success(detail);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user