Commit c5634561 authored by duanruiming's avatar duanruiming

[update] 海康下发日期优化

parent 88b89f8f
...@@ -21,10 +21,10 @@ public class DownloadScheduleDTO { ...@@ -21,10 +21,10 @@ public class DownloadScheduleDTO {
@Setter @Setter
@Getter @Getter
public static class Schedule { public static class Schedule {
private Integer scheduleNo; private Integer scheduleId;
private Integer isPeriod; private Integer isPeriod;
private List<String> dates; private List<String> dates;
private List<String> weeks; private List<Integer> weeks;
private Integer planNo; private Integer planNo;
} }
} }
...@@ -14,6 +14,9 @@ public class CrossSchedulesPO { ...@@ -14,6 +14,9 @@ public class CrossSchedulesPO {
/** 日期ID */ /** 日期ID */
@ApiModelProperty(value = "日期ID",notes = "") @ApiModelProperty(value = "日期ID",notes = "")
private Integer id ; private Integer id ;
/** 日期编号 */
@ApiModelProperty(value = "日期编号",notes = "")
private Integer scheduleNo ;
/** 日期名称 */ /** 日期名称 */
@ApiModelProperty(value = "日期名称",notes = "") @ApiModelProperty(value = "日期名称",notes = "")
private String name ; private String name ;
......
package net.wanji.utc.po.hk.response;
import lombok.Data;
import java.util.List;
/**
* @author duanruiming
* @date 2023/02/15 16:45
*/
@Data
public class DatePO {
/**
* 若获取到为0, 标识每年
*/
private int year;
private int month;
private List<Integer> days;
}
...@@ -8,7 +8,8 @@ import lombok.Data; ...@@ -8,7 +8,8 @@ import lombok.Data;
*/ */
@Data @Data
public class HKResponse { public class HKResponse {
private String code; private Integer code;
private String msg; private String msg;
private Integer type;
private Object data; private Object data;
} }
package net.wanji.utc.po.hk.response;
import lombok.Data;
import java.util.List;
/**
* @author duanruiming
* @date 2023/02/15 17:28
*/
@Data
public class ScheduleResponseListPO {
private String crossCode;
private List<ScheduleResponsePO> schedules;
}
package net.wanji.utc.po.hk.response;
import lombok.Data;
import java.util.List;
/**
* @author duanruiming
* @date 2023/02/15 16:43
*/
@Data
public class ScheduleResponsePO {
/**
* 日期id
*/
private Integer id;
private String desc;
/**
* 计划号
*/
private Integer planNo;
/**
* 周
*/
private List<Integer> weeks;
/**
* 特殊日
*/
private List<DatePO> dates;
}
...@@ -188,6 +188,7 @@ public class ControlCommandStrategyServiceImpl implements ControlCommandStrategy ...@@ -188,6 +188,7 @@ public class ControlCommandStrategyServiceImpl implements ControlCommandStrategy
schedulesPO.setName("工作日"); schedulesPO.setName("工作日");
} }
schedulesPO.setCrossId(scheduleSendVO.getCrossCode()); schedulesPO.setCrossId(scheduleSendVO.getCrossCode());
schedulesPO.setScheduleNo(schedule.getScheduleId());
schedulesPO.setPlanId(week.getPlanNo()); schedulesPO.setPlanId(week.getPlanNo());
schedulesPO.setWeek(week.getWeekNum()); schedulesPO.setWeek(week.getWeekNum());
schedulesPO.setSpecialDate(null); schedulesPO.setSpecialDate(null);
...@@ -195,6 +196,7 @@ public class ControlCommandStrategyServiceImpl implements ControlCommandStrategy ...@@ -195,6 +196,7 @@ public class ControlCommandStrategyServiceImpl implements ControlCommandStrategy
}); });
schedule.getSpecialDays().forEach(specialDay -> { schedule.getSpecialDays().forEach(specialDay -> {
CrossSchedulesPO schedulesPO = new CrossSchedulesPO(); CrossSchedulesPO schedulesPO = new CrossSchedulesPO();
schedulesPO.setScheduleNo(schedule.getScheduleId());
schedulesPO.setName("特殊日期"); schedulesPO.setName("特殊日期");
schedulesPO.setCrossId(scheduleSendVO.getCrossCode()); schedulesPO.setCrossId(scheduleSendVO.getCrossCode());
schedulesPO.setPlanId(specialDay.getPlanNo()); schedulesPO.setPlanId(specialDay.getPlanNo());
......
...@@ -14,10 +14,13 @@ import net.wanji.utc.dto.hk.DownloadPlanSpandsDTO; ...@@ -14,10 +14,13 @@ import net.wanji.utc.dto.hk.DownloadPlanSpandsDTO;
import net.wanji.utc.dto.hk.DownloadScheduleDTO; import net.wanji.utc.dto.hk.DownloadScheduleDTO;
import net.wanji.utc.dto.hk.DownloadTimeSpandsDTO; import net.wanji.utc.dto.hk.DownloadTimeSpandsDTO;
import net.wanji.utc.entity.JsonViewObject; import net.wanji.utc.entity.JsonViewObject;
import net.wanji.utc.mapper.*; import net.wanji.utc.mapper.CrossInfoMapper;
import net.wanji.utc.mapper.CrossPhaseMapper;
import net.wanji.utc.mapper.ManufacturerInfoMapper;
import net.wanji.utc.po.CrossInfoPO; import net.wanji.utc.po.CrossInfoPO;
import net.wanji.utc.po.CrossPhasePO; import net.wanji.utc.po.CrossPhasePO;
import net.wanji.utc.po.ManufacturerInfoPO; import net.wanji.utc.po.ManufacturerInfoPO;
import net.wanji.utc.po.hk.response.HKResponse;
import net.wanji.utc.service.control.ControlCommandService; import net.wanji.utc.service.control.ControlCommandService;
import net.wanji.utc.service.runninginfo.HkLightsStatusService; import net.wanji.utc.service.runninginfo.HkLightsStatusService;
import net.wanji.utc.util.FieldUtil; import net.wanji.utc.util.FieldUtil;
...@@ -143,9 +146,7 @@ public class HKControlCommandServiceImpl implements ControlCommandService { ...@@ -143,9 +146,7 @@ public class HKControlCommandServiceImpl implements ControlCommandService {
// 1、下发信号机计划 // 1、下发信号机计划
Map<String, Object> fieldMap = FieldUtil.fieldMethod(downloadTimeSpandsDTO); Map<String, Object> fieldMap = FieldUtil.fieldMethod(downloadTimeSpandsDTO);
Map<String, String> path = PathUtil.getPathMapByApiCode("downloadTimeSpands"); Map<String, String> path = PathUtil.getPathMapByApiCode("downloadTimeSpands");
String strResult = ArtemisHttpUtil.doPostStringArtemis(artemisConfig, String strResult = ArtemisHttpUtil.doPostStringArtemis(artemisConfig, path, JSON.toJSONString(fieldMap), null, null, "application/json", null);
path,
JSON.toJSONString(fieldMap), null, null, "application/json", null);
JSONObject obj = JSON.parseObject(strResult); JSONObject obj = JSON.parseObject(strResult);
if (obj.get(HK_CODE_KEY).equals(HK_SUCCESS_STRING_CODE)) { if (obj.get(HK_CODE_KEY).equals(HK_SUCCESS_STRING_CODE)) {
return jsonViewObject.success("下发信号机计划成功"); return jsonViewObject.success("下发信号机计划成功");
...@@ -156,29 +157,15 @@ public class HKControlCommandServiceImpl implements ControlCommandService { ...@@ -156,29 +157,15 @@ public class HKControlCommandServiceImpl implements ControlCommandService {
@Override @Override
public JsonViewObject scheduleSend(ScheduleSendVO param) throws Exception { public JsonViewObject scheduleSend(ScheduleSendVO param) throws Exception {
JsonViewObject jsonViewObject = JsonViewObject.newInstance(); JsonViewObject jsonViewObject = JsonViewObject.newInstance();
// 厂商 HK CrossInfoPO crossInfoPO = crossInfoMapper.selectByPrimaryKey(param.getCrossCode());
ManufacturerInfoPO manufacturerInfoPO = checkCrossCode(param.getCrossCode()); String signalCode = null;
// 1、通过获取当前运行的日期数据,获取最新的日期方案id if (Objects.nonNull(crossInfoPO)) {
JSONArray body = new JSONArray(); signalCode = crossInfoPO.getCode();
//body.add(param.getCrossCode());
body.add(manufacturerInfoPO.getName());
Map<String, String> path = PathUtil.getPathMapByApiCode("uploadDate");
String strResult = ArtemisHttpUtil.doPostStringArtemis(artemisConfig,
path,
body.toString(), null, null, "application/json", null);
JSONObject object = JSON.parseObject(strResult);
// 日期 id
int id = 1;
if (object.get(HK_CODE_KEY).equals(HK_SUCCESS_STRING_CODE)) {
// 获取日期列表
JSONArray schedulesArray = object.getJSONArray("data").getJSONObject(0).getJSONArray("schedules");
JSONObject scheduleObj = schedulesArray.getJSONObject(schedulesArray.size() - 1);
id = scheduleObj.getInteger("id");
} }
int id = 0;
// 下发信号机日期拼接参数 // 下发信号机日期拼接参数
DownloadScheduleDTO dto = new DownloadScheduleDTO(); DownloadScheduleDTO dto = new DownloadScheduleDTO();
//dto.setCrossCode(param.getCrossCode()); dto.setCrossCode(signalCode);
dto.setCrossCode(manufacturerInfoPO.getName());
List<DownloadScheduleDTO.Schedule> schedules = new ArrayList<>(); List<DownloadScheduleDTO.Schedule> schedules = new ArrayList<>();
for (ScheduleSendVO.Schedule schedule : param.getSchedules()) { for (ScheduleSendVO.Schedule schedule : param.getSchedules()) {
List<ScheduleSendVO.Schedule.Week> scheduleWeeks = schedule.getWeeks(); List<ScheduleSendVO.Schedule.Week> scheduleWeeks = schedule.getWeeks();
...@@ -195,9 +182,9 @@ public class HKControlCommandServiceImpl implements ControlCommandService { ...@@ -195,9 +182,9 @@ public class HKControlCommandServiceImpl implements ControlCommandService {
DownloadScheduleDTO.Schedule schedule1 = new DownloadScheduleDTO.Schedule(); DownloadScheduleDTO.Schedule schedule1 = new DownloadScheduleDTO.Schedule();
// scheduleNo 日期号 ,支持返回【1~128】 // scheduleNo 日期号 ,支持返回【1~128】
if (id + planNos.size() > 128) { if (id + planNos.size() > 128) {
schedule1.setScheduleNo(128 - planNos.size() - (++num)); schedule1.setScheduleId(128 - planNos.size() - (++num));
} else { } else {
schedule1.setScheduleNo(id + (++num)); schedule1.setScheduleId(id + (++num));
} }
// 0 说明 dates 内的日期是日期集合,1 说明是dates 内的数据是日期范围 // 0 说明 dates 内的日期是日期集合,1 说明是dates 内的数据是日期范围
schedule1.setIsPeriod(0); schedule1.setIsPeriod(0);
...@@ -210,10 +197,10 @@ public class HKControlCommandServiceImpl implements ControlCommandService { ...@@ -210,10 +197,10 @@ public class HKControlCommandServiceImpl implements ControlCommandService {
}); });
schedule1.setDates(dates); schedule1.setDates(dates);
// 星期列表 // 星期列表
List<String> weeks = new ArrayList<>(); List<Integer> weeks = new ArrayList<>();
schedule.getWeeks().forEach(week -> { schedule.getWeeks().forEach(week -> {
if (week.getPlanNo().equals(planNo)) { if (week.getPlanNo().equals(planNo)) {
weeks.add(String.valueOf(week.getWeekNum())); weeks.add(week.getWeekNum());
} }
}); });
schedule1.setWeeks(weeks); schedule1.setWeeks(weeks);
...@@ -236,14 +223,13 @@ public class HKControlCommandServiceImpl implements ControlCommandService { ...@@ -236,14 +223,13 @@ public class HKControlCommandServiceImpl implements ControlCommandService {
} }
} }
Map<String, String> downloadSchedulePath = PathUtil.getPathMapByApiCode("downloadSchedule"); Map<String, String> downloadSchedulePath = PathUtil.getPathMapByApiCode("downloadSchedule");
String updateResult = ArtemisHttpUtil.doPostStringArtemis(artemisConfig, String updateResult = ArtemisHttpUtil.doPostStringArtemis(artemisConfig, downloadSchedulePath, JSON.toJSONString(fieldMap), null, null, "application/json", null);
downloadSchedulePath, HKResponse hkResponse = JSONObject.parseObject(updateResult, HKResponse.class);
JSON.toJSONString(fieldMap), null, null, "application/json", null); if (Objects.nonNull(hkResponse) && Objects.equals(HK_SUCCESS_STRING_CODE, hkResponse.getCode())) {
JSONObject obj = JSON.parseObject(updateResult);
if (obj.get(HK_CODE_KEY).equals(HK_SUCCESS_STRING_CODE)) {
return jsonViewObject.success("时间表下发成功"); return jsonViewObject.success("时间表下发成功");
} }
return jsonViewObject.fail(obj.getString("msg"));
return jsonViewObject.fail("时间表下发成功");
} }
@Override @Override
......
...@@ -196,7 +196,7 @@ public class HkLightsStatusServiceImpl implements HkLightsStatusService { ...@@ -196,7 +196,7 @@ public class HkLightsStatusServiceImpl implements HkLightsStatusService {
String responseStr = ArtemisHttpUtil.doPostStringArtemis(artemisConfig, path, jsonBody, null, null, "application/json", null); String responseStr = ArtemisHttpUtil.doPostStringArtemis(artemisConfig, path, jsonBody, null, null, "application/json", null);
if (StringUtils.isNotBlank(responseStr)) { if (StringUtils.isNotBlank(responseStr)) {
HKResponse hkResponse = JSONObject.parseObject(responseStr, HKResponse.class); HKResponse hkResponse = JSONObject.parseObject(responseStr, HKResponse.class);
if (Objects.nonNull(hkResponse) && Objects.equals(hkResponse.getCode(), "0")) { if (Objects.nonNull(hkResponse) && Objects.equals(Constants.HK_SUCCESS_CODE, hkResponse.getCode())) {
return hkResponse.getData(); return hkResponse.getData();
} else { } else {
log.error("ArtemisHttpUtil海康服务调用异常,请求路径:{}, 返回信息: {}, 请求信息: {}", apiPath, hkResponse, jsonBody); log.error("ArtemisHttpUtil海康服务调用异常,请求路径:{}, 返回信息: {}, 请求信息: {}", apiPath, hkResponse, jsonBody);
......
package net.wanji.utc.service.staticinfo.impl; package net.wanji.utc.service.staticinfo.impl;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.hikvision.artemis.sdk.ArtemisHttpUtil; import com.hikvision.artemis.sdk.ArtemisHttpUtil;
import com.hikvision.artemis.sdk.config.ArtemisConfig; import com.hikvision.artemis.sdk.config.ArtemisConfig;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
...@@ -15,8 +15,13 @@ import net.wanji.utc.mapper.CrossSchedulesMapper; ...@@ -15,8 +15,13 @@ import net.wanji.utc.mapper.CrossSchedulesMapper;
import net.wanji.utc.mapper.ManufacturerInfoMapper; import net.wanji.utc.mapper.ManufacturerInfoMapper;
import net.wanji.utc.po.CrossSchedulesPO; import net.wanji.utc.po.CrossSchedulesPO;
import net.wanji.utc.po.ManufacturerInfoPO; import net.wanji.utc.po.ManufacturerInfoPO;
import net.wanji.utc.po.hk.response.DatePO;
import net.wanji.utc.po.hk.response.HKResponse;
import net.wanji.utc.po.hk.response.ScheduleResponseListPO;
import net.wanji.utc.po.hk.response.ScheduleResponsePO;
import net.wanji.utc.service.staticinfo.HkCrossSchedulesService; import net.wanji.utc.service.staticinfo.HkCrossSchedulesService;
import net.wanji.utc.util.PathUtil; import net.wanji.utc.util.PathUtil;
import net.wanji.utc.util.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.*; import java.util.*;
...@@ -40,62 +45,63 @@ public class HkCrossSchedulesServiceImpl implements HkCrossSchedulesService { ...@@ -40,62 +45,63 @@ public class HkCrossSchedulesServiceImpl implements HkCrossSchedulesService {
Map<String, String> path = PathUtil.getPathMapByApiCode("uploadDate"); Map<String, String> path = PathUtil.getPathMapByApiCode("uploadDate");
List<String> crossCodeList = crossInfoMapper.selectCrossCodesByIds(crossIdList); List<String> crossCodeList = crossInfoMapper.selectCrossCodesByIds(crossIdList);
String body = JSONArray.toJSONString(crossCodeList); String body = JSONArray.toJSONString(crossCodeList);
String responseStr = ArtemisHttpUtil.doPostStringArtemis(artemisConfig, path, body, null, String responseStr = ArtemisHttpUtil.doPostStringArtemis(artemisConfig, path, body, null, null, "application/json", null);
null, "application/json", null); HKResponse hkResponse = JSONObject.parseObject(responseStr, HKResponse.class);
JSONObject responseObj = JSON.parseObject(responseStr); if (Objects.nonNull(hkResponse) && Objects.equals(Constants.HK_SUCCESS_CODE, hkResponse.getCode())) {
if(Constants.HK_SUCCESS_CODE.equals(responseObj.getInteger(Constants.HK_CODE_KEY))) { String dataStr = String.valueOf(hkResponse.getData());
JSONArray data = responseObj.getJSONArray("data"); if (StringUtils.isNotBlank(dataStr)) {
for (int i = 0; i < data.size(); i++) { List<ScheduleResponseListPO> scheduleResponseListPOS = JSONObject.parseObject(dataStr, new TypeReference<List<ScheduleResponseListPO>>() {
ArrayList<CrossSchedulesPO> crossSchedulesPOList = new ArrayList<>(); });
JSONObject dataEle = data.getJSONObject(i); for (ScheduleResponseListPO scheduleResponseListPO : scheduleResponseListPOS) {
JSONArray schedules = dataEle.getJSONArray("schedules"); String crossCode = scheduleResponseListPO.getCrossCode();
String crossCode = dataEle.getString("crossCode"); List<ScheduleResponsePO> schedules = scheduleResponseListPO.getSchedules();
String code = BasicEnum.ManufacturerEnum.HK.getCode(); List<CrossSchedulesPO> crossSchedulesPOList = new ArrayList<>();
ManufacturerInfoPO manufacturerInfoPO = manufacturerInfoMapper.selectByCode(code); for (ScheduleResponsePO scheduleResponsePO : schedules) {
Integer manufacturerId = manufacturerInfoPO.getId(); String code = BasicEnum.ManufacturerEnum.HK.getCode();
String crossId = crossInfoMapper.selectIdByCodeAndManufacturerId(crossCode, manufacturerId); ManufacturerInfoPO manufacturerInfoPO = manufacturerInfoMapper.selectByCode(code);
for (int j = 0; j < schedules.size(); j++) { Integer manufacturerId = manufacturerInfoPO.getId();
JSONObject schedule = schedules.getJSONObject(j); String crossId = crossInfoMapper.selectIdByCodeAndManufacturerId(crossCode, manufacturerId);
JSONArray weeks = schedule.getJSONArray("weeks"); List<Integer> weeks = scheduleResponsePO.getWeeks();
String desc = schedule.getString("desc"); String desc = scheduleResponsePO.getDesc();
Integer planNo = schedule.getInteger("planNo"); Integer planNo = scheduleResponsePO.getPlanNo();
Integer planId = crossPlanMapper.selectIdByNo(crossId, planNo); Integer planId = crossPlanMapper.selectIdByNo(crossId, planNo);
for (int k = 0; k < weeks.size(); k++) { for (int k = 0; k < weeks.size(); k++) {
Integer week = weeks.getInteger(k); Integer week = weeks.get(k);
CrossSchedulesPO crossSchedulesPO = new CrossSchedulesPO(); CrossSchedulesPO crossSchedulesPO = new CrossSchedulesPO();
crossSchedulesPO.setName(desc); crossSchedulesPO.setScheduleNo(scheduleResponsePO.getId());
crossSchedulesPO.setCrossId(crossId); crossSchedulesPO.setName(desc);
crossSchedulesPO.setPlanId(planId); crossSchedulesPO.setCrossId(crossId);
crossSchedulesPO.setWeek(week); crossSchedulesPO.setPlanId(planId);
if (week != 0) { crossSchedulesPO.setWeek(week);
crossSchedulesPOList.add(crossSchedulesPO); if (week != 0) {
} else { crossSchedulesPOList.add(crossSchedulesPO);
// 特殊日期 } else {
JSONArray dates = schedule.getJSONArray("dates"); // 特殊日期
for (int m = 0; m < dates.size(); m++) { List<DatePO> dates = scheduleResponsePO.getDates();
JSONObject date = dates.getJSONObject(m); for (int m = 0; m < dates.size(); m++) {
JSONArray days = date.getJSONArray("days"); DatePO date = dates.get(m);
for (int n = 0; n < days.size(); n++) { List<Integer> days = date.getDays();
Integer day = days.getInteger(n); for (int n = 0; n < days.size(); n++) {
Date specialDate = toDate(date, day); Integer day = days.get(n);
crossSchedulesPO.setSpecialDate(specialDate); Date specialDate = toDate(date, day);
crossSchedulesPOList.add(crossSchedulesPO); crossSchedulesPO.setSpecialDate(specialDate);
crossSchedulesPOList.add(crossSchedulesPO);
}
} }
} }
} }
// 插入数据库
crossSchedulesMapper.deleteByCrossId(crossId);
crossSchedulesMapper.insertBatch(crossSchedulesPOList);
} }
} }
// 插入数据库
crossSchedulesMapper.deleteByCrossId(crossId);
crossSchedulesMapper.insertBatch(crossSchedulesPOList);
} }
} }
} }
private Date toDate(JSONObject date, Integer dayInt) { private Date toDate(DatePO date, Integer dayInt) {
String year = date.getString("year"); String year = String.valueOf(date.getYear());
String month = date.getString("month"); String month = String.valueOf(date.getMonth());
String day = dayInt.toString(); String day = dayInt.toString();
if (month.length() == 1) { if (month.length() == 1) {
month = "0" + month; month = "0" + month;
......
...@@ -30,6 +30,11 @@ public class ScheduleSendVO { ...@@ -30,6 +30,11 @@ public class ScheduleSendVO {
@Setter @Setter
@Getter @Getter
public static class Schedule { public static class Schedule {
/**
* 调度号 [1-128] 不填写自动分配
*/
private Integer scheduleId;
/** /**
* 星期列表 * 星期列表
*/ */
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<mapper namespace="net.wanji.utc.mapper.CrossSchedulesMapper"> <mapper namespace="net.wanji.utc.mapper.CrossSchedulesMapper">
<resultMap type="net.wanji.utc.po.CrossSchedulesPO" id="BaseResultMap"> <resultMap type="net.wanji.utc.po.CrossSchedulesPO" id="BaseResultMap">
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="scheduleNo" column="schedule_no"/>
<result property="name" column="name"/> <result property="name" column="name"/>
<result property="crossId" column="cross_id"/> <result property="crossId" column="cross_id"/>
<result property="planId" column="plan_id"/> <result property="planId" column="plan_id"/>
...@@ -14,10 +15,10 @@ ...@@ -14,10 +15,10 @@
<!-- 批量新增数据 --> <!-- 批量新增数据 -->
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into t_cross_schedules(name,cross_id,plan_id,week,special_date) insert into t_cross_schedules(schedule_no,name,cross_id,plan_id,week,special_date)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
(#{entity.name},#{entity.crossId},#{entity.planId},#{entity.week},#{entity.specialDate}) (#{entity.scheduleNo},#{entity.name},#{entity.crossId},#{entity.planId},#{entity.week},#{entity.specialDate})
</foreach> </foreach>
</insert> </insert>
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
<select id="selectByCrossIds" resultMap="BaseResultMap"> <select id="selectByCrossIds" resultMap="BaseResultMap">
select select
id,name,cross_id,plan_id,week,special_date,gmt_create,gmt_modified id,scheduleNo,name,cross_id,plan_id,week,special_date,gmt_create,gmt_modified
from t_cross_schedules from t_cross_schedules
where cross_id in where cross_id in
<foreach collection="crossIds" item="crossId" separator="," open="(" close=")"> <foreach collection="crossIds" item="crossId" separator="," open="(" close=")">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment