成品计划修改

highway
zhaoxiaolin 1 year ago
parent 6974fa79fa
commit ba999d484c

@ -54,4 +54,6 @@ public interface MesMapper {
void addSapLog(SysSapLog sysSapLog);
List<Map<String, String>> selectcxjList();
void deleteDateByTableName0(@Param("table")String table,@Param("ymdhms")String ymdhms);
}

@ -236,7 +236,12 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
LocalDate nextWeek = today.plus(-3, ChronoUnit.DAYS);
String ymdhms7 = nextWeek.format(ymdhms)+" 00:00:00";
for(String table:tables){
mesMapper.deleteDateByTableName(table,ymdhms7);
if("mes_interface_log".equals(table)){
mesMapper.deleteDateByTableName0(table,ymdhms7);
}else{
mesMapper.deleteDateByTableName(table,ymdhms7);
}
}
}

@ -178,5 +178,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from ${table}
where create_time >= #{startDate} and #{endDate}>create_time
</delete>
<delete id="deleteDateByTableName0">
delete from ${table} where #{ymdhms} > CONVERT(varchar(30),creter_time, 120)
</delete>
</mapper>

@ -137,8 +137,8 @@ public class ProOrder extends TreeEntity {
private String planDateEnd;
/** 创建日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建日期", width = 20, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建日期", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 更新日期 */

@ -150,5 +150,7 @@ public interface ProOrderWorkorderMapper {
List<ProOrderWorkorder> selectProOrderWorkorderByOrderId(String orderId);
int getProSortNo(ProOrder proOrder);
void deleteProOrderWorkorderByOrderIds(String[] orderIds);
}

@ -472,6 +472,7 @@ public class ProOrderServiceImpl implements IProOrderService {
ProOrder orderExit = proOrderMapper.selectProOrderByOrderCode(proOrder.getOrderCode());
if (orderExit==null) {//不存在就插入
proOrder.setId(IdUtils.fastSimpleUUID());
proOrder.setCreateTime(nowDate);
proOrderMapper.insertProOrder(proOrder);
logger.info("=======订单"+proOrder.getOrderCode()+"同步成功");
} else {//存在,如果没活动更新,否则不允许更新,关闭订单
@ -493,7 +494,7 @@ public class ProOrderServiceImpl implements IProOrderService {
//删除批次pro_order_workorder_batch
proOrderWorkorderBatchMapper.deleteProOrderWorkorderBatchByWorkorderIds(ids);
//删除工单pro_order_workorder
proOrderWorkorderMapper.deleteProOrderWorkorderByWorkorderIds(ids);
proOrderWorkorderMapper.deleteProOrderWorkorderByOrderIds(ids);
}
logger.info("=======订单"+proOrder.getOrderCode()+"同步成功");
}else{
@ -547,7 +548,6 @@ public class ProOrderServiceImpl implements IProOrderService {
order.setPlanFactoryCode(factoryCode);
order.setFactoryCode(factoryCode);
order.setCreateBy(SecurityUtils.getUsername());
order.setCreateTime(DateUtils.getNowDate());
order.setOrderType("LJ01");
order.setProdType("prod");
order.setStatus("o0");

@ -440,4 +440,12 @@
set del_flag = '1'
where order_id = #{id}
</delete>
<delete id="deleteProOrderWorkorderByOrderIds">
update pro_order_workorder
set del_flag = '1'
where order_id in
<foreach item="orderId" collection="array" open="(" separator="," close=")">
#{orderId}
</foreach>
</delete>
</mapper>

Loading…
Cancel
Save