拍照时间表管理修改查询

master
liuguijing 2 years ago
parent 189f22bdee
commit 3667796f27

@ -148,4 +148,17 @@ public class TerminalScheduleRuleController extends BaseController {
}
}
@ApiOperation(value = "根据requestid查询时间表下发状态", notes = "根据requestid查询时间表下发状态", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getCmaSchelduleUpload")
@Log(title = "根据requestid查询时间表下发状态", type = "查询")
public ResponseReult<String> getCmaSchelduleUpload(@RequestBody @Validated RequestIdListVo vo) {
ServiceBody<String> serviceBody = terminalScheduleRuleService.checkScheldule(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
}

@ -1,11 +1,18 @@
package com.shxy.xymanager_admin;
import com.shxy.xymanager_common.entity.TerminalSchedulesTemp;
import com.shxy.xymanager_common.enums.CommonStatus;
import com.shxy.xymanager_common.model.TerminalScheduleRuleTimeListModel;
import com.shxy.xymanager_common.util.SaltUtil;
import com.shxy.xymanager_dao.dao.*;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@SpringBootTest
class XymanagerAdminApplicationTests {
@ -22,6 +29,9 @@ class XymanagerAdminApplicationTests {
@Autowired
private TerminalPhotoDao terminalPhotoDao;
@Autowired
private TerminalSchedulesTempDao terminalSchedulesTempDao;
@Test
void contextLoads() {
@ -101,7 +111,7 @@ class XymanagerAdminApplicationTests {
//1.获取随机盐
String salt = SaltUtil.getSalt(8);
// String salt = SaltUtil.getSalt(8);
//2.将随机盐保存到数据
// user.setSalt(salt);
//3.明文密码进行md5 + salt + hash散列
@ -110,6 +120,17 @@ class XymanagerAdminApplicationTests {
// System.out.println("");
// user.setPassword(MD5.toHex());
// userDao.save(user);
ArrayList<Integer> requestidlist = new ArrayList<>();
requestidlist.add(1);
requestidlist.add(2);
requestidlist.add(3);
List<TerminalSchedulesTemp> terminalSchedulesTemps = terminalSchedulesTempDao.updateStatusByRequestIdList(requestidlist, CommonStatus.EFFECTIVE.value(), new Date());
System.out.println(terminalSchedulesTemps.toArray());
}
}

@ -0,0 +1,18 @@
package com.shxy.xymanager_common.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
@ApiModel(value = "查询Cma结果requestid的Vo", description = "查询Cma结果requestid的Vo")
public class RequestIdListVo {
@NotNull(message = "查询编号不能缺少")
@ApiModelProperty(value = "查询编号", example = "123455")
private List<Integer> list;
}

@ -3,12 +3,16 @@ package com.shxy.xymanager_dao.dao;
import com.shxy.xymanager_common.entity.RequestResults;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface RequestResultsDao {
RequestResults selectByPrimaryKey(Integer id);
RequestResults selectByRequestId(@Param("requestId") Integer id);
List<RequestResults> selectByRequestIdList(@Param("list") List<Integer> id);
int updateByPrimaryKeySelective(RequestResults record);
int updateByPrimaryKeyWithBLOBs(RequestResults record);

@ -22,6 +22,8 @@ public interface TerminalSchedulesDao {
List<TerminalSchedules> selectByTerminalBean(@Param("list") List<RelateTerminalListRuleIdVo.Items> list);
int updateList(List<TerminalSchedules> record);
int updateByPrimaryKeySelective(TerminalSchedules record);
int updateByPrimaryKey(TerminalSchedules record);

@ -11,7 +11,7 @@ public interface TerminalSchedulesTempDao {
List<TerminalSchedulesTemp> selectByTermAndChannel(@Param("list") List<RelateTerminalListRuleIdVo.Items> list, @Param("status") Integer status);
TerminalSchedulesTemp selectByRequestId(@Param("list") List<Integer> id, @Param("status") Integer status);
List<TerminalSchedulesTemp> selectByRequestId(@Param("list") List<Integer> id, @Param("status") Integer status);
int deleteByPrimaryKey(Integer id);
@ -25,5 +25,7 @@ public interface TerminalSchedulesTempDao {
int updateByPrimaryKeySelective(TerminalSchedulesTemp record);
int updateStatusByRequestIdList(@Param("list") List<Integer> id, @Param("status") Integer status,@Param("updateat") Date updateat);
int updateByPrimaryKey(TerminalSchedulesTemp record);
}

@ -112,7 +112,7 @@
<!-- </table>-->
<!-- <table tableName="terminal_schedules"-->
<!-- <table tableName="terminal_schedule"-->
<!-- domainObjectName="TerminalScheduleMapper"-->
<!-- mapperName="TerminalScheduleMapperDao"-->
<!-- enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->

@ -20,13 +20,10 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
,
<include refid="Blob_Column_List"/>
from request_results
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByRequestId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
@ -34,6 +31,18 @@
where request_id = #{requestId}
</select>
<select id="selectByRequestIdList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from request_results
<if test="list != null and list.size > 0">
where request_id in
<foreach collection="list" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</select>
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.RequestResults">
update request_results

@ -127,7 +127,7 @@
left JOIN terminals y ON x.id = y.line_id and y.status = #{status})
left JOIN terminal_channel_mapper j ON j.term_id = y.id)
left JOIN terminal_channels k ON j.channel_id = k.id and k.status = #{status})
left JOIN terminal_schedules l ON k.id = l.channel_id and l.term_id = y.id)
left JOIN terminal_schedule l ON k.id = l.channel_id and l.term_id = y.id)
<if test="termid != null">
where y.id = #{termid}
</if>

@ -148,7 +148,7 @@
tscr.start_time startTime,
end_time endTime,
span
from terminal_schedules tm left join schedule_details tscr on tm.schedule_id = tscr.schedule_id
from terminal_schedule tm left join schedule_details tscr on tm.schedule_id = tscr.schedule_id
left join terminals t on tm.term_id=t.id
where tm.term_id = #{termId} and tm.channel_id = #{channel}
</select>

@ -118,6 +118,24 @@
</if>
</trim>
</insert>
<update id="updateStatusByRequestIdList">
update terminal_schedules_temp
<set>
<if test="status != null">
status = #{status},
</if>
<if test="updateat != null">
update_time = #{updateat},
</if>
</set>
<if test="list != null and list.size>0">
where request_id in
<foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.TerminalSchedulesTemp">
update terminal_schedules_temp
<set>

@ -15,14 +15,14 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from terminal_schedules
from terminal_schedule
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByChannelId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from terminal_schedules
from terminal_schedule
where channel_id = #{channelid}
and term_id = #{termid}
</select>
@ -30,7 +30,7 @@
<select id="selectByTerminalBean" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from terminal_schedules
from terminal_schedule
where
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
term_id = #{item.termid} and channel_id in
@ -41,7 +41,7 @@
</select>
<delete id="deleteByChannelId">
delete from terminal_schedules
delete from terminal_schedule
where
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
term_id = #{item.termId} and channel_id = #{item.channelId}
@ -49,7 +49,7 @@
</delete>
<insert id="insertList" parameterType="java.util.List">
insert into terminal_schedules
insert into terminal_schedule
(term_id,channel_id,schedule_id,create_time,update_time)
VALUES
<foreach collection="list" item="item" separator=",">
@ -59,7 +59,7 @@
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalSchedules">
insert into terminal_schedules (id, term_id, channel_id,
insert into terminal_schedule (id, term_id, channel_id,
schedule_id, create_time, update_time
)
values (#{id,jdbcType=INTEGER}, #{termId,jdbcType=INTEGER}, #{channelId,jdbcType=TINYINT},
@ -67,7 +67,7 @@
)
</insert>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalSchedules">
insert into terminal_schedules
insert into terminal_schedule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
@ -110,7 +110,7 @@
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.TerminalSchedules">
update terminal_schedules
update terminal_schedule
<set>
<if test="termId != null">
term_id = #{termId,jdbcType=INTEGER},
@ -130,8 +130,18 @@
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateList" >
update terminal_schedule
set term_id = #{termId,jdbcType=INTEGER},
channel_id = #{channelId,jdbcType=TINYINT},
schedule_id = #{scheduleId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.TerminalSchedules">
update terminal_schedules
update terminal_schedule
set term_id = #{termId,jdbcType=INTEGER},
channel_id = #{channelId,jdbcType=TINYINT},
schedule_id = #{scheduleId,jdbcType=INTEGER},

@ -225,80 +225,80 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ
public ServiceBody<GetModel> relateSchelduleRule(RelateTerminalListRuleIdVo vo) {
GetModel model = new GetModel();
List<TerminalSchedulesTemp> list = terminalSchedulesTempDao.selectByTermAndChannel(vo.getList(), CommonStatus.DELETE.value());
if (CollectionUtil.isNotEmpty(list)) {
return Asserts.error("有装置时间尚未下发成功");
}
List<RelateTerminalListRuleIdVo.Items> termlist = vo.getList();
Integer scheduleid = vo.getScheduleid();
List<TerminalSchedulesTemp> temps = new ArrayList<>();
List<Integer> termidlist = new ArrayList<>();
for (RelateTerminalListRuleIdVo.Items item : termlist) {
termidlist.add(item.getTermid());
List<Integer> channelidlist = item.getChannelidlist();
for (Integer it : channelidlist) {
TerminalSchedulesTemp temp = new TerminalSchedulesTemp();
temp.setTermId(item.getTermid());
temp.setScheduleId(scheduleid);
temp.setChannelId(it);
temps.add(temp);
}
}
Date date = new Date();
int i = terminalSchedulesTempDao.insertList(temps, CommonStatus.EFFECTIVE.value(), date, date);
List<ChannelAndTermDto> terminalsList = terminalsDao.selectByIdList(vo.getList(), CommonStatus.EFFECTIVE.value());
if (CollectionUtil.isEmpty(termidlist)) {
return Asserts.error("没有该装置");
}
ScheduleAndRuleDto dto = schedulesDao.selectSingle(scheduleid, CommonStatus.EFFECTIVE.value());
List<ScheduleRuleDto> dtoList = dto.getList();
if (CollectionUtil.isEmpty(dtoList)) {
return Asserts.error("没有该拍照时间规则");
}
StringBuffer timestr = new StringBuffer();
for (int j = 0; j < dtoList.size(); j++) {
TerminalPhotosTimeModel.PhotosTimeBean bean = new TerminalPhotosTimeModel.PhotosTimeBean();
Integer span = dtoList.get(j).getSpan();
Date startTime = dtoList.get(j).getStartTime();
Short startHour = Short.parseShort(MyDateUtils.parseHourAndMinute(startTime).split("/")[0]);
Short startMin = Short.parseShort(MyDateUtils.parseHourAndMinute(startTime).split("/")[1]);
Date endTime = dtoList.get(j).getEndTime();
Short endTimeHour = Short.parseShort(MyDateUtils.parseHourAndMinute(endTime).split("/")[0]);
Short endTimeMin = Short.parseShort(MyDateUtils.parseHourAndMinute(endTime).split("/")[1]);
Integer span1 = -1;
Integer span2 = -1;
if (span / 60 > 0) {
span1 = (span / 60);
span2 = (span % 60);
} else if (span < 60) {
span1 = 0;
span2 = span;
}
String string = "--hour1=" + startHour + "\t" + "--min1=" + startMin + "\t" + "--preset1=255 --hour2=" + endTimeHour + "\t" + "--min2=" + endTimeMin + "\t"
+ "--preset2=255 --hour3=" + span1 + "\t" + "--min3=" + span2 + "\t" + "--preset3=255";
timestr.append(string);
}
for (int x = 0; x < terminalsList.size(); x++) {
ChannelAndTermDto channelAndTermDto = terminalsList.get(x);
String cmd = Constants.CMD + "schedule --flag=1 --cmdid=" + channelAndTermDto.getCmdid() + "\t" + "--channel=" + channelAndTermDto.getChannelid() + "\t" +
timestr.toString();
ProcessExecUtils.exec(cmd);
}
// List<TerminalSchedulesTemp> list = terminalSchedulesTempDao.selectByTermAndChannel(vo.getList(), CommonStatus.DELETE.value());
// if (CollectionUtil.isNotEmpty(list)) {
//
// return Asserts.error("有装置时间尚未下发成功");
// }
// List<RelateTerminalListRuleIdVo.Items> termlist = vo.getList();
//
// Integer scheduleid = vo.getScheduleid();
// List<TerminalSchedulesTemp> temps = new ArrayList<>();
// List<Integer> termidlist = new ArrayList<>();
// for (RelateTerminalListRuleIdVo.Items item : termlist) {
// termidlist.add(item.getTermid());
// List<Integer> channelidlist = item.getChannelidlist();
// for (Integer it : channelidlist) {
// TerminalSchedulesTemp temp = new TerminalSchedulesTemp();
// temp.setTermId(item.getTermid());
// temp.setScheduleId(scheduleid);
// temp.setChannelId(it);
// temps.add(temp);
// }
// }
// Date date = new Date();
// int i = terminalSchedulesTempDao.insertList(temps, CommonStatus.EFFECTIVE.value(), date, date);
//
// List<ChannelAndTermDto> terminalsList = terminalsDao.selectByIdList(vo.getList(), CommonStatus.EFFECTIVE.value());
//
// if (CollectionUtil.isEmpty(termidlist)) {
// return Asserts.error("没有该装置");
// }
// ScheduleAndRuleDto dto = schedulesDao.selectSingle(scheduleid, CommonStatus.EFFECTIVE.value());
// List<ScheduleRuleDto> dtoList = dto.getList();
// if (CollectionUtil.isEmpty(dtoList)) {
// return Asserts.error("没有该拍照时间规则");
// }
//
// StringBuffer timestr = new StringBuffer();
// for (int j = 0; j < dtoList.size(); j++) {
// TerminalPhotosTimeModel.PhotosTimeBean bean = new TerminalPhotosTimeModel.PhotosTimeBean();
// Integer span = dtoList.get(j).getSpan();
// Date startTime = dtoList.get(j).getStartTime();
// Short startHour = Short.parseShort(MyDateUtils.parseHourAndMinute(startTime).split("/")[0]);
// Short startMin = Short.parseShort(MyDateUtils.parseHourAndMinute(startTime).split("/")[1]);
//
//
// Date endTime = dtoList.get(j).getEndTime();
// Short endTimeHour = Short.parseShort(MyDateUtils.parseHourAndMinute(endTime).split("/")[0]);
// Short endTimeMin = Short.parseShort(MyDateUtils.parseHourAndMinute(endTime).split("/")[1]);
//
// Integer span1 = -1;
// Integer span2 = -1;
// if (span / 60 > 0) {
// span1 = (span / 60);
// span2 = (span % 60);
// } else if (span < 60) {
// span1 = 0;
// span2 = span;
// }
// String string = "--hour1=" + startHour + "\t" + "--min1=" + startMin + "\t" + "--preset1=255 --hour2=" + endTimeHour + "\t" + "--min2=" + endTimeMin + "\t"
// + "--preset2=255 --hour3=" + span1 + "\t" + "--min3=" + span2 + "\t" + "--preset3=255";
// timestr.append(string);
// }
// for (int x = 0; x < terminalsList.size(); x++) {
// ChannelAndTermDto channelAndTermDto = terminalsList.get(x);
// String cmd = Constants.CMD + "schedule --flag=1 --cmdid=" + channelAndTermDto.getCmdid() + "\t" + "--channel=" + channelAndTermDto.getChannelid() + "\t" +
// timestr.toString();
// ProcessExecUtils.exec(cmd);
// }
model.setRequestId(Integer.parseInt(Constants.REQUEST_ID.toString()));
Constants.REQUEST_ID.addAndGet(1);
if (i != 0) {
// if (i != 0) {
return Asserts.success(model);
} else {
return Asserts.error("关联失败");
}
// } else {
// return Asserts.error("关联失败");
// }
}
@ -308,46 +308,49 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ
* @param vo
* @return
*/
@Override
@Transactional
public ServiceBody<String> checkScheldule(RelateTerminalListRuleIdVo vo) {
Integer requestid = 0;
ArrayList<Integer> intlist = new ArrayList<>();
RequestResults results = requestResultsDao.selectByRequestId(1);
/*
*
* 1,1
* 2
* 3detial
* */
if (results != null) {
TerminalSchedulesTemp record = new TerminalSchedulesTemp();
record.setStatus(CommonStatus.EFFECTIVE.value());
record.setRequestId(requestid);
terminalSchedulesTempDao.updateByPrimaryKeySelective(record);
}
ArrayList<Integer> id = new ArrayList<>();
TerminalSchedulesTemp temp1 = terminalSchedulesTempDao.selectByRequestId(id, CommonStatus.EFFECTIVE.value());
TerminalSchedules record = new TerminalSchedules();
record.setChannelId(temp1.getChannelId());
record.setScheduleId(temp1.getScheduleId());
record.setTermId(temp1.getTermId());
terminalSchedulesDao.updateByPrimaryKeySelective(record);//将实际的拍照时间表规则从临时表更新到正式表中
// terminalScheduleDetailsDao.deleteByPrimaryKey();//根据装置编号和通道编号删除之前对应的实际拍照时间表详情
ArrayList<TerminalScheduleDetails> record1 = new ArrayList<>();
terminalScheduleDetailsDao.insertList(record1);//插入新的对应的拍照时间表规则详情
int i = requestResultsDao.updateByPrimaryKey(new RequestResults());//根据requestid将结果表中的状态修改为已下发
//end
if (i != 0) {
public ServiceBody<String> checkScheldule(RequestIdListVo vo) {
// /*
// * 当定时任务或者用户主动查询下发状态时
// * */
// List<Integer> requestidlist = vo.getList();
// List<RequestResults> resultsList = requestResultsDao.selectByRequestIdList(requestidlist);
// /*
// * 如果下发成功
// * 1,将临时表中的数据状态改成1下发成功状态
// * 2将装置关联拍照时间正式表改为临时表的对应状态
// * 3将装置自身detial表插入新数据
// * */
// if (CollectionUtil.isEmpty(resultsList)) {
// return Asserts.success("尚未查询到下发数据");
// }
// terminalSchedulesTempDao.updateStatusByRequestIdList(requestidlist, CommonStatus.EFFECTIVE.value(), new Date());
//
// List<TerminalSchedulesTemp> terminalSchedulesTemps = terminalSchedulesTempDao.selectByRequestId(requestidlist, CommonStatus.EFFECTIVE.value());
//
// ArrayList<TerminalSchedules> terminalSchedules = new ArrayList<>();
// for (TerminalSchedulesTemp item : terminalSchedulesTemps) {
// TerminalSchedules record = new TerminalSchedules();
// record.setChannelId(item.getChannelId());
// record.setScheduleId(item.getScheduleId());
// record.setTermId(item.getTermId());
// }
// terminalSchedulesDao.updateList(terminalSchedules);//将实际的拍照时间表规则从临时表更新到正式表中
//
//// terminalScheduleDetailsDao.deleteByPrimaryKey();//根据装置编号和通道编号删除之前对应的实际拍照时间表详情
//
// ArrayList<TerminalScheduleDetails> record1 = new ArrayList<>();
// terminalScheduleDetailsDao.insertList(record1);//插入新的对应的拍照时间表规则详情
//
// int i = requestResultsDao.updateByPrimaryKey(new RequestResults());//根据requestid将结果表中的状态修改为已下发
////end
// if (i != 0) {
return Asserts.success("下发成功");
} else {
return Asserts.error("关联失败");
}
// } else {
// return Asserts.error("关联失败");
// }
}
@ -359,45 +362,45 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ
*/
@Transactional
public ServiceBody<GetModel> getSchedule(RelateTerminalListRuleIdVo vo) {
GetModel model = new GetModel();
Integer requestid = 0;
ArrayList<Integer> intlist = new ArrayList<>();
RequestResults results = requestResultsDao.selectByRequestId(1);
/*
*
* 1,1
* 2
* 3detial
* */
if (results != null) {
TerminalSchedulesTemp record = new TerminalSchedulesTemp();
record.setStatus(CommonStatus.EFFECTIVE.value());
record.setRequestId(requestid);
terminalSchedulesTempDao.updateByPrimaryKeySelective(record);
}
ArrayList<Integer> id = new ArrayList<>();
TerminalSchedulesTemp temp1 = terminalSchedulesTempDao.selectByRequestId(id, CommonStatus.EFFECTIVE.value());
TerminalSchedules record = new TerminalSchedules();
record.setChannelId(temp1.getChannelId());
record.setScheduleId(temp1.getScheduleId());
record.setTermId(temp1.getTermId());
terminalSchedulesDao.updateByPrimaryKeySelective(record);//将实际的拍照时间表规则从临时表更新到正式表中
terminalScheduleDetailsDao.deleteByPrimaryKey(0);//根据装置编号和通道编号删除之前对应的实际拍照时间表详情
ArrayList<TerminalScheduleDetails> record1 = new ArrayList<>();
terminalScheduleDetailsDao.insertList(record1);//插入新的对应的拍照时间表规则详情
int i = requestResultsDao.updateByPrimaryKey(new RequestResults());//根据requestid将结果表中的状态修改为已下发
//end
if (i != 0) {
return Asserts.success(model);
} else {
return Asserts.error("关联失败");
}
// GetModel model = new GetModel();
// Integer requestid = 0;
// ArrayList<Integer> intlist = new ArrayList<>();
// RequestResults results = requestResultsDao.selectByRequestId(1);
// /*
// * 如果下发成功
// * 1,将临时表中的数据状态改成1下发成功状态
// * 2将装置关联拍照时间正式表改为临时表的对应状态
// * 3将装置自身detial表插入新数据
// * */
// if (results != null) {
// TerminalSchedulesTemp record = new TerminalSchedulesTemp();
// record.setStatus(CommonStatus.EFFECTIVE.value());
// record.setRequestId(requestid);
// terminalSchedulesTempDao.updateByPrimaryKeySelective(record);
// }
//
// ArrayList<Integer> id = new ArrayList<>();
// TerminalSchedulesTemp temp1 = terminalSchedulesTempDao.selectByRequestId(id, CommonStatus.EFFECTIVE.value());
//
// TerminalSchedules record = new TerminalSchedules();
// record.setChannelId(temp1.getChannelId());
// record.setScheduleId(temp1.getScheduleId());
// record.setTermId(temp1.getTermId());
// terminalSchedulesDao.updateByPrimaryKeySelective(record);//将实际的拍照时间表规则从临时表更新到正式表中
//
// terminalScheduleDetailsDao.deleteByPrimaryKey(0);//根据装置编号和通道编号删除之前对应的实际拍照时间表详情
//
// ArrayList<TerminalScheduleDetails> record1 = new ArrayList<>();
// terminalScheduleDetailsDao.insertList(record1);//插入新的对应的拍照时间表规则详情
//
// int i = requestResultsDao.updateByPrimaryKey(new RequestResults());//根据requestid将结果表中的状态修改为已下发
////end
// if (i != 0) {
return Asserts.success(null);
// } else {
// return Asserts.error("关联失败");
// }
}
/**

@ -59,6 +59,14 @@ public interface TerminalScheduleRuleService {
*/
ServiceBody<GetModel> relateSchelduleRule(RelateTerminalListRuleIdVo vo);
/**
*
*
* @param vo
* @return
*/
ServiceBody<String> checkScheldule(RequestIdListVo vo);
/**
*
* @param vo

Loading…
Cancel
Save