Merge branch 'dev' into test
This commit is contained in:
commit
3ed2f429a8
|
|
@ -78,6 +78,8 @@ public class LeaseOutDetails implements Serializable {
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
/** 车牌号 */
|
||||||
|
private String carCode;
|
||||||
|
|
||||||
/** 数据所属组织 */
|
/** 数据所属组织 */
|
||||||
@ApiModelProperty(value = "数据所属组织")
|
@ApiModelProperty(value = "数据所属组织")
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,7 @@ public class MaType extends BaseEntity {
|
||||||
/** 图片路径 */
|
/** 图片路径 */
|
||||||
@ApiModelProperty(value = "图片路径")
|
@ApiModelProperty(value = "图片路径")
|
||||||
private String photoUrl;
|
private String photoUrl;
|
||||||
|
private String childPhoto;
|
||||||
|
|
||||||
/** 文档名称 */
|
/** 文档名称 */
|
||||||
@ApiModelProperty(value = "文档名称")
|
@ApiModelProperty(value = "文档名称")
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,18 @@ public class SysLogininfor extends BaseEntity
|
||||||
@Excel(name = "用户账号")
|
@Excel(name = "用户账号")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
|
/** 用户昵称 */
|
||||||
|
@Excel(name = "用户昵称")
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
public String getNickName() {
|
||||||
|
return nickName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNickName(String nickName) {
|
||||||
|
this.nickName = nickName;
|
||||||
|
}
|
||||||
|
|
||||||
/** 状态 0成功 1失败 */
|
/** 状态 0成功 1失败 */
|
||||||
@Excel(name = "状态", readConverterExp = "0=成功,1=失败")
|
@Excel(name = "状态", readConverterExp = "0=成功,1=失败")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,10 @@ public class SysOperLog extends BaseEntity
|
||||||
@Excel(name = "操作人员")
|
@Excel(name = "操作人员")
|
||||||
private String operName;
|
private String operName;
|
||||||
|
|
||||||
|
/** 用户昵称 */
|
||||||
|
@Excel(name = "用户昵称")
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
/** 部门名称 */
|
/** 部门名称 */
|
||||||
@Excel(name = "部门名称")
|
@Excel(name = "部门名称")
|
||||||
private String deptName;
|
private String deptName;
|
||||||
|
|
@ -112,7 +116,13 @@ public class SysOperLog extends BaseEntity
|
||||||
{
|
{
|
||||||
this.businessType = businessType;
|
this.businessType = businessType;
|
||||||
}
|
}
|
||||||
|
public String getNickName() {
|
||||||
|
return nickName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNickName(String nickName) {
|
||||||
|
this.nickName = nickName;
|
||||||
|
}
|
||||||
public Integer[] getBusinessTypes()
|
public Integer[] getBusinessTypes()
|
||||||
{
|
{
|
||||||
return businessTypes;
|
return businessTypes;
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,9 @@
|
||||||
<if test="companyId!= null">
|
<if test="companyId!= null">
|
||||||
company_id,
|
company_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="carCode!= null">
|
||||||
|
car_code,
|
||||||
|
</if>
|
||||||
create_time,
|
create_time,
|
||||||
update_time
|
update_time
|
||||||
</trim>
|
</trim>
|
||||||
|
|
@ -105,6 +108,9 @@
|
||||||
<if test="companyId!= null">
|
<if test="companyId!= null">
|
||||||
#{companyId},
|
#{companyId},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="carCode!= null">
|
||||||
|
#{carCode},
|
||||||
|
</if>
|
||||||
NOW(),
|
NOW(),
|
||||||
NOW()
|
NOW()
|
||||||
</trim>
|
</trim>
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="isPlan" column="is_plan" />
|
<result property="isPlan" column="is_plan" />
|
||||||
<result property="isAncuo" column="is_ancuo" />
|
<result property="isAncuo" column="is_ancuo" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
|
<result property="childPhoto" column="childPhoto" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectMaTypeVo">
|
<sql id="selectMaTypeVo">
|
||||||
|
|
@ -348,17 +349,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMaTypeTreeByLevel" resultMap="MaTypeResult" parameterType="java.lang.String">
|
<select id="selectMaTypeTreeByLevel" resultMap="MaTypeResult" parameterType="java.lang.String">
|
||||||
select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.manage_type,
|
|
||||||
m.lease_price, m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
|
|
||||||
m.holding_time, m.warn_num, m.del_flag, m.create_by, m.create_time,
|
|
||||||
m.remark, m.company_id
|
|
||||||
from ma_type m
|
|
||||||
<where>
|
|
||||||
m.level = '4' and m.parent_id = #{id,jdbcType=VARCHAR}
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectMaTypeListByLevelNotFour" resultMap="MaTypeResult">
|
|
||||||
select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.manage_type,
|
select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.manage_type,
|
||||||
m.lease_price, m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
|
m.lease_price, m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
|
||||||
m.holding_time, m.warn_num, m.del_flag, m.create_by, m.create_time,
|
m.holding_time, m.warn_num, m.del_flag, m.create_by, m.create_time,
|
||||||
|
|
@ -366,7 +356,51 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from ma_type m
|
from ma_type m
|
||||||
left join (select * from ma_type_file where file_type = '1') mtf on m.type_id = mtf.type_id
|
left join (select * from ma_type_file where file_type = '1') mtf on m.type_id = mtf.type_id
|
||||||
<where>
|
<where>
|
||||||
m.level != 4
|
m.level = '4' and m.parent_id = #{id,jdbcType=VARCHAR} and m.del_flag = '0'
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMaTypeListByLevelNotFour" resultMap="MaTypeResult">
|
||||||
|
SELECT
|
||||||
|
m.type_id,
|
||||||
|
m.type_name,
|
||||||
|
m.parent_id,
|
||||||
|
m.STATUS,
|
||||||
|
m.num,
|
||||||
|
m.unit_id,
|
||||||
|
m.manage_type,
|
||||||
|
m.lease_price,
|
||||||
|
m.eff_time,
|
||||||
|
m.rent_price,
|
||||||
|
m.buy_price,
|
||||||
|
m.pay_price,
|
||||||
|
m.LEVEL,
|
||||||
|
m.rated_load,
|
||||||
|
m.test_load,
|
||||||
|
m.holding_time,
|
||||||
|
m.warn_num,
|
||||||
|
m.del_flag,
|
||||||
|
m.create_by,
|
||||||
|
m.create_time,
|
||||||
|
m.remark,
|
||||||
|
m.company_id,
|
||||||
|
mtf.file_url photoUrl,
|
||||||
|
mt.photoUrl as childPhoto
|
||||||
|
FROM
|
||||||
|
ma_type m
|
||||||
|
LEFT JOIN ( SELECT * FROM ma_type_file WHERE file_type = '1' ) mtf ON m.type_id = mtf.type_id
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
m.*,
|
||||||
|
mtf.file_url photoUrl
|
||||||
|
FROM
|
||||||
|
ma_type m
|
||||||
|
LEFT JOIN ( SELECT * FROM ma_type_file WHERE file_type = '1' ) mtf ON m.type_id = mtf.type_id
|
||||||
|
WHERE
|
||||||
|
m.del_flag = '0'
|
||||||
|
) mt on mt.parent_id = m.type_id
|
||||||
|
<where>
|
||||||
|
m.level != 4 and m.del_flag = '0'
|
||||||
<if test="parentId!= null and parentId != ''">
|
<if test="parentId!= null and parentId != ''">
|
||||||
and m.parent_id = #{parentId}
|
and m.parent_id = #{parentId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -91,4 +91,8 @@ public class AgreementInfo extends BaseEntity {
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/** 协议类型 */
|
||||||
|
@Excel(name = "协议类型")
|
||||||
|
@ApiModelProperty(value = "协议类型(1内部单位 2外部单位)")
|
||||||
|
private Integer protocol;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.bonus.sgzb.material.mapper;
|
package com.bonus.sgzb.material.mapper;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||||
|
import com.bonus.sgzb.material.domain.RepairAuditDetails;
|
||||||
import com.bonus.sgzb.material.domain.ScrapApplyDetails;
|
import com.bonus.sgzb.material.domain.ScrapApplyDetails;
|
||||||
import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO;
|
import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
@ -72,4 +74,18 @@ public interface ScrapApplyDetailsMapper
|
||||||
String selectTypeNameByTaskId(Long taskId);
|
String selectTypeNameByTaskId(Long taskId);
|
||||||
|
|
||||||
List<ScrapApplyDetailsVO> exportScrapApplyDetailsList(ScrapApplyDetails bean);
|
List<ScrapApplyDetailsVO> exportScrapApplyDetailsList(ScrapApplyDetails bean);
|
||||||
|
|
||||||
|
List<ScrapApplyDetails> selectnotScrapByTaskId(Long taskId);
|
||||||
|
|
||||||
|
int addBackDetails(ScrapApplyDetails bean);
|
||||||
|
|
||||||
|
BackApplyInfo getBackApplyInfo(int parentId);
|
||||||
|
|
||||||
|
int addBackInfo(BackApplyInfo backApplyInfo);
|
||||||
|
|
||||||
|
RepairAuditDetails getRepairAudit(Long parentId);
|
||||||
|
|
||||||
|
int addRepaieAudit(RepairAuditDetails details);
|
||||||
|
|
||||||
|
int updateStatus(ScrapApplyDetails bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -319,6 +319,8 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
||||||
for (RepairAuditDetails bean : auditDetailList){
|
for (RepairAuditDetails bean : auditDetailList){
|
||||||
bean.setAuditBy(SecurityUtils.getLoginUser().getUserid());
|
bean.setAuditBy(SecurityUtils.getLoginUser().getUserid());
|
||||||
bean.setStatus(status);
|
bean.setStatus(status);
|
||||||
|
bean.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||||
|
bean.setAuditRemark(scrapAudit.getRemark());
|
||||||
repairAuditDetailsMapper.updateStatus(bean);
|
repairAuditDetailsMapper.updateStatus(bean);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -327,6 +329,8 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
||||||
for (RepairAuditDetails bean : auditAllList){
|
for (RepairAuditDetails bean : auditAllList){
|
||||||
bean.setAuditBy(SecurityUtils.getLoginUser().getUserid());
|
bean.setAuditBy(SecurityUtils.getLoginUser().getUserid());
|
||||||
bean.setStatus(status);
|
bean.setStatus(status);
|
||||||
|
bean.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||||
|
bean.setAuditRemark(scrapAudit.getRemark());
|
||||||
repairAuditDetailsMapper.updateStatus(bean);
|
repairAuditDetailsMapper.updateStatus(bean);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,23 @@
|
||||||
package com.bonus.sgzb.material.service.impl;
|
package com.bonus.sgzb.material.service.impl;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.common.core.exception.ServiceException;
|
||||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.sgzb.material.domain.ScrapApplyDetails;
|
import com.bonus.sgzb.material.domain.*;
|
||||||
import com.bonus.sgzb.material.domain.TmTask;
|
|
||||||
import com.bonus.sgzb.material.mapper.PurchaseCheckInfoMapper;
|
import com.bonus.sgzb.material.mapper.PurchaseCheckInfoMapper;
|
||||||
import com.bonus.sgzb.material.mapper.ScrapApplyDetailsMapper;
|
import com.bonus.sgzb.material.mapper.ScrapApplyDetailsMapper;
|
||||||
import com.bonus.sgzb.material.mapper.TaskMapper;
|
import com.bonus.sgzb.material.mapper.TaskMapper;
|
||||||
|
import com.bonus.sgzb.material.mapper.TmTaskAgreementMapper;
|
||||||
import com.bonus.sgzb.material.service.IScrapApplyDetailsService;
|
import com.bonus.sgzb.material.service.IScrapApplyDetailsService;
|
||||||
import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO;
|
import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO;
|
||||||
import com.bonus.sgzb.material.vo.ScrapAudit;
|
import com.bonus.sgzb.material.vo.ScrapAudit;
|
||||||
|
import org.apache.catalina.security.SecurityUtil;
|
||||||
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 org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
@ -26,8 +31,7 @@ import javax.annotation.Resource;
|
||||||
* @date 2023-12-15
|
* @date 2023-12-15
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ScrapApplyDetailsMapper scrapApplyDetailsMapper;
|
private ScrapApplyDetailsMapper scrapApplyDetailsMapper;
|
||||||
|
|
||||||
|
|
@ -37,6 +41,9 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
||||||
@Resource
|
@Resource
|
||||||
private TaskMapper taskMapper;
|
private TaskMapper taskMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private TmTaskAgreementMapper agreementMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询报废任务详细scrap_apply_details
|
* 查询报废任务详细scrap_apply_details
|
||||||
*
|
*
|
||||||
|
|
@ -44,8 +51,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
||||||
* @return 报废任务详细scrap_apply_details
|
* @return 报废任务详细scrap_apply_details
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ScrapApplyDetails selectScrapApplyDetailsById(Long id)
|
public ScrapApplyDetails selectScrapApplyDetailsById(Long id) {
|
||||||
{
|
|
||||||
return scrapApplyDetailsMapper.selectScrapApplyDetailsById(id);
|
return scrapApplyDetailsMapper.selectScrapApplyDetailsById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -61,8 +67,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
||||||
* @return 报废任务详细scrap_apply_details
|
* @return 报废任务详细scrap_apply_details
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<ScrapApplyDetailsVO> selectScrapApplyDetailsList(ScrapApplyDetails scrapApplyDetails)
|
public List<ScrapApplyDetailsVO> selectScrapApplyDetailsList(ScrapApplyDetails scrapApplyDetails) {
|
||||||
{
|
|
||||||
List<ScrapApplyDetailsVO> scrapApplyDetailsList = scrapApplyDetailsMapper.selectScrapApplyDetailsList(scrapApplyDetails);
|
List<ScrapApplyDetailsVO> scrapApplyDetailsList = scrapApplyDetailsMapper.selectScrapApplyDetailsList(scrapApplyDetails);
|
||||||
for (ScrapApplyDetailsVO applyDetails : scrapApplyDetailsList) {
|
for (ScrapApplyDetailsVO applyDetails : scrapApplyDetailsList) {
|
||||||
Long taskId = applyDetails.getTaskId();
|
Long taskId = applyDetails.getTaskId();
|
||||||
|
|
@ -79,8 +84,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertScrapApplyDetails(ScrapApplyDetails scrapApplyDetails)
|
public int insertScrapApplyDetails(ScrapApplyDetails scrapApplyDetails) {
|
||||||
{
|
|
||||||
scrapApplyDetails.setCreateTime(DateUtils.getNowDate());
|
scrapApplyDetails.setCreateTime(DateUtils.getNowDate());
|
||||||
return scrapApplyDetailsMapper.insertScrapApplyDetails(scrapApplyDetails);
|
return scrapApplyDetailsMapper.insertScrapApplyDetails(scrapApplyDetails);
|
||||||
}
|
}
|
||||||
|
|
@ -92,8 +96,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateScrapApplyDetails(ScrapApplyDetails scrapApplyDetails)
|
public int updateScrapApplyDetails(ScrapApplyDetails scrapApplyDetails) {
|
||||||
{
|
|
||||||
scrapApplyDetails.setUpdateTime(DateUtils.getNowDate());
|
scrapApplyDetails.setUpdateTime(DateUtils.getNowDate());
|
||||||
return scrapApplyDetailsMapper.updateScrapApplyDetails(scrapApplyDetails);
|
return scrapApplyDetailsMapper.updateScrapApplyDetails(scrapApplyDetails);
|
||||||
}
|
}
|
||||||
|
|
@ -105,8 +108,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteScrapApplyDetailsByIds(Long[] ids)
|
public int deleteScrapApplyDetailsByIds(Long[] ids) {
|
||||||
{
|
|
||||||
return scrapApplyDetailsMapper.deleteScrapApplyDetailsByIds(ids);
|
return scrapApplyDetailsMapper.deleteScrapApplyDetailsByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -117,8 +119,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteScrapApplyDetailsById(Long id)
|
public int deleteScrapApplyDetailsById(Long id) {
|
||||||
{
|
|
||||||
return scrapApplyDetailsMapper.deleteScrapApplyDetailsById(id);
|
return scrapApplyDetailsMapper.deleteScrapApplyDetailsById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -141,28 +142,115 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
||||||
@Transactional
|
@Transactional
|
||||||
public int auditScrap(ScrapAudit scrapAudit) throws Exception {
|
public int auditScrap(ScrapAudit scrapAudit) throws Exception {
|
||||||
String checkResult = scrapAudit.getCheckResult();
|
String checkResult = scrapAudit.getCheckResult();
|
||||||
|
List<ScrapApplyDetails> scrapDetailList = scrapAudit.getScrapDetailList();
|
||||||
List<Long> taskIdList = scrapAudit.getTaskIdList();
|
List<Long> taskIdList = scrapAudit.getTaskIdList();
|
||||||
for (Long taskId : taskIdList) {
|
for (Long taskId : taskIdList) {
|
||||||
// 查询协议表
|
String status = "0";
|
||||||
TmTask task1 = taskMapper.selectTmTaskByTaskId(taskId);
|
TmTask task1 = taskMapper.selectTmTaskByTaskId(taskId);
|
||||||
|
// 查询协议表
|
||||||
|
TmTaskAgreement tmTaskAgreement = agreementMapper.selectTmTaskAgreementByTaskId(taskId);
|
||||||
|
List<ScrapApplyDetails> notScrapList = scrapApplyDetailsMapper.selectnotScrapByTaskId(taskId);
|
||||||
|
List<ScrapApplyDetails> scrapAllApplyDetails = scrapApplyDetailsMapper.selectScrapDetailsByTaskId(taskId);
|
||||||
if (task1.getTaskStatus() == 47) {
|
if (task1.getTaskStatus() == 47) {
|
||||||
throw new Exception("报废审核已通过");
|
throw new Exception("报废审核已通过");
|
||||||
}
|
}
|
||||||
TmTask task = new TmTask();
|
TmTask task = new TmTask();
|
||||||
task.setTaskId(taskId);
|
task.setTaskId(taskId);
|
||||||
|
List<ScrapApplyDetails> scrapApplyDetailsList;
|
||||||
|
if (scrapDetailList != null && scrapDetailList.size()>0){
|
||||||
|
scrapApplyDetailsList = new ArrayList<>(scrapDetailList);
|
||||||
|
}else {
|
||||||
|
scrapApplyDetailsList = new ArrayList<>(scrapAllApplyDetails);
|
||||||
|
}
|
||||||
|
String taskCode ="";
|
||||||
|
int taskStatus= 0;
|
||||||
|
int taskType = 0;
|
||||||
|
int companyId = 0;
|
||||||
|
int parentId = 0;
|
||||||
if ("通过".equals(checkResult)) {
|
if ("通过".equals(checkResult)) {
|
||||||
List<ScrapApplyDetails> scrapApplyDetailsList = scrapApplyDetailsMapper.selectScrapDetailsByTaskId(taskId);
|
status = "1";
|
||||||
for (ScrapApplyDetails scrapApplyDetails : scrapApplyDetailsList) {
|
if (scrapApplyDetailsList.size()>0){
|
||||||
Long maId = scrapApplyDetails.getMaId();
|
for (ScrapApplyDetails scrapApplyDetails : scrapApplyDetailsList) {
|
||||||
if (maId != null && maId > 0) {
|
Long maId = scrapApplyDetails.getMaId();
|
||||||
scrapApplyDetailsMapper.updateMachine(maId);
|
if (maId != null && maId > 0) {
|
||||||
|
scrapApplyDetailsMapper.updateMachine(maId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
task.setTaskStatus(59);
|
if (notScrapList.size() == scrapApplyDetailsList.size()){
|
||||||
|
task.setTaskStatus(59);
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
task.setTaskStatus(61);
|
status = "2";
|
||||||
|
List<ScrapApplyDetails> backList = new ArrayList<>();
|
||||||
|
List<ScrapApplyDetails> repairList = new ArrayList<>();
|
||||||
|
if (scrapApplyDetailsList.size()>0){
|
||||||
|
for (ScrapApplyDetails bean : scrapApplyDetailsList){
|
||||||
|
if (bean.getScrapSource().equals("1")){
|
||||||
|
backList.add(bean);
|
||||||
|
}else if (bean.getScrapSource().equals("2")){
|
||||||
|
repairList.add(bean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (backList.size()>0){
|
||||||
|
if (backList.get(0).getCompanyId() != null){
|
||||||
|
companyId = Math.toIntExact(backList.get(0).getCompanyId());
|
||||||
|
}
|
||||||
|
if (backList.get(0).getParentId() != null){
|
||||||
|
parentId = Math.toIntExact(backList.get(0).getParentId());
|
||||||
|
}
|
||||||
|
taskCode = purchaseCodeRule("T",36);
|
||||||
|
taskStatus = 39;
|
||||||
|
taskType = 36;
|
||||||
|
long backTaskId = genTask(taskCode,taskType,taskStatus,tmTaskAgreement,companyId);
|
||||||
|
BackApplyInfo backApplyInfo = scrapApplyDetailsMapper.getBackApplyInfo(parentId);
|
||||||
|
backApplyInfo.setCode(taskCode);
|
||||||
|
backApplyInfo.setTaskId((int) backTaskId);
|
||||||
|
backApplyInfo.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||||
|
backApplyInfo.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||||
|
scrapApplyDetailsMapper.addBackInfo(backApplyInfo);
|
||||||
|
for (ScrapApplyDetails bean : backList){
|
||||||
|
bean.setParentId(backApplyInfo.getId());
|
||||||
|
bean.setStatus("1");
|
||||||
|
bean.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||||
|
bean.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||||
|
scrapApplyDetailsMapper.addBackDetails(bean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (repairList.size() >0){
|
||||||
|
if (repairList.get(0).getCompanyId() != null){
|
||||||
|
companyId = Math.toIntExact(repairList.get(0).getCompanyId());
|
||||||
|
}
|
||||||
|
taskCode = purchaseCodeRule("WX",45);
|
||||||
|
taskStatus = 46;
|
||||||
|
taskType = 45;
|
||||||
|
long repairTaskId = genTask(taskCode,taskType,taskStatus,tmTaskAgreement,companyId);
|
||||||
|
for (ScrapApplyDetails bean : repairList){
|
||||||
|
RepairAuditDetails details = scrapApplyDetailsMapper.getRepairAudit(bean.getParentId());
|
||||||
|
details.setTaskId(repairTaskId);
|
||||||
|
details.setStatus("0");
|
||||||
|
details.setRepairedNum(BigDecimal.valueOf(0));
|
||||||
|
details.setScrapNum(bean.getScrapNum());
|
||||||
|
details.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||||
|
details.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||||
|
scrapApplyDetailsMapper.addRepaieAudit(details);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (notScrapList.size() == scrapApplyDetailsList.size()){
|
||||||
|
task.setTaskStatus(61);
|
||||||
|
}
|
||||||
task.setRemark(scrapAudit.getRemark());
|
task.setRemark(scrapAudit.getRemark());
|
||||||
}
|
}
|
||||||
|
if (scrapApplyDetailsList.size()>0){
|
||||||
|
for (ScrapApplyDetails bean :scrapApplyDetailsList){
|
||||||
|
bean.setAuditBy(SecurityUtils.getLoginUser().getUserid());
|
||||||
|
bean.setStatus(status);
|
||||||
|
bean.setAuditRemark(scrapAudit.getRemark());
|
||||||
|
bean.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||||
|
scrapApplyDetailsMapper.updateStatus(bean);
|
||||||
|
}
|
||||||
|
}
|
||||||
task.setUpdateTime(new Date());
|
task.setUpdateTime(new Date());
|
||||||
task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||||
taskMapper.updateTmTask(task);
|
taskMapper.updateTmTask(task);
|
||||||
|
|
@ -170,5 +258,42 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String purchaseCodeRule(String code,Integer taskType) {
|
||||||
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
Date nowDate = DateUtils.getNowDate();
|
||||||
|
String format = dateFormat.format(nowDate);
|
||||||
|
int taskNum = taskMapper.selectTaskNumByMonth(nowDate,taskType) + 1;
|
||||||
|
String codeNum="";
|
||||||
|
if (taskNum>9 && taskNum<100){
|
||||||
|
codeNum = code + format + "-00" + taskNum;
|
||||||
|
}else if (taskNum>99 && taskNum<1000){
|
||||||
|
codeNum = code + format + "-0" + taskNum;
|
||||||
|
}else {
|
||||||
|
codeNum = code + format + "-000" + taskNum;
|
||||||
|
}
|
||||||
|
return codeNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
private long genTask(String taskCode,int taskType,int taskStatus,TmTaskAgreement tmTaskAgreement,int companyId){
|
||||||
|
TmTask task = new TmTask();
|
||||||
|
task.setCode(taskCode);
|
||||||
|
task.setTaskStatus(taskStatus);
|
||||||
|
task.setTaskType(taskType);
|
||||||
|
task.setCompanyId(companyId);
|
||||||
|
task.setCreateTime(new Date());
|
||||||
|
task.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||||
|
taskMapper.insertTmTask(task);
|
||||||
|
// 添加协议信息表
|
||||||
|
TmTaskAgreement taskAgreement = new TmTaskAgreement();
|
||||||
|
long taskId = task.getTaskId();
|
||||||
|
taskAgreement.setTaskId(taskId);
|
||||||
|
if (tmTaskAgreement.getAgreementId() == null){
|
||||||
|
throw new ServiceException("缺少协议数据");
|
||||||
|
}else {
|
||||||
|
taskAgreement.setAgreementId(tmTaskAgreement.getAgreementId());
|
||||||
|
}
|
||||||
|
taskAgreement.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||||
|
agreementMapper.insertTmTaskAgreement(taskAgreement);
|
||||||
|
return taskId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.sgzb.material.vo;
|
package com.bonus.sgzb.material.vo;
|
||||||
|
|
||||||
import com.bonus.sgzb.material.domain.RepairAuditDetails;
|
import com.bonus.sgzb.material.domain.RepairAuditDetails;
|
||||||
|
import com.bonus.sgzb.material.domain.ScrapApplyDetails;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
@ -21,4 +22,7 @@ public class ScrapAudit {
|
||||||
@ApiModelProperty(value = "审核任务明细")
|
@ApiModelProperty(value = "审核任务明细")
|
||||||
private List<RepairAuditDetails> auditDetailList;
|
private List<RepairAuditDetails> auditDetailList;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "报废任务明细")
|
||||||
|
private List<ScrapApplyDetails> scrapDetailList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="protocol" column="protocol"/>
|
||||||
<result property="companyId" column="company_id"/>
|
<result property="companyId" column="company_id"/>
|
||||||
<result property="fileName" column="file_name"/>
|
<result property="fileName" column="file_name"/>
|
||||||
<result property="fileUrl" column="file_url"/>
|
<result property="fileUrl" column="file_url"/>
|
||||||
|
|
@ -40,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="authPerson != null">auth_person,</if>
|
<if test="authPerson != null">auth_person,</if>
|
||||||
<if test="phone != null">phone,</if>
|
<if test="phone != null">phone,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="protocol != null">protocol,</if>
|
||||||
update_time,
|
update_time,
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
<if test="companyId != null">company_id,</if>
|
<if test="companyId != null">company_id,</if>
|
||||||
|
|
@ -59,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="authPerson != null">#{authPerson},</if>
|
<if test="authPerson != null">#{authPerson},</if>
|
||||||
<if test="phone != null">#{phone},</if>
|
<if test="phone != null">#{phone},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="protocol != null">#{protocol},</if>
|
||||||
NOW(),
|
NOW(),
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
<if test="companyId != null">#{companyId},</if>
|
<if test="companyId != null">#{companyId},</if>
|
||||||
|
|
@ -85,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="protocol != null">protocol = #{protocol},</if>
|
||||||
<if test="companyId != null">company_id = #{companyId},</if>
|
<if test="companyId != null">company_id = #{companyId},</if>
|
||||||
<if test="fileName != null">file_name = #{fileName},</if>
|
<if test="fileName != null">file_name = #{fileName},</if>
|
||||||
<if test="fileUrl != null">file_url = #{fileUrl},</if>
|
<if test="fileUrl != null">file_url = #{fileUrl},</if>
|
||||||
|
|
@ -99,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getAgreementInfoAll" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
|
<select id="getAgreementInfoAll" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
|
||||||
SELECT bai.agreement_id, bai.agreement_code , contract_code,file_url ,file_name,sign_time,
|
SELECT bai.agreement_id, bai.agreement_code , contract_code,file_url ,file_name,sign_time,
|
||||||
bui.unit_id,bui.unit_name , bp.lot_id as projectId , bp.lot_name as projectName,
|
bui.unit_id,bui.unit_name , bp.lot_id as projectId , bp.lot_name as projectName,
|
||||||
plan_start_time,lease_day,auth_person,phone,bai.remark
|
plan_start_time,lease_day,auth_person,phone,bai.remark,bai.protocol
|
||||||
FROM bm_agreement_info bai
|
FROM bm_agreement_info bai
|
||||||
LEFT JOIN bm_project_lot bp ON bp.lot_id = bai.project_id
|
LEFT JOIN bm_project_lot bp ON bp.lot_id = bai.project_id
|
||||||
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
update repair_audit_details
|
update repair_audit_details
|
||||||
set audit_by = #{auditBy},
|
set audit_by = #{auditBy},
|
||||||
audit_time = now(),
|
audit_time = now(),
|
||||||
status = #{status}
|
status = #{status},
|
||||||
|
update_by = #{updateBy},
|
||||||
|
update_time = now(),
|
||||||
|
audit_remark = #{auditRemark}
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -218,6 +218,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="fileName != null">#{fileName},</if>
|
<if test="fileName != null">#{fileName},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
<insert id="addBackDetails">
|
||||||
|
insert into back_apply_details (parent_id,type_id,pre_num,audit_num,status,create_by,create_time,update_by,update_time,company_id)
|
||||||
|
values (#{parentId},#{typeId},#{scrapNum},#{scrapNum},#{status},#{createBy},now(),#{updateBy},now(),#{companyId});
|
||||||
|
</insert>
|
||||||
|
<insert id="addBackInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into back_apply_info (code,task_id,back_person,phone,direct_audit_by,direct_audit_time,direct_audit_remark,create_by,create_time,update_by,update_time,company_id,back_time,status)
|
||||||
|
values (#{code},#{taskId},#{backPerson},#{phone},#{directAuditBy},#{directAuditTime},#{directAuditRemark},#{createBy},now(),#{updateBy},now(),#{companyId},#{backTime},#{status});
|
||||||
|
</insert>
|
||||||
|
<insert id="addRepaieAudit">
|
||||||
|
insert into repair_audit_details (task_id,repair_id,ma_id,type_id,repair_num,repaired_num,scrap_num,status,create_by,create_time,update_by,update_time,company_id)
|
||||||
|
values (#{taskId},#{repairId},#{maId},#{typeId},#{repairNum},#{repairedNum},#{scrapNum},#{status},#{createBy},now(),#{updateBy},now(),#{companyId});
|
||||||
|
</insert>
|
||||||
|
|
||||||
<update id="updateScrapApplyDetails" parameterType="com.bonus.sgzb.material.domain.ScrapApplyDetails">
|
<update id="updateScrapApplyDetails" parameterType="com.bonus.sgzb.material.domain.ScrapApplyDetails">
|
||||||
update scrap_apply_details
|
update scrap_apply_details
|
||||||
|
|
@ -285,6 +297,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<update id="updateMachine">
|
<update id="updateMachine">
|
||||||
update ma_machine set ma_status = 22 where ma_id = #{maId}
|
update ma_machine set ma_status = 22 where ma_id = #{maId}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateStatus">
|
||||||
|
update scrap_apply_details
|
||||||
|
set audit_by = #{auditBy},
|
||||||
|
audit_time = now(),
|
||||||
|
status = #{status},
|
||||||
|
update_by = #{updateBy},
|
||||||
|
update_time = now(),
|
||||||
|
audit_remark = #{auditRemark}
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="selectTypeNameByTaskId" resultType="java.lang.String">
|
<select id="selectTypeNameByTaskId" resultType="java.lang.String">
|
||||||
select GROUP_CONCAT(type_name) typeName from
|
select GROUP_CONCAT(type_name) typeName from
|
||||||
|
|
@ -296,5 +318,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
) t
|
) t
|
||||||
GROUP BY task_id
|
GROUP BY task_id
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectnotScrapByTaskId" resultType="com.bonus.sgzb.material.domain.ScrapApplyDetails">
|
||||||
|
<include refid="selectScrapApplyDetailsVo"/>
|
||||||
|
where task_id = #{taskId} and status = '0'
|
||||||
|
</select>
|
||||||
|
<select id="getBackApplyInfo" resultType="com.bonus.sgzb.material.domain.BackApplyInfo">
|
||||||
|
select id,
|
||||||
|
code,
|
||||||
|
task_id as taskId,
|
||||||
|
back_person as backPerson,
|
||||||
|
phone,
|
||||||
|
direct_audit_by as directAuditBy,
|
||||||
|
direct_audit_time as directAuditTime,
|
||||||
|
direct_audit_remark as directAuditRemark,
|
||||||
|
company_id as companyId,
|
||||||
|
back_time as backTime,
|
||||||
|
status
|
||||||
|
from back_apply_info
|
||||||
|
where id = #{parentId}
|
||||||
|
</select>
|
||||||
|
<select id="getRepairAudit" resultType="com.bonus.sgzb.material.domain.RepairAuditDetails">
|
||||||
|
select id,
|
||||||
|
task_id as taskId,
|
||||||
|
repair_id as repairId,
|
||||||
|
ma_id as maId,
|
||||||
|
type_id as typeId,
|
||||||
|
repair_num as repairNum,
|
||||||
|
scrap_num as scrapNum,
|
||||||
|
company_id as companyId
|
||||||
|
from repair_audit_details
|
||||||
|
where id = #{parentId}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -28,6 +28,17 @@ public class SysNotice extends BaseEntity
|
||||||
/** 公告内容 */
|
/** 公告内容 */
|
||||||
private String noticeContent;
|
private String noticeContent;
|
||||||
|
|
||||||
|
/** 用户昵称 */
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
public String getNickName() {
|
||||||
|
return nickName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNickName(String nickName) {
|
||||||
|
this.nickName = nickName;
|
||||||
|
}
|
||||||
|
|
||||||
/** 公告状态(0正常 1关闭) */
|
/** 公告状态(0正常 1关闭) */
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<resultMap type="com.bonus.sgzb.system.api.domain.SysLogininfor" id="SysLogininforResult">
|
<resultMap type="com.bonus.sgzb.system.api.domain.SysLogininfor" id="SysLogininforResult">
|
||||||
<id property="infoId" column="info_id" />
|
<id property="infoId" column="info_id" />
|
||||||
<result property="userName" column="user_name" />
|
<result property="userName" column="user_name" />
|
||||||
|
<result property="nickName" column="nick_name" />
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
<result property="ipaddr" column="ipaddr" />
|
<result property="ipaddr" column="ipaddr" />
|
||||||
<result property="msg" column="msg" />
|
<result property="msg" column="msg" />
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="noticeContent" column="notice_content" />
|
<result property="noticeContent" column="notice_content" />
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="nickName" column="nick_name" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
|
@ -28,16 +29,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectNoticeList" parameterType="com.bonus.sgzb.system.domain.SysNotice" resultMap="SysNoticeResult">
|
<select id="selectNoticeList" parameterType="com.bonus.sgzb.system.domain.SysNotice" resultMap="SysNoticeResult">
|
||||||
<include refid="selectNoticeVo"/>
|
select sn.notice_id,
|
||||||
|
sn.notice_title,
|
||||||
|
sn.notice_type,
|
||||||
|
cast(sn.notice_content as char) as notice_content,
|
||||||
|
sn.status,
|
||||||
|
sn.create_by,
|
||||||
|
su.nick_name,
|
||||||
|
sn.create_time,
|
||||||
|
sn.update_by,
|
||||||
|
sn.update_time,
|
||||||
|
sn.remark
|
||||||
|
from sys_notice sn left join sys_user su on sn.create_by = su.user_name
|
||||||
|
where 1=1
|
||||||
<where>
|
<where>
|
||||||
<if test="noticeTitle != null and noticeTitle != ''">
|
<if test="noticeTitle != null and noticeTitle != ''">
|
||||||
AND notice_title like concat('%', #{noticeTitle}, '%')
|
AND sn.notice_title like concat('%', #{noticeTitle}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="noticeType != null and noticeType != ''">
|
<if test="noticeType != null and noticeType != ''">
|
||||||
AND notice_type = #{noticeType}
|
AND sn.notice_type = #{noticeType}
|
||||||
</if>
|
</if>
|
||||||
<if test="createBy != null and createBy != ''">
|
<if test="createBy != null and createBy != ''">
|
||||||
AND create_by like concat('%', #{createBy}, '%')
|
AND sn.create_by like concat('%', #{createBy}, '%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="requestMethod" column="request_method" />
|
<result property="requestMethod" column="request_method" />
|
||||||
<result property="operatorType" column="operator_type" />
|
<result property="operatorType" column="operator_type" />
|
||||||
<result property="operName" column="oper_name" />
|
<result property="operName" column="oper_name" />
|
||||||
|
<result property="nickName" column="nick_name" />
|
||||||
<result property="deptName" column="dept_name" />
|
<result property="deptName" column="dept_name" />
|
||||||
<result property="operUrl" column="oper_url" />
|
<result property="operUrl" column="oper_url" />
|
||||||
<result property="operIp" column="oper_ip" />
|
<result property="operIp" column="oper_ip" />
|
||||||
|
|
@ -34,34 +35,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="selectOperLogList" parameterType="com.bonus.sgzb.system.api.domain.SysOperLog" resultMap="SysOperLogResult">
|
<select id="selectOperLogList" parameterType="com.bonus.sgzb.system.api.domain.SysOperLog" resultMap="SysOperLogResult">
|
||||||
<include refid="selectOperLogVo"/>
|
select sol.oper_id, sol.title, sol.business_type, sol.method, sol.request_method, sol.operator_type, sol.oper_name, su.nick_name, sol.dept_name, sol.oper_url, sol.oper_ip, sol.oper_param, sol.json_result, sol.status, sol.error_msg, sol.oper_time, sol.cost_time
|
||||||
|
from sys_oper_log sol left join sys_user su on sol.oper_name = su.user_name where 1=1
|
||||||
<where>
|
<where>
|
||||||
<if test="operIp != null and operIp != ''">
|
<if test="operIp != null and operIp != ''">
|
||||||
AND oper_ip like concat('%', #{operIp}, '%')
|
AND sol.oper_ip like concat('%', #{operIp}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="title != null and title != ''">
|
<if test="title != null and title != ''">
|
||||||
AND title like concat('%', #{title}, '%')
|
AND sol.title like concat('%', #{title}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="businessType != null">
|
<if test="businessType != null">
|
||||||
AND business_type = #{businessType}
|
AND sol.business_type = #{businessType}
|
||||||
</if>
|
</if>
|
||||||
<if test="businessTypes != null and businessTypes.length > 0">
|
<if test="businessTypes != null and businessTypes.length > 0">
|
||||||
AND business_type in
|
AND sol.business_type in
|
||||||
<foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">
|
<foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">
|
||||||
#{businessType}
|
#{businessType}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
AND status = #{status}
|
AND sol.status = #{status}
|
||||||
</if>
|
</if>
|
||||||
<if test="operName != null and operName != ''">
|
<if test="operName != null and operName != ''">
|
||||||
AND oper_name like concat('%', #{operName}, '%')
|
AND sol.oper_name like concat('%', #{operName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
AND oper_time >= #{params.beginTime}
|
AND sol.oper_time >= #{params.beginTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
AND oper_time <= #{params.endTime}
|
AND sol.oper_time <= #{params.endTime}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by oper_id desc
|
order by oper_id desc
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue