杜函宇 2 months ago
commit 420e7dc659

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.tc.entity.AssetCurrent;
import com.ruoyi.tc.entity.AssetLc;
import com.ruoyi.tc.entity.AssetTask;
@ -33,6 +34,7 @@ import java.time.LocalDateTime;
*/
@Api(tags = "任务主表")
@RestController
@Transactional(rollbackFor = Exception.class)
@RequestMapping("/unit/assetTask")
public class AssetTaskController extends BaseController {
/**
@ -74,6 +76,9 @@ public class AssetTaskController extends BaseController {
@Resource
private AssetLcService assetLcService;
@Resource
private AssetCurrentService assetCurrentService;
/**
*
*
@ -184,12 +189,15 @@ public class AssetTaskController extends BaseController {
assetSupplyChainCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId());
unitOtherConcatCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId());
assetBasicNetworkCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId());
AssetCurrent ac = new AssetCurrent();
if (StringUtils.isBlank(assetCurrent.getBfyy())) {
//待审批
assetCurrent.setStatus(0);
} else {
//已报废
assetCurrent.setStatus(5);
assetCurrent.setXtzt("5");
}
StringBuilder a = new StringBuilder();
if (!assetCurrent.getGlymList().isEmpty()) {
@ -208,6 +216,8 @@ public class AssetTaskController extends BaseController {
}
assetCurrent.setGlIp(b.toString());
// assetCurrent.setCurrentId(null);
BeanUtils.copyProperties(assetCurrent,ac);
assetCurrentService.updateById(ac);
assetCurrentCpService.save(assetCurrent);
//新增新监管业务形态
if (assetCurrent.getXjgywxt() != null) {
@ -266,12 +276,12 @@ public class AssetTaskController extends BaseController {
assetLc.setTaskId(assetCurrent.getTaskId());
assetLc.setAssetName(assetCurrent.getXtmc());
//当审核状态为审核不通过 单位端重新提交
if (assetCurrent.getStatus().equals(4)) {
assetLc.setTaskId(assetCurrent.getTaskId());
assetLc.setXfTime(LocalDateTime.now());
assetLc.setAssetName("单位重新核查提交时间" + assetCurrent.getXtmc());
assetLcService.insert(assetLc);
}
// if (assetCurrent.getStatus().equals(4)) {
// assetLc.setTaskId(assetCurrent.getTaskId());
// assetLc.setXfTime(LocalDateTime.now());
// assetLc.setAssetName("单位重新核查提交时间" + assetCurrent.getXtmc());
// assetLcService.insert(assetLc);
// }
StringBuilder a = new StringBuilder();
if (!assetCurrent.getGlymList().isEmpty()) {

@ -34,7 +34,7 @@ import java.util.List;
*/
@Api(tags = "单位表控制层")
@RestController
@PreAuthorize("@ss.hasAnyRoles('admin,common')")
//@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@RequestMapping("/tc/unit")
public class UnitController {

@ -18,7 +18,11 @@ public class AssetCurrentShRequest {
@ApiModelProperty("任务id")
private Integer taskId;
/**
*
*/
@ApiModelProperty("系统名称")
private String xtmc;
/**
* id

@ -58,4 +58,11 @@ public class AssetTaskPageRequest {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endTime;
/**
*
*/
@ApiModelProperty("单位名称")
private String dwmc;
}

@ -20,4 +20,11 @@ public class AssetdwHcRequest {
private String dwmc;
/**
* id
*/
@ApiModelProperty("任务id")
private Integer taskId;
}

@ -2,6 +2,7 @@ package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.AssetBasicNetwork;
import org.apache.ibatis.annotations.Param;
import java.io.Serializable;
import java.util.List;
@ -22,5 +23,12 @@ public interface AssetBasicNetWorkMapper extends BaseMapper<AssetBasicNetwork> {
*/
void deleteByAssetIds(Long id);
/**
*
* @param idList
*/
void deleteIdList(@Param("idList") List<Long> idList);
}

@ -2,6 +2,7 @@ package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.AssetBusinessForm;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -16,5 +17,12 @@ public interface AssetBusinessFormMapper extends BaseMapper<AssetBusinessForm> {
*
*/
void deleteByAssetIds(Long id);
/**
*
* @param idList
*/
void deleteIdList(@Param("idList") List<Long> idList);
}

@ -33,5 +33,13 @@ public interface AssetCurrentMapper extends BaseMapper<AssetCurrent> {
*
*/
void deleteByUnitIds(Long id);
/**
*
* @param idList
*/
void deleteIdList(@Param("idList") List<Long> idList);
}

@ -2,6 +2,7 @@ package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.AssetSupplyChain;
import org.apache.ibatis.annotations.Param;
import java.io.Serializable;
import java.util.List;
@ -28,5 +29,13 @@ public interface AssetSupplyChainMapper extends BaseMapper<AssetSupplyChain> {
* id
*/
AssetSupplyChain getYydw(Long id);
/**
*
* @param idList
*/
void deleteIdList(@Param("idList") List<Long> idList);
}

@ -2,6 +2,7 @@ package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.UnitOtherConcat;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -20,4 +21,11 @@ public interface UnitOtherConcatMapper extends BaseMapper<UnitOtherConcat>
* assetId
*/
void deleteByAssetIds(Long id);
/**
*
* @param idList
*/
void deleteIdList(@Param("idList") List<Long> idList);
}

@ -23,4 +23,13 @@ public interface AssetBasicNetworkService extends IService<AssetBasicNetwork> {
*
*/
void deleteByAssetIds(Long id);
/**
*
* @param netWorkidList
*/
void deleteIdList(List<Long> netWorkidList);
}

@ -17,5 +17,12 @@ public interface AssetBusinessFormService extends IService<AssetBusinessForm> {
*
*/
void deleteByAssetIds(Long id);
/**
*
* @param bussinessidList
*/
void deleteIdList(List<Long> bussinessidList);
}

@ -24,7 +24,7 @@ public interface AssetCurrentService extends IService<AssetCurrent> {
* @param as
* @return
*/
Page<AssetCurrent> page(Page<AssetCurrent> page, AssetCurrentPageRequest as );
Page<AssetCurrent> page(Page<AssetCurrent> page, AssetCurrentPageRequest as);
/**
*
@ -32,7 +32,7 @@ public interface AssetCurrentService extends IService<AssetCurrent> {
* @param as
* @return
*/
List<AssetExport> page(AssetCurrentPageRequest as );
List<AssetExport> page(AssetCurrentPageRequest as);
/**
*
@ -46,5 +46,11 @@ public interface AssetCurrentService extends IService<AssetCurrent> {
*
*/
void deleteByUnitIds(Long id);
/**
*
* @param idList
*/
void deleteIdList(List<Long> idList);
}

@ -27,4 +27,12 @@ public interface AssetSupplyChainService extends IService<AssetSupplyChain> {
* id
*/
AssetSupplyChain getYydw(Long id);
/**
*
* @param SupplyChainidList
*/
void deleteIdList(List<Long> SupplyChainidList);
}

@ -22,4 +22,11 @@ public interface UnitOtherConcatService extends IService<UnitOtherConcat> {
* unitId
*/
void deleteByUnitIds(Long id);
/**
*
* @param UnitOtherConcatidList
*/
void deleteIdList(List<Long> UnitOtherConcatidList);
}

@ -32,4 +32,9 @@ public class AssetBasicNetworkServiceImpl extends ServiceImpl<AssetBasicNetWorkM
public void deleteByAssetIds(Long id) {
baseMapper.deleteByAssetIds(id);
}
@Override
public void deleteIdList(List<Long> netWorkidList) {
baseMapper.deleteIdList(netWorkidList);
}
}

@ -24,5 +24,10 @@ public class AssetBusinessFormServiceImpl extends ServiceImpl<AssetBusinessFormM
public void deleteByAssetIds(Long id) {
baseMapper.deleteByAssetIds(id);
}
@Override
public void deleteIdList(List<Long> idList) {
baseMapper.deleteIdList(idList);
}
}

@ -95,5 +95,10 @@ public class AssetCurrentServiceImpl extends ServiceImpl<AssetCurrentMapper, Ass
public void deleteByUnitIds(Long id) {
baseMapper.deleteByUnitIds(id);
}
@Override
public void deleteIdList(List<Long> idList) {
baseMapper.deleteIdList(idList);
}
}

@ -41,4 +41,9 @@ public class AssetSupplyChainServiceImpl extends ServiceImpl<AssetSupplyChainMap
public AssetSupplyChain getYydw(Long id) {
return baseMapper.getYydw(id);
}
@Override
public void deleteIdList(List<Long> SupplyChainidList) {
baseMapper.deleteIdList(SupplyChainidList);
}
}

@ -1,5 +1,6 @@
package com.ruoyi.tc.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.bean.BeanUtils;
@ -13,11 +14,13 @@ import com.ruoyi.tc.entity.response.AssetdwHcResponse;
import com.ruoyi.tc.mapper.AssetTaskMapper;
import com.ruoyi.tc.service.*;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
@ -68,6 +71,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
@Resource
private UnitOtherConcatService unitOtherConcatService;
/**
* ID
*
@ -100,7 +104,8 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
@Override
public void insert(AssetTask assetTask) {
//任务新增
int id = assetTaskDao.insert(assetTask);
assetTaskDao.insert(assetTask);
int id = assetTask.getId();
//新增流程节点
AssetLc assetLc = new AssetLc();
assetLc.setTaskId(id);
@ -122,11 +127,12 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
List<AssetBusinessFormCpPo> bussList = assetBusinessFormCpService.findByassetId(assetCurrentResponse.getId());
if (bussList != null) {
for (AssetBusinessFormCpPo assetBusinessFormCpResponse : bussList) {
assetCurrentResponse.getXjgywxt().setBusinessId(assetBusinessFormCpResponse.getBusinessId());
assetCurrentResponse.getXjgywxt().setAssetId(assetCurrentResponse.getId());
if (assetCurrentResponse.getXjgywxt() != null) {
assetCurrentResponse.getXjgywxt().setAssetId(assetBusinessFormCpResponse.getAssetId());
assetCurrentResponse.getXjgywxt().setTaskId(id);
assetBusinessFormCpResponseList.add(assetCurrentResponse.getXjgywxt());
}
}
assetBusinessFormCpService.saveBatch(assetBusinessFormCpResponseList);
}
//根据资产id查询供应链主表id-
@ -217,7 +223,12 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
@Override
public Page<AssestTaskXqresponse> zcHc(Page<AssestTaskXqresponse> assetTask, AssestTaskXqRequest pageRequest) {
assetTask.setOptimizeCountSql(false);
return assetTaskDao.zcHc(assetTask, pageRequest);
Page<AssestTaskXqresponse> result = assetTaskDao.zcHc(assetTask, pageRequest);
// 确保 records 不为 null
if (result.getRecords() == null) {
result.setRecords(new ArrayList<>()); // 设置为空数组
}
return result;
}
@Override
@ -227,11 +238,11 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
if (req.getStatus() == 3) {
assetLc.setTaskId(req.getTaskId());
assetLc.setXfTime(LocalDateTime.now());
assetLc.setAssetName("管理员审核通过");
assetLc.setAssetName("管理员审核通过"+req.getXtmc());
assetLcService.insert(assetLc);
} else if (req.getStatus() == 4) {
assetLc.setTaskId(req.getTaskId());
assetLc.setAssetName("管理员审核不通过");
assetLc.setAssetName("管理员审核不通过"+req.getXtmc());
assetLc.setXfTime(LocalDateTime.now());
assetLcService.insert(assetLc);
}
@ -244,6 +255,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
boolean allApproved = list.stream().allMatch(item -> item.getStatus() == 3);
boolean hasExpired = list.stream().anyMatch(item -> item.getDeadstatus() == 6);
boolean hasRejected = list.stream().anyMatch(item -> item.getStatus() == 4);
boolean hased = list.stream().anyMatch(item -> item.getStatus() == 5);
LocalDateTime finishTime = null;
if (hasPendingApproval) {
// 资产状态存在待审批,任务状态为进行中
@ -260,7 +272,20 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
taskSaveOrDelete(req);
} else if (hasRejected) {
// 审核不通过
taskStatus = 4;
taskStatus = 1;
} else if (hased && !hasRejected && !hasExpired) {
//存在已报废并且其他都已完成 且未超期
taskStatus = 2;
finishTime = LocalDateTime.now();
taskSaveOrDelete(req);
}
else if(hased && !hasRejected && hasExpired){
//存在已报废并且其他都已完成 且未超期
taskStatus = 3;
finishTime = LocalDateTime.now();
taskSaveOrDelete(req);
} else if (hased && !hasPendingApproval && !allApproved && ! hasExpired && !hasRejected) {
taskStatus = 3;
}
//修改主表任务状态
assetTaskDao.updateByTaskId(taskStatus, req.getTaskId(), finishTime);
@ -274,7 +299,10 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
.map(AssetCurrentCpPo::getId)
.collect(Collectors.toList());
//删除原有数据
assetCurrentService.removeBatchByIds(idList);
if (CollectionUtil.isNotEmpty(idList)) {
assetCurrentService.deleteIdList(idList);
}
//将子表数据复制到主表中
List<AssetCurrent> currentNewList = currentList.stream()
.map(cpPo -> {
@ -290,7 +318,10 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
.map(AssetBusinessFormCpPo::getAssetId)
.collect(Collectors.toList());
//删除原有数据
assetBusinessFormService.removeBatchByIds(bussinessidList);
if (CollectionUtil.isNotEmpty(bussinessidList)) {
assetBusinessFormService.deleteIdList(bussinessidList);
}
//将子表数据复制到主表中
List<AssetBusinessForm> bussinessNewList = bussinessList.stream()
.map(cpPo -> {
@ -306,7 +337,10 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
.map(AssetBasicNetworkCpPo::getAssetId)
.collect(Collectors.toList());
//删除原有数据
assetBasicNetworkService.removeBatchByIds(netWorkidList);
if (CollectionUtil.isNotEmpty(netWorkidList)) {
assetBasicNetworkService.deleteIdList(netWorkidList);
}
//将子表数据复制到主表中
List<AssetBasicNetwork> netWorkNewList = netWorkList.stream()
.map(cpPo -> {
@ -322,10 +356,14 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
.map(AssetSupplyChainCpPo::getAssetId)
.collect(Collectors.toList());
//删除原有数据
assetSupplyChainService.removeBatchByIds(SupplyChainidList);
if (CollectionUtil.isNotEmpty(SupplyChainidList)) {
assetSupplyChainService.deleteIdList(SupplyChainidList);
}
List<AssetSupplyChain> SupplyChainNewList = SupplyChainList.stream()
.map(cpPo -> {
AssetSupplyChain supplyChain = new AssetSupplyChain();
supplyChain.setId(null);
BeanUtils.copyProperties(cpPo, supplyChain); // 复制属性
return supplyChain; // 返回新对象
})
@ -337,7 +375,9 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
.map(UnitOtherConcatCpPo::getAssetId)
.collect(Collectors.toList());
//删除原有数据
unitOtherConcatService.removeBatchByIds(UnitOtherConcatidList);
if (CollectionUtil.isNotEmpty(UnitOtherConcatidList)) {
unitOtherConcatService.deleteIdList(UnitOtherConcatidList);
}
List<UnitOtherConcat> UnitOtherConcatNewList = UnitOtherConcatList.stream()
.map(cpPo -> {
UnitOtherConcat unitOtherConcat = new UnitOtherConcat();
@ -345,7 +385,6 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
return unitOtherConcat; // 返回新对象
})
.collect(Collectors.toList());
assetSupplyChainService.saveBatch(SupplyChainNewList);
unitOtherConcatService.saveBatch(UnitOtherConcatNewList);
}

@ -30,4 +30,9 @@ public class UnitOtherConcatServiceImpl extends ServiceImpl<UnitOtherConcatMapp
public void deleteByUnitIds(Long id) {
baseMapper.deleteByUnitIds(id);
}
@Override
public void deleteIdList(List<Long> UnitOtherConcatidList) {
baseMapper.deleteIdList(UnitOtherConcatidList);
}
}

@ -4,6 +4,13 @@
<update id="deleteByAssetIds">
update asset_basic_network set del_flag = '2' where asset_id = #{id}
</update>
<delete id="deleteIdList">
DELETE FROM asset_basic_network
WHERE asset_id IN
<foreach item="id" index="index" collection="idList" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="getByAssetId" resultType="com.ruoyi.tc.entity.AssetBasicNetwork">
select *

@ -5,5 +5,12 @@
<update id="deleteByAssetIds">
update asset_business_form set del_flag = '2' where asset_id = #{id}
</update>
<delete id="deleteIdList">
DELETE FROM asset_business_form
WHERE asset_id IN
<foreach item="id" index="index" collection="idList" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -3,12 +3,19 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.tc.mapper.AssetCurrentMapper">
<delete id="deleteIdList">
DELETE FROM asset_current
WHERE id IN
<foreach item="id" index="index" collection="idList" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="page" resultType="com.ruoyi.tc.entity.AssetCurrent">
select * from asset_current
<where>
del_flag = '0' and isbf = '0'
del_flag = '0'
<if test="req.xtmc!=null and req.xtmc!='' ">
and xtmc like concat('%',#{req.xtmc},'%')
</if>

@ -4,6 +4,13 @@
<update id="deleteByAssetIds">
update asset_supply_chain set del_flag = '2' where asset_id = #{id}
</update>
<delete id="deleteIdList">
DELETE FROM asset_supply_chain
WHERE asset_id IN
<foreach item="id" index="index" collection="idList" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="getJsdw" resultType="com.ruoyi.tc.entity.AssetSupplyChain">
select *

@ -176,6 +176,9 @@
<if test="req.taskName != null and req.taskName != ''">
and task_name = #{req.taskName}
</if>
<if test="req.dwmc != null and req.dwmc != ''">
and dwmc like concat('%',#{req.dwmc},'%')
</if>
<if test="req.begainTime != null">
and task_finish_time &gt;= #{req.begainTime}
</if>
@ -185,11 +188,12 @@
<if test="req.taskStatus != null and req.taskStatus != ''">
and task_status = #{req.taskStatus}
</if>
<if test="req.id != null ">
and id = #{req.id}
</if>
</where>
order by task_time desc
</select>
<select id="findByDwmcAssetCurrent" resultType="com.ruoyi.tc.entity.po.AssetCurrentCpPo">
select * from asset_current
@ -217,6 +221,10 @@
<if test="req.taskId !=null ">
and a.id = #{req.taskId}
</if>
<if test="req.taskId !=null ">
and b.task_id=#{req.taskId}
</if>
<if test="req.status!=null ">
and b.status =#{req.status}
</if>
@ -237,7 +245,7 @@
dwmc,
COUNT(*) AS total,
SUM(CASE WHEN status = 0 THEN 1 ELSE 0 END) AS notChecked,
SUM(CASE WHEN status = 1 THEN 1 ELSE 0 END) AS checked,
SUM(CASE WHEN status = 3 or status = 5 THEN 1 ELSE 0 END) AS checked,
ROUND(
CASE
WHEN COUNT(*) > 0 THEN
@ -250,6 +258,10 @@
<if test="req.dwmc!=null and req.dwmc!='' ">
and dwmc like concat('%',#{req.dwmc},'%')
</if>
<if test="req.taskId!=null and req.taskId!='' ">
and task_id =#{req.taskId}
</if>
</where>
GROUP BY
dwmc
@ -257,15 +269,15 @@
</select>
<select id="findByTaskId" resultType="com.ruoyi.tc.entity.response.AssetTaskStatusResponse">
SELECT
a.status,
a.STATUS,
CASE
WHEN DATE(a.update_time) > STR_TO_DATE(IFNULL(b.task_deadline, '1970-01-01'), '%Y-%m-%d') THEN '6'
ELSE '7'
WHEN DATE ( a.update_time ) > b.task_deadline THEN
'6' ELSE '7'
END AS deadstatus
FROM
asset_current_cp a
LEFT JOIN
asset_task b ON a.task_id = b.id
LEFT JOIN asset_task b ON a.task_id = b.id
<where>
<if test="taskId!=null ">
and a.task_id =#{taskId}

@ -113,9 +113,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="dwList" resultType="com.ruoyi.tc.entity.Unit">
SELECT a.*
FROM unit_info a
WHERE NOT EXISTS (
SELECT 1
FROM asset_task
<where>
a.nick_name NOT IN (SELECT dwmc FROM asset_task where task_status=1) and
a.del_flag = '0'
task_status = 1 AND FIND_IN_SET(a.nick_name, dwmc)
) AND a.del_flag = '0' and a.nick_name IN (SELECT dwmc FROM asset_current)
<if test="req.nickName != null and req.nickName != '' ">
and a.nick_name like concat('%',#{req.nickName},'%')
</if>
@ -126,6 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and a.user_name like concat('%',#{req.userName},'%')
</if>
</where>
</select>
<update id="deleteUnits">
update unit_info set del_flag = '2' where id = #{id}

@ -10,4 +10,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="deleteByAssetIds">
update unit_other_contact set del_flag = '2' where asset_id = #{id}
</update>
<delete id="deleteIdList">
DELETE FROM unit_other_contact
WHERE asset_id IN
<foreach item="id" index="index" collection="idList" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -115,7 +115,7 @@ public class SecurityConfig
// 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
.antMatchers("/unit/assetTask/**","/tc/**","/unit/assetLc/**").permitAll()
// .antMatchers("/unit/assetTask/**","/tc/**","/unit/assetLc/**","/tc/unit/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated();
})

Loading…
Cancel
Save