短路功能迁移

pull/3/head
liujun 2023-12-13 10:14:00 +08:00
parent cce02a4d42
commit 520d5a03c6
7 changed files with 657 additions and 32 deletions

View File

@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartRequest;
import javax.annotation.Resource;
import java.text.DecimalFormat;
@ -37,6 +38,8 @@ public class AppGFCutRoadController extends BaseController {
@Resource
private GFCutRoadToMeasuresService GFcutRoadToMeasuresService;
@Autowired
private GFCutRoadAcceptUserService cutroadacceptuserService;
@Autowired
private SendMessageUtil sendMessageUtil;
/**
* @param
@ -76,6 +79,18 @@ public class AppGFCutRoadController extends BaseController {
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
PageData pd2 = new PageData();
Calendar calendar = Calendar.getInstance();
DecimalFormat dft=new DecimalFormat("00");
int year = calendar.get(Calendar.YEAR);
String month = dft.format(calendar.get(Calendar.MONTH) + 1);
String day = dft.format(calendar.get(Calendar.DAY_OF_MONTH));
pd2.put("CREATDATE",year + "-" + month + "-" + day);
pd2.put("CORPINFO_ID",pd.get("CORPINFO_ID"));
pd2 = GFcutRoadService.getCode(pd2); //根据ID读取
String code = "DL"+year + month + day + dft.format((Integer.parseInt(pd2.get("code").toString())+1));
pd = this.getPageData();
pd.put("CHECK_NO", code);
pd.put("CUTROAD_ID", this.get32UUID()); //主键
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
@ -93,21 +108,7 @@ public class AppGFCutRoadController extends BaseController {
}
GFcutRoadService.save(pd);
GFcutRoadToMeasuresService.delete(pd);
if(pd.get("measuresList")!=null){
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("measuresList").toString());
for (JSONObject json : list) {
PageData measures = new PageData();
measures.put("CUTROADTOMEASURES_ID", this.get32UUID()); // 主键
measures.put("CUTROAD_ID", pd.get("CUTROAD_ID"));
measures.put("BUS_CUTROAD_MEASURES_ID", json.get("BUS_CUTROAD_MEASURES_ID"));
measures.put("STATUS", json.get("STATUS"));
measures.put("ANSWER", json.get("ANSWER"));
measures.put("CONFIRM_ID", pd.get("OPERATOR"));
measures.put("CONFIRM_NAME", pd.get("ACTION_USER"));
GFcutRoadToMeasuresService.save(measures);
}
}
if(pd.get("APPLY_STATUS").equals("1")) {
PageData log = new PageData();
log.put("CUTROADLOG_ID", this.get32UUID());
@ -200,7 +201,7 @@ public class AppGFCutRoadController extends BaseController {
/**
* @param out
* @param
* @throws Exception
*/
@RequestMapping(value="/delete")
@ -376,9 +377,7 @@ public class AppGFCutRoadController extends BaseController {
@RequestMapping(value="/editAcceptconfess")
@ResponseBody
@Transactional
public Object editAcceptconfess(
@RequestParam(value="FFILE",required=false) MultipartFile[] files
) throws Exception {
public Object editAcceptconfess(MultipartRequest request) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
@ -387,22 +386,147 @@ public class AppGFCutRoadController extends BaseController {
pd2 = GFcutRoadService.findById(pd);
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
if (files != null && files.length > 0) {
MultipartFile file = files[0];
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
String signertime = "";
String SIGNTIME[] = pd.getString("SIGNTIME").split(",");
String ffile = DateUtil.getDays();
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
pd2.put("ACCEPT_CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
pd2.put("ACCEPT_CONFESS_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
// pd2.put("GUARDIAN_CONTENT", pd.get("CONTENT"));
// pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
GFcutRoadService.edit(pd2);
for (int i = 0; i < SIGNTIME.length; i++) {
signertime = SIGNTIME[i];
fileList.add(request.getFile("file"+i));
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
saveImg(fileList.toArray(fileArr),signertime,pd.getString("CUTROAD_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID"));
fileList.clear();
}
map.put("result", errInfo);
return map;
}
private void saveImg(MultipartFile[] files,String signertime, String CUTROAD_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception{
if (files != null && files.length > 0) {
for (int i = 0; i < files.length; i++) {
PageData pd = new PageData();
pd = this.getPageData();
MultipartFile file = files[i];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());
pd.put("OPERATOR", pd.get("OPERATOR")); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
pd.put("ACCEPT_CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName);
pd.put("ISDELETE", '0');
pd.put("CORPINFO_ID", CORPINFO_ID);
pd.put("CUTROAD_ID", CUTROAD_ID);
pd.put("ACCEPT_CONFESS_USER_ID", ACCEPT_CONFESS_USER_ID);
pd.put("ACCEPT_CONFESS_DEPARTMENT_ID", ACCEPT_CONFESS_DEPARTMENT_ID);
pd.put("ACCEPT_USER_ID","");
pd.put("ACCEPT_DEPARTMENT_ID", "");
cutroadacceptuserService.save(pd);
}
}
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/editAcceptStatus")
@ResponseBody
@Transactional
public Object editAcceptStatus(MultipartRequest request) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
PageData pd2 = new PageData();
pd2 = GFcutRoadService.findById(pd);
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
PageData log = new PageData();
log.put("CUTROADLOG_ID", this.get32UUID());
// log.put("ACTION", "审核打回");
log.put("CUTROAD_ID", pd.get("CUTROAD_ID"));
log.put("CREATOR",pd.get("ACTION_USER"));
log.put("CREATTIME", DateUtil.date2Str(new Date()));
String status = pd.get("STATUS").toString();
String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") +
(StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;");
// String HAZARD_IDENTIFICATION = (StringUtils.isNotBlank(pd2.getString("HAZARD_IDENTIFICATION")) ? pd2.getString("HAZARD_IDENTIFICATION") : "") +
// (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? (pd.getString("HAZARD_IDENTIFICATION") + ";_;") : ";_;");
//打回清空数据
pd2.put("OTHER_PROTECTIVE_MEASURES", "");
// pd2.put("HAZARD_IDENTIFICATION", "");
switch (status) {
case "6"://验收人
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
String signertime = "";
String SIGNTIME[] = pd.getString("SIGNTIME").split(",");
for (int i = 0; i < SIGNTIME.length; i++) {
signertime = SIGNTIME[i];
fileList.add(request.getFile("file"+i));
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
saveAcceptImg(fileList.toArray(fileArr),signertime,pd.getString("BREAKGROUND_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_USER_ID"),pd.getString("ACCEPT_DEPARTMENT_ID"));
fileList.clear();
}
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES);
// pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION);
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
GFcutRoadService.edit(pd2);
log.put("ACTION", "验收通过");
// 发短信
this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2);
break;
case "-6"://审批打回
log.put("ACTION", "验收人打回");
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
GFcutRoadService.edit(pd2);
// 发短信
this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2);
break;
default:
break;
}
GFcutRoadLogService.save(log);
map.put("result", errInfo);
return map;
}
private void saveAcceptImg(MultipartFile[] files,String signertime, String BREAKGROUND_ID, String CORPINFO_ID, String ACCEPT_USER_ID, String ACCEPT_DEPARTMENT_ID) throws Exception{
if (files != null && files.length > 0) {
for (int i = 0; i < files.length; i++) {
PageData cpd = new PageData();
cpd = this.getPageData();
MultipartFile file = files[i];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
cpd.put("ACCEPT_USER_SIGNER_TIME", signertime);
cpd.put("ACCEPT_CONFESS_ID", this.get32UUID());
cpd.put("OPERATOR", cpd.get("OPERATOR")); //修改人
cpd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
cpd.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName);
cpd.put("ISDELETE", '0');
cpd.put("CORPINFO_ID", CORPINFO_ID);
cpd.put("BREAKGROUND_ID", BREAKGROUND_ID);
cpd.put("ACCEPT_USER_ID", ACCEPT_USER_ID);
cpd.put("ACCEPT_CONFESS_DEPARTMENT_ID", "");
cpd.put("ACCEPT_CONFESS_USER_ID", "");
cpd.put("ACCEPT_DEPARTMENT_ID", ACCEPT_DEPARTMENT_ID);
cutroadacceptuserService.save(cpd);
}
}
}
/**
* @param
* @throws Exception
@ -466,7 +590,21 @@ public class AppGFCutRoadController extends BaseController {
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
GFcutRoadService.edit(pd2);
log.put("ACTION", "作业负责单位通过");
GFcutRoadToMeasuresService.delete(pd);
if(pd.get("measuresList")!=null){
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("measuresList").toString());
for (JSONObject json : list) {
PageData measures = new PageData();
measures.put("CUTROADTOMEASURES_ID", this.get32UUID()); // 主键
measures.put("CUTROAD_ID", pd.get("CUTROAD_ID"));
measures.put("BUS_CUTROAD_MEASURES_ID", json.get("BUS_CUTROAD_MEASURES_ID"));
measures.put("STATUS", json.get("STATUS"));
measures.put("ANSWER", json.get("ANSWER"));
measures.put("CONFIRM_ID", pd.get("OPERATOR"));
measures.put("CONFIRM_NAME", pd.get("ACTION_USER"));
GFcutRoadToMeasuresService.save(measures);
}
}
// 发短信
this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2);
}
@ -734,6 +872,8 @@ public class AppGFCutRoadController extends BaseController {
pd = GFcutRoadService.findById(pd); //根据ID读取
map.put("pd", pd);
map.put("measuresList", GFcutRoadService.listAllMeasures(pd));
map.put("imgList",cutroadacceptuserService.findByIds(pd));
map.put("imgList1",cutroadacceptuserService.findById(pd));
map.put("result", errInfo);
return map;
}

View File

@ -3,11 +3,13 @@ package com.zcloud.controller.gf;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.gf.GFCutRoadAcceptUserService;
import com.zcloud.service.gf.GFCutRoadService;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ObjectExcelView;
import com.zcloud.util.Tools;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@ -31,7 +33,8 @@ public class GFCutRoadController extends BaseController {
@Resource
private GFCutRoadService GFcutroadService;
@Autowired
private GFCutRoadAcceptUserService cutroadacceptuserService;
/**
*
*
@ -139,6 +142,8 @@ public class GFCutRoadController extends BaseController {
pd = GFcutroadService.findById(pd); //根据ID读取
map.put("pd", pd);
map.put("measuresList", GFcutroadService.listAllMeasures(pd));
map.put("imgList",cutroadacceptuserService.findByIds(pd));
map.put("imgList1",cutroadacceptuserService.findById(pd));
map.put("result", errInfo);
return map;
}

View File

@ -0,0 +1,67 @@
package com.zcloud.mapper.datasource.gf;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-24
* www.zcloudchina.com
*/
public interface GFCutRoadAcceptUserMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void deleteList(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
List<PageData> findById(PageData pd);
List<PageData> findByIds(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
List<PageData> listAllByIds(PageData pd);
}

View File

@ -0,0 +1,7 @@
package com.zcloud.mq.util;
public class TenCorpConst {
public static final String confinedSpace = "confined-space";
public static final String electricity = "electricity";
public static final String hotWork = "hot-work";
}

View File

@ -0,0 +1,67 @@
package com.zcloud.service.gf;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-24
* www.zcloudchina.com
*/
public interface GFCutRoadAcceptUserService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void deleteList(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public List<PageData> findById(PageData pd)throws Exception;
public List<PageData> findByIds(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
public List<PageData> listAllByIds(PageData pd)throws Exception;
}

View File

@ -0,0 +1,121 @@
package com.zcloud.service.gf.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.gf.GFCutRoadAcceptUserMapper;
import com.zcloud.service.gf.GFCutRoadAcceptUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-24
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class CutRoadAcceptUserServiceImpl implements GFCutRoadAcceptUserService {
@Autowired
private GFCutRoadAcceptUserMapper cutroadacceptuserMapper;
/**
*
*
* @param pd
* @throws Exception
*/
public void save(PageData pd) throws Exception {
cutroadacceptuserMapper.save(pd);
}
/**
*
*
* @param pd
* @throws Exception
*/
public void delete(PageData pd) throws Exception {
cutroadacceptuserMapper.delete(pd);
}
/**
*
*
* @param pd
* @throws Exception
*/
public void deleteList(PageData pd) throws Exception {
cutroadacceptuserMapper.deleteList(pd);
}
/**
*
*
* @param pd
* @throws Exception
*/
public void edit(PageData pd) throws Exception {
cutroadacceptuserMapper.edit(pd);
}
/**
*
*
* @param page
* @throws Exception
*/
public List<PageData> list(Page page) throws Exception {
return cutroadacceptuserMapper.datalistPage(page);
}
/**
* ()
*
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd) throws Exception {
return cutroadacceptuserMapper.listAll(pd);
}
/**
* id
*
* @param pd
* @throws Exception
*/
public List<PageData> findById(PageData pd) throws Exception {
return cutroadacceptuserMapper.findById(pd);
}
public List<PageData> findByIds(PageData pd) throws Exception {
return cutroadacceptuserMapper.findByIds(pd);
}
/**
*
*
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS) throws Exception {
cutroadacceptuserMapper.deleteAll(ArrayDATA_IDS);
}
/**
* ()
*
* @param pd
* @throws Exception
*/
public List<PageData> listAllByIds(PageData pd) throws Exception {
return cutroadacceptuserMapper.listAllByIds(pd);
}
}

View File

@ -0,0 +1,218 @@
<?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.zcloud.mapper.datasource.gf.GFCutRoadAcceptUserMapper">
<!--表名 -->
<sql id="tableName">
GF_CUTROAD_ACCEPTUSER
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<sql id="Field">
f.ACCEPT_CONFESS_ID,
f.CUTROAD_ID,
f.CORPINFO_ID,
f.ISDELETE,
f.OPERATTIME,
f.OPERATOR,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.ACCEPT_CONFESS_USER_SIGNER_TIME,
f.ISSELF,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.ACCEPT_DEPARTMENT_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
ACCEPT_CONFESS_ID,
CUTROAD_ID,
CORPINFO_ID,
ISDELETE,
OPERATTIME,
OPERATOR,
ACCEPT_CONFESS_DEPARTMENT_ID,
ACCEPT_CONFESS_USER_ID,
ACCEPT_CONFESS_USER_SIGNER_PATH,
ACCEPT_CONFESS_USER_SIGNER_TIME,
ISSELF,
ACCEPT_USER_ID,
ACCEPT_USER_SIGNER_PATH,
ACCEPT_USER_SIGNER_TIME,
ACCEPT_DEPARTMENT_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{ACCEPT_CONFESS_ID},
#{CUTROAD_ID},
#{CORPINFO_ID},
#{ISDELETE},
#{OPERATTIME},
#{OPERATOR},
#{ACCEPT_CONFESS_DEPARTMENT_ID},
#{ACCEPT_CONFESS_USER_ID},
#{ACCEPT_CONFESS_USER_SIGNER_PATH},
#{ACCEPT_CONFESS_USER_SIGNER_TIME},
#{ISSELF},
#{ACCEPT_USER_ID},
#{ACCEPT_USER_SIGNER_PATH},
#{ACCEPT_USER_SIGNER_TIME},
#{ACCEPT_DEPARTMENT_ID}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
delete from
<include refid="tableName"></include>
where
ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID},
CUTROAD_ID = #{CUTROAD_ID},
CORPINFO_ID = #{CORPINFO_ID},
OPERATTIME = #{OPERATTIME},
OPERATOR = #{OPERATOR},
ACCEPT_CONFESS_DEPARTMENT_ID = #{ACCEPT_CONFESS_DEPARTMENT_ID},
ACCEPT_CONFESS_USER_ID = #{ACCEPT_CONFESS_USER_ID},
ACCEPT_CONFESS_USER_SIGNER_PATH = #{ACCEPT_CONFESS_USER_SIGNER_PATH},
ACCEPT_CONFESS_USER_SIGNER_TIME = #{ACCEPT_CONFESS_USER_SIGNER_TIME},
ISSELF = #{ISSELF}
where
ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
f.ACCEPT_CONFESS_ID,
f.CUTROAD_ID,
f.CORPINFO_ID,
f.ISDELETE,
f.OPERATTIME,
f.OPERATOR,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.ACCEPT_DEPARTMENT_ID
from
<include refid="tableName"></include> f
where
f.CUTROAD_ID = #{CUTROAD_ID} and f.CORPINFO_ID = #{CORPINFO_ID} and f.ACCEPT_USER_ID = #{ACCEPT_USER_ID}
order by f.ACCEPT_USER_SIGNER_TIME asc
</select>
<select id="findByIds" parameterType="pd" resultType="pd">
select
f.ACCEPT_CONFESS_ID,
f.CUTROAD_ID,
f.CORPINFO_ID,
f.ISDELETE,
f.OPERATTIME,
f.OPERATOR,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.ACCEPT_CONFESS_USER_SIGNER_TIME
from
<include refid="tableName"></include> f
where
f.CUTROAD_ID = #{CUTROAD_ID} and f.CORPINFO_ID = #{CORPINFO_ID} and f.ACCEPT_CONFESS_USER_ID = #{ACCEPT_CONFESS_USER_ID}
order by f.ACCEPT_CONFESS_USER_SIGNER_TIME asc
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
<!-- 根据需求自己加检索条件
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
-->
)
</if>
</select>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where 1=1
<if test="ISSELF != null and ISSELF != ''"><!-- 关键词检索 -->
and
f.ISSELF=#{ISSELF}
</if>
<if test="CUTROAD_ID != null and CUTROAD_ID != ''"><!-- 关键词检索 -->
and
f.CUTROAD_ID=#{CUTROAD_ID}
</if>
</select>
<!-- 批量删除 -->
<delete id="deleteAll" parameterType="String">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
ACCEPT_CONFESS_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 列表 -->
<select id="listAllByIds" parameterType="String" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where 1=1
<if test="ArrayDATA_IDS != null and ArrayDATA_IDS != ''"><!-- 关键词检索 -->
and f.ACCEPT_CONFESS_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper>