Merge branch 'develop_master' into develop_migration
# Conflicts: # adc-da-slrs/src/main/java/com/adc/da/slrs/sarBussionessStand/service/impl/SarBussionessStandServiceImpl.java
This commit is contained in:
@@ -156,4 +156,4 @@ convert.host=127.0.0.1
|
|||||||
# =============================================================================
|
# =============================================================================
|
||||||
# scheduled 配置
|
# scheduled 配置
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
isNotScheduled=false
|
isNotScheduled=true
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
package com.adc.da.scheduled;
|
package com.adc.da.scheduled;
|
||||||
|
|
||||||
|
import com.adc.da.scheduled.dao.SarStandardInfoDao;
|
||||||
|
import com.adc.da.scheduled.dao.SarStandardItemDao;
|
||||||
|
import com.adc.da.scheduled.dao.SarStandardWarningDao;
|
||||||
|
import com.adc.da.scheduled.entity.DataDTO;
|
||||||
|
import com.adc.da.scheduled.entity.WarningEO;
|
||||||
|
import com.adc.da.util.UUIDUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@@ -8,7 +14,9 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
|||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.time.LocalDate;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
@Component
|
@Component
|
||||||
@@ -22,17 +30,107 @@ public class ScheduledJob {
|
|||||||
@Value("${isNotScheduled}")
|
@Value("${isNotScheduled}")
|
||||||
private boolean isNotScheduled; //是否开启定时器
|
private boolean isNotScheduled; //是否开启定时器
|
||||||
|
|
||||||
|
//
|
||||||
|
// @Scheduled(cron="*/5 * * * * ?")
|
||||||
|
// @Async
|
||||||
|
// public void StandScheduledJob(){
|
||||||
|
// System.out.println("hello");
|
||||||
|
//// if(isNotScheduled){
|
||||||
|
//// System.out.println(Thread.currentThread().getName() + " cron=0 0 1 1 * ? --- " + new Date()+"---START-01");
|
||||||
|
//// System.out.println(Thread.currentThread().getName() + " cron=0 0 1 1 * ? --- " + new Date()+"---End-01");
|
||||||
|
//// try{
|
||||||
|
//// Thread.sleep(2000);
|
||||||
|
//// }catch(Exception e){
|
||||||
|
//// }
|
||||||
|
//// }
|
||||||
|
// }
|
||||||
|
|
||||||
@Scheduled(cron="*/5 * * * * ?")
|
|
||||||
|
@Autowired
|
||||||
|
private SarStandardWarningDao sarStandardWarningDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SarStandardItemDao sarStandardItemDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SarStandardInfoDao sarStandardInfoDao;
|
||||||
|
|
||||||
|
|
||||||
|
@Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行
|
||||||
|
// @Scheduled(cron="*/5 * * * * ?")
|
||||||
@Async
|
@Async
|
||||||
public void StandScheduledJob(){
|
public void schedulingTasks() {
|
||||||
if(isNotScheduled){
|
|
||||||
System.out.println(Thread.currentThread().getName() + " cron=0 0 1 1 * ? --- " + new Date()+"---START-01");
|
|
||||||
System.out.println(Thread.currentThread().getName() + " cron=0 0 1 1 * ? --- " + new Date()+"---End-01");
|
/**
|
||||||
try{
|
* 1.查询标准属性字段表(sar_stand_attr_info) XCXSSEQ ZCCSSRQ ZRGCS
|
||||||
Thread.sleep(2000);
|
* 联接标准信息表sar_standards_info表的STAND_NAME
|
||||||
}catch(Exception e){
|
* 2.查询分解单(条款表)
|
||||||
|
* 3.查询预警表
|
||||||
|
* 4.去掉预警表中已存在的的数据
|
||||||
|
* 5.插入预警表
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
mark:标识预警的种类
|
||||||
|
3:新车标准预警
|
||||||
|
4:在产车标准预警
|
||||||
|
1:新车条款预警
|
||||||
|
2:在产车条款预警
|
||||||
|
*/
|
||||||
|
System.out.println("开始执行预警!!!");
|
||||||
|
//预警期限
|
||||||
|
DataDTO dataDTO = new DataDTO();
|
||||||
|
dataDTO.setStartDate(LocalDate.now().plusDays(1)) //系统日期的下一天
|
||||||
|
.setEndDate(LocalDate.now().plusMonths(3).plusDays(1));//系统日期3个月后
|
||||||
|
|
||||||
|
LinkedList<WarningEO> warningList = new LinkedList<>();
|
||||||
|
|
||||||
|
//分解单(条款) 新车型 mark=1
|
||||||
|
List<WarningEO> itemForXCXSSRQ = sarStandardItemDao.select(dataDTO, "XCXSSRQ");
|
||||||
|
for (WarningEO warningEO : itemForXCXSSRQ) {
|
||||||
|
warningEO.setId(UUIDUtils.randomUUID20())
|
||||||
|
.setPower("1")
|
||||||
|
.setMark("1")
|
||||||
|
.setPutTime(warningEO.getXCXSSRQ());
|
||||||
}
|
}
|
||||||
|
warningList.addAll(itemForXCXSSRQ);
|
||||||
|
|
||||||
|
//分解单(条款) 在产车型 mark=2
|
||||||
|
List<WarningEO> itemForZCCSSRQ = sarStandardItemDao.select(dataDTO, "ZCCSSRQ");
|
||||||
|
for (WarningEO warningEO : itemForZCCSSRQ) {
|
||||||
|
warningEO.setId(UUIDUtils.randomUUID20())
|
||||||
|
.setPower("1")
|
||||||
|
.setMark("2")
|
||||||
|
.setPutTime(warningEO.getZCCSSRQ());
|
||||||
|
}
|
||||||
|
warningList.addAll(itemForZCCSSRQ);
|
||||||
|
|
||||||
|
//标准 新车型 预警 mark=3
|
||||||
|
List<WarningEO> standInfoXCXSSRQ = sarStandardInfoDao.select(dataDTO, "XCXSSRQ");
|
||||||
|
for (WarningEO warningEO : standInfoXCXSSRQ) {
|
||||||
|
warningEO.setId(UUIDUtils.randomUUID20())
|
||||||
|
.setPower("1")
|
||||||
|
.setMark("3")
|
||||||
|
.setPutTime(warningEO.getXCXSSRQ());
|
||||||
|
}
|
||||||
|
warningList.addAll(standInfoXCXSSRQ);
|
||||||
|
|
||||||
|
|
||||||
|
//标准 在产车型 mark=4
|
||||||
|
List<WarningEO> standInfoZCCSSRQ = sarStandardInfoDao.select(dataDTO, "ZCCSSRQ");
|
||||||
|
for (WarningEO warningEO : standInfoZCCSSRQ) {
|
||||||
|
warningEO.setId(UUIDUtils.randomUUID20())
|
||||||
|
.setPower("1")
|
||||||
|
.setMark("4")
|
||||||
|
.setPutTime(warningEO.getZCCSSRQ());
|
||||||
|
}
|
||||||
|
warningList.addAll(standInfoZCCSSRQ);
|
||||||
|
|
||||||
|
//持久化至预警表 忽略标准id和标志位都一样的数据
|
||||||
|
if (warningList.size()!=0){
|
||||||
|
int count = sarStandardWarningDao.ignoreInsert(warningList);
|
||||||
|
System.out.println("已预警 " + count + " 条标准或条款!!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.adc.da.scheduled.dao;
|
||||||
|
|
||||||
|
|
||||||
|
import com.adc.da.scheduled.entity.DataDTO;
|
||||||
|
import com.adc.da.scheduled.entity.WarningEO;
|
||||||
|
import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface SarStandardInfoDao{
|
||||||
|
|
||||||
|
public List<WarningEO> select(DataDTO date, String str);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.adc.da.scheduled.dao;
|
||||||
|
|
||||||
|
import com.adc.da.scheduled.entity.DataDTO;
|
||||||
|
import com.adc.da.scheduled.entity.WarningEO;
|
||||||
|
import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface SarStandardItemDao extends BaseMapper{
|
||||||
|
|
||||||
|
public List<WarningEO> select(DataDTO date, String str);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.adc.da.scheduled.dao;
|
||||||
|
|
||||||
|
import com.adc.da.scheduled.entity.WarningEO;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface SarStandardWarningDao extends IService<WarningEO> {
|
||||||
|
|
||||||
|
public int ignoreInsert(@Param(value = "warningEOS") LinkedList<WarningEO> warningEOS);
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.adc.da.scheduled.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class DataDTO {
|
||||||
|
|
||||||
|
private LocalDate startDate;
|
||||||
|
|
||||||
|
private LocalDate endDate;
|
||||||
|
|
||||||
|
private String str;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.adc.da.scheduled.entity;
|
||||||
|
|
||||||
|
import com.adc.da.base.entity.BaseEntity;
|
||||||
|
import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WarningEO extends EarlyWarningEO {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Date XCXSSRQ;
|
||||||
|
|
||||||
|
private Date ZCCSSRQ;
|
||||||
|
|
||||||
|
}
|
||||||
-2
@@ -34,6 +34,4 @@ public interface SarBussStandFileDao extends BaseMapper<SarBussStandFile> {
|
|||||||
int insertSelective(SarBussStandFile sarBussStandFile);
|
int insertSelective(SarBussStandFile sarBussStandFile);
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(SarBussStandFile sarBussStandFile);
|
int updateByPrimaryKeySelective(SarBussStandFile sarBussStandFile);
|
||||||
|
|
||||||
int deleteByPrimaryKey(String value);
|
|
||||||
}
|
}
|
||||||
|
|||||||
-5
@@ -2,8 +2,6 @@ package com.adc.da.slrs.sarBussStandItems.dao;
|
|||||||
|
|
||||||
import com.adc.da.slrs.sarBussStandItems.entity.SarBussStandItems;
|
import com.adc.da.slrs.sarBussStandItems.entity.SarBussStandItems;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -13,9 +11,6 @@ import org.springframework.stereotype.Repository;
|
|||||||
* @author super_liu
|
* @author super_liu
|
||||||
* @since 2021-07-25
|
* @since 2021-07-25
|
||||||
*/
|
*/
|
||||||
@Repository
|
|
||||||
public interface SarBussStandItemsDao extends BaseMapper<SarBussStandItems> {
|
public interface SarBussStandItemsDao extends BaseMapper<SarBussStandItems> {
|
||||||
|
|
||||||
int deleteByStandIdAndFileType(@Param("standId") String standId, @Param("fileType") String fileType);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
-338
@@ -1,338 +0,0 @@
|
|||||||
package com.adc.da.slrs.sarBussStandItems.page;
|
|
||||||
|
|
||||||
import com.adc.da.sys.common.BasePage;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <b>功能:</b>SAR_BUSS_STAND_ITEMS SarBussStandItemsEOPage<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2018-09-03 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
public class SarBussStandItemsEOPage extends BasePage {
|
|
||||||
|
|
||||||
private String modifyTime;
|
|
||||||
private String modifyTime1;
|
|
||||||
private String modifyTime2;
|
|
||||||
private String modifyTimeOperator = "=";
|
|
||||||
private String creationTime;
|
|
||||||
private String creationTime1;
|
|
||||||
private String creationTime2;
|
|
||||||
private String creationTimeOperator = "=";
|
|
||||||
private String validFlag;
|
|
||||||
private String validFlagOperator = "=";
|
|
||||||
private String remarks;
|
|
||||||
private String remarksOperator = "=";
|
|
||||||
private String responsibleUnit;
|
|
||||||
private String responsibleUnitOperator = "=";
|
|
||||||
private String energyKind;
|
|
||||||
private String energyKindOperator = "=";
|
|
||||||
private String applyArctic;
|
|
||||||
private String applyArcticOperator = "=";
|
|
||||||
private String tackTime;
|
|
||||||
private String tackTime1;
|
|
||||||
private String tackTime2;
|
|
||||||
private String tackTimeOperator = "=";
|
|
||||||
private String parts;
|
|
||||||
private String partsOperator = "=";
|
|
||||||
private String itemsName;
|
|
||||||
private String itemsNameOperator = "=";
|
|
||||||
private String itemsNum;
|
|
||||||
private String itemsNumOperator = "=";
|
|
||||||
private String standId;
|
|
||||||
private String standIdOperator = "=";
|
|
||||||
private String id;
|
|
||||||
private String idOperator = "=";
|
|
||||||
|
|
||||||
private String processFlag;
|
|
||||||
private String nameOrRequest;
|
|
||||||
private String[] idlist;
|
|
||||||
private String fileType;
|
|
||||||
|
|
||||||
public String getModifyTime() {
|
|
||||||
return this.modifyTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setModifyTime(String modifyTime) {
|
|
||||||
this.modifyTime = modifyTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getModifyTime1() {
|
|
||||||
return this.modifyTime1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setModifyTime1(String modifyTime1) {
|
|
||||||
this.modifyTime1 = modifyTime1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getModifyTime2() {
|
|
||||||
return this.modifyTime2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setModifyTime2(String modifyTime2) {
|
|
||||||
this.modifyTime2 = modifyTime2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getModifyTimeOperator() {
|
|
||||||
return this.modifyTimeOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setModifyTimeOperator(String modifyTimeOperator) {
|
|
||||||
this.modifyTimeOperator = modifyTimeOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCreationTime() {
|
|
||||||
return this.creationTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreationTime(String creationTime) {
|
|
||||||
this.creationTime = creationTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCreationTime1() {
|
|
||||||
return this.creationTime1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreationTime1(String creationTime1) {
|
|
||||||
this.creationTime1 = creationTime1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCreationTime2() {
|
|
||||||
return this.creationTime2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreationTime2(String creationTime2) {
|
|
||||||
this.creationTime2 = creationTime2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCreationTimeOperator() {
|
|
||||||
return this.creationTimeOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreationTimeOperator(String creationTimeOperator) {
|
|
||||||
this.creationTimeOperator = creationTimeOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValidFlag() {
|
|
||||||
return this.validFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValidFlag(String validFlag) {
|
|
||||||
this.validFlag = validFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValidFlagOperator() {
|
|
||||||
return this.validFlagOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValidFlagOperator(String validFlagOperator) {
|
|
||||||
this.validFlagOperator = validFlagOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemarks() {
|
|
||||||
return this.remarks;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRemarks(String remarks) {
|
|
||||||
this.remarks = remarks;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemarksOperator() {
|
|
||||||
return this.remarksOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRemarksOperator(String remarksOperator) {
|
|
||||||
this.remarksOperator = remarksOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getResponsibleUnit() {
|
|
||||||
return this.responsibleUnit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setResponsibleUnit(String responsibleUnit) {
|
|
||||||
this.responsibleUnit = responsibleUnit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getResponsibleUnitOperator() {
|
|
||||||
return this.responsibleUnitOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setResponsibleUnitOperator(String responsibleUnitOperator) {
|
|
||||||
this.responsibleUnitOperator = responsibleUnitOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEnergyKind() {
|
|
||||||
return this.energyKind;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnergyKind(String energyKind) {
|
|
||||||
this.energyKind = energyKind;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEnergyKindOperator() {
|
|
||||||
return this.energyKindOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnergyKindOperator(String energyKindOperator) {
|
|
||||||
this.energyKindOperator = energyKindOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getApplyArctic() {
|
|
||||||
return this.applyArctic;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApplyArctic(String applyArctic) {
|
|
||||||
this.applyArctic = applyArctic;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getApplyArcticOperator() {
|
|
||||||
return this.applyArcticOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApplyArcticOperator(String applyArcticOperator) {
|
|
||||||
this.applyArcticOperator = applyArcticOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTackTime() {
|
|
||||||
return this.tackTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTackTime(String tackTime) {
|
|
||||||
this.tackTime = tackTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTackTime1() {
|
|
||||||
return this.tackTime1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTackTime1(String tackTime1) {
|
|
||||||
this.tackTime1 = tackTime1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTackTime2() {
|
|
||||||
return this.tackTime2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTackTime2(String tackTime2) {
|
|
||||||
this.tackTime2 = tackTime2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTackTimeOperator() {
|
|
||||||
return this.tackTimeOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTackTimeOperator(String tackTimeOperator) {
|
|
||||||
this.tackTimeOperator = tackTimeOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getParts() {
|
|
||||||
return this.parts;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParts(String parts) {
|
|
||||||
this.parts = parts;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPartsOperator() {
|
|
||||||
return this.partsOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPartsOperator(String partsOperator) {
|
|
||||||
this.partsOperator = partsOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getItemsName() {
|
|
||||||
return this.itemsName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setItemsName(String itemsName) {
|
|
||||||
this.itemsName = itemsName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getItemsNameOperator() {
|
|
||||||
return this.itemsNameOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setItemsNameOperator(String itemsNameOperator) {
|
|
||||||
this.itemsNameOperator = itemsNameOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getItemsNum() {
|
|
||||||
return this.itemsNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setItemsNum(String itemsNum) {
|
|
||||||
this.itemsNum = itemsNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getItemsNumOperator() {
|
|
||||||
return this.itemsNumOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setItemsNumOperator(String itemsNumOperator) {
|
|
||||||
this.itemsNumOperator = itemsNumOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStandId() {
|
|
||||||
return this.standId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStandId(String standId) {
|
|
||||||
this.standId = standId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStandIdOperator() {
|
|
||||||
return this.standIdOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStandIdOperator(String standIdOperator) {
|
|
||||||
this.standIdOperator = standIdOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getId() {
|
|
||||||
return this.id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(String id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIdOperator() {
|
|
||||||
return this.idOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIdOperator(String idOperator) {
|
|
||||||
this.idOperator = idOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getProcessFlag() {
|
|
||||||
return processFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProcessFlag(String processFlag) {
|
|
||||||
this.processFlag = processFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNameOrRequest() {
|
|
||||||
return nameOrRequest;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNameOrRequest(String nameOrRequest) {
|
|
||||||
this.nameOrRequest = nameOrRequest;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String[] getIdlist() {
|
|
||||||
return idlist;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIdlist(String[] idlist) {
|
|
||||||
this.idlist = idlist;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFileType() {
|
|
||||||
return fileType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileType(String fileType) {
|
|
||||||
this.fileType = fileType;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -21,5 +21,4 @@ public interface SarBussStandValDao extends BaseMapper<SarBussStandVal> {
|
|||||||
int deleteDataByStandId(String standId);
|
int deleteDataByStandId(String standId);
|
||||||
|
|
||||||
int insertForeach(List<SarBussStandVal> list); //批量新增
|
int insertForeach(List<SarBussStandVal> list); //批量新增
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
-61
@@ -1,7 +1,6 @@
|
|||||||
package com.adc.da.slrs.sarBussionessStand.controller;
|
package com.adc.da.slrs.sarBussionessStand.controller;
|
||||||
|
|
||||||
|
|
||||||
import com.adc.da.common.ReadExcel;
|
|
||||||
import com.adc.da.person.service.IPersonCollectEOService;
|
import com.adc.da.person.service.IPersonCollectEOService;
|
||||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||||
@@ -15,27 +14,17 @@ import com.adc.da.http.PageInfo;
|
|||||||
import com.adc.da.http.ResponseMessage;
|
import com.adc.da.http.ResponseMessage;
|
||||||
import com.adc.da.http.Result;
|
import com.adc.da.http.Result;
|
||||||
import com.adc.da.util.LoginUserUtil;
|
import com.adc.da.util.LoginUserUtil;
|
||||||
import com.adc.da.util.exception.AdcDaBaseException;
|
|
||||||
import com.adc.da.util.utils.IOUtils;
|
|
||||||
import com.adc.da.util.utils.StringUtils;
|
import com.adc.da.util.utils.StringUtils;
|
||||||
import com.adc.da.utils.util.BussStandExportUtil;
|
|
||||||
import com.adc.da.utils.util.SarAdvanceSearchUtil;
|
import com.adc.da.utils.util.SarAdvanceSearchUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import com.adc.da.base.web.BaseController;
|
import com.adc.da.base.web.BaseController;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -52,8 +41,6 @@ import java.util.List;
|
|||||||
@RequestMapping("/${restPath}/lawss/sarBussionessStand")
|
@RequestMapping("/${restPath}/lawss/sarBussionessStand")
|
||||||
public class SarBussionessStandController extends BaseController<SarBussionessStand> {
|
public class SarBussionessStandController extends BaseController<SarBussionessStand> {
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SarBussionessStandController.class);
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISarBussionessStandService sarBussionessStandEOService;
|
private ISarBussionessStandService sarBussionessStandEOService;
|
||||||
|
|
||||||
@@ -70,54 +57,6 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IDicTypeEOService dicTypeEOService;
|
private IDicTypeEOService dicTypeEOService;
|
||||||
|
|
||||||
@ApiOperation(value = "|SarBussionessStandEO|删除")
|
|
||||||
@PostMapping("deleteSarBussionessStand")
|
|
||||||
//401问题2021-03-31暂时注释掉 liuhuiwen
|
|
||||||
// @RequiresPermissions("lawss:sarBussionessStand:delete")
|
|
||||||
public ResponseMessage delete(String ids) throws Exception {
|
|
||||||
SarBussionessStandEOPage sarBussionessStandEOPage = new SarBussionessStandEOPage();
|
|
||||||
sarBussionessStandEOPage.setIdlist(ids.split(","));
|
|
||||||
ResponseMessage<SarBussionessStand> result = sarBussionessStandEOService.deleteSarBussionessStand(sarBussionessStandEOPage);
|
|
||||||
logger.info("delete from SAR_BUSSIONESS_STAND where id = {}", ids);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将查询出来的数据导出到EXCEL表格中
|
|
||||||
* @param
|
|
||||||
* @return
|
|
||||||
* @author gaoyan
|
|
||||||
* date 2018-09-04
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "|SarBussionessStandEO|导出excel")
|
|
||||||
@GetMapping(value = "/exportSarBussionessStand")
|
|
||||||
public void exportSarBussionessStand(String exportContent, String exportType, String exportName,String userId, HttpServletResponse response, HttpServletRequest request)throws Exception {
|
|
||||||
OutputStream os = null;
|
|
||||||
Workbook workbook = null;
|
|
||||||
try {
|
|
||||||
if(StringUtils.isEmpty(exportName)||exportName.equals("null")){
|
|
||||||
exportName="企业标准库";
|
|
||||||
}
|
|
||||||
response.setHeader("Content-Disposition",
|
|
||||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx",request));
|
|
||||||
response.setContentType("application/force-download");
|
|
||||||
//导出数据
|
|
||||||
List<SarBussionessStand> datas = sarBussionessStandEOService.getSarBussionessStand(exportType,exportContent,userId);
|
|
||||||
workbook = BussStandExportUtil.exportDatas(datas);
|
|
||||||
os = response.getOutputStream();
|
|
||||||
workbook.write(os);
|
|
||||||
os.flush();
|
|
||||||
} catch (IOException e) {
|
|
||||||
logger.error(e.getMessage(), e);
|
|
||||||
throw new AdcDaBaseException("下载文件失败,请重试");
|
|
||||||
} finally {
|
|
||||||
IOUtils.closeQuietly(os);
|
|
||||||
if (workbook != null) {
|
|
||||||
workbook.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "|SarBussionessStandEO|企业标准修改")
|
@ApiOperation(value = "|SarBussionessStandEO|企业标准修改")
|
||||||
@PostMapping(value = "/updateSarBussionessStand")
|
@PostMapping(value = "/updateSarBussionessStand")
|
||||||
//401问题2021-03-31暂时注释掉 liuhuiwen
|
//401问题2021-03-31暂时注释掉 liuhuiwen
|
||||||
|
|||||||
-2
@@ -95,7 +95,5 @@ public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
|||||||
|
|
||||||
int updateByPrimaryKeySelectiveTimeNotNull(SarBussionessStand sarBussionessStandEO);
|
int updateByPrimaryKeySelectiveTimeNotNull(SarBussionessStand sarBussionessStandEO);
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(SarBussionessStand sarBussionessStandEO);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
-5
@@ -1,6 +1,5 @@
|
|||||||
package com.adc.da.slrs.sarBussionessStand.service;
|
package com.adc.da.slrs.sarBussionessStand.service;
|
||||||
|
|
||||||
import com.adc.da.http.ResponseMessage;
|
|
||||||
import com.adc.da.search.entity.SarBussionessStandEO;
|
import com.adc.da.search.entity.SarBussionessStandEO;
|
||||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||||
@@ -18,10 +17,6 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface ISarBussionessStandService extends IService<SarBussionessStand> {
|
public interface ISarBussionessStandService extends IService<SarBussionessStand> {
|
||||||
|
|
||||||
ResponseMessage<SarBussionessStand> deleteSarBussionessStand(SarBussionessStandEOPage page) throws Exception;
|
|
||||||
|
|
||||||
List<SarBussionessStand> getSarBussionessStand(String exportType, String exportContent,String userId) throws Exception;
|
|
||||||
|
|
||||||
SarBussionessStand updateSarBussionessStand(SarBussionessStand sarBussionessStandEO) throws Exception;
|
SarBussionessStand updateSarBussionessStand(SarBussionessStand sarBussionessStandEO) throws Exception;
|
||||||
|
|
||||||
List<SarBussionessStand> selectStandardsByStandNumber(String replaceStandNum);
|
List<SarBussionessStand> selectStandardsByStandNumber(String replaceStandNum);
|
||||||
|
|||||||
-14
@@ -6,22 +6,16 @@ import com.adc.da.common.ConvertMqEO;
|
|||||||
import com.adc.da.common.SarTypeEnum;
|
import com.adc.da.common.SarTypeEnum;
|
||||||
import com.adc.da.common.SelectionTypeEnum;
|
import com.adc.da.common.SelectionTypeEnum;
|
||||||
import com.adc.da.common.UseModuleEnum;
|
import com.adc.da.common.UseModuleEnum;
|
||||||
import com.adc.da.http.ResponseMessage;
|
|
||||||
import com.adc.da.http.Result;
|
|
||||||
import com.adc.da.mq.CreateMQService;
|
import com.adc.da.mq.CreateMQService;
|
||||||
import com.adc.da.mq.CreateStandMQService;
|
import com.adc.da.mq.CreateStandMQService;
|
||||||
import com.adc.da.person.dao.PersonCollectEODao;
|
|
||||||
import com.adc.da.person.entity.TsPersonCollect;
|
import com.adc.da.person.entity.TsPersonCollect;
|
||||||
import com.adc.da.person.page.PersonCollectEOPage;
|
import com.adc.da.person.page.PersonCollectEOPage;
|
||||||
import com.adc.da.person.service.IPersonCollectEOService;
|
import com.adc.da.person.service.IPersonCollectEOService;
|
||||||
import com.adc.da.search.entity.StandLawsEO;
|
|
||||||
import com.adc.da.search.service.StandLawsSearchService;
|
|
||||||
import com.adc.da.slrs.otConvertMq.dao.OtConvertMqDao;
|
import com.adc.da.slrs.otConvertMq.dao.OtConvertMqDao;
|
||||||
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
||||||
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
||||||
import com.adc.da.slrs.sarBussStandFile.dao.SarBussStandFileDao;
|
import com.adc.da.slrs.sarBussStandFile.dao.SarBussStandFileDao;
|
||||||
import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
|
import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
|
||||||
import com.adc.da.slrs.sarBussStandItems.dao.SarBussStandItemsDao;
|
|
||||||
import com.adc.da.slrs.sarBussStandMenu.dao.SarBussStandMenuDao;
|
import com.adc.da.slrs.sarBussStandMenu.dao.SarBussStandMenuDao;
|
||||||
import com.adc.da.slrs.sarBussStandMenu.entity.SarBussStandMenu;
|
import com.adc.da.slrs.sarBussStandMenu.entity.SarBussStandMenu;
|
||||||
import com.adc.da.slrs.sarBussStandVal.dao.SarBussStandValDao;
|
import com.adc.da.slrs.sarBussStandVal.dao.SarBussStandValDao;
|
||||||
@@ -33,7 +27,6 @@ import com.adc.da.slrs.sarResource.entity.TsResource;
|
|||||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarAdvanceSearchVO;
|
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||||
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
|
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
|
||||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||||
@@ -45,7 +38,6 @@ import com.adc.da.sys.util.LoginUserUtil;
|
|||||||
import com.adc.da.util.UUIDUtils;
|
import com.adc.da.util.UUIDUtils;
|
||||||
import com.adc.da.utils.util.FieldConvertUtil;
|
import com.adc.da.utils.util.FieldConvertUtil;
|
||||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||||
import com.adc.da.utils.util.SarAdvanceSearchUtil;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
@@ -128,12 +120,6 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISarUpdLogService sarUpdLogEOService;
|
private ISarUpdLogService sarUpdLogEOService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ITsResourceService sarMenuEOService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private PersonCollectEODao personCollectEODao;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SarBussStandAttrInfoDao sarBussStandAttrInfoEODao;
|
private SarBussStandAttrInfoDao sarBussStandAttrInfoEODao;
|
||||||
|
|
||||||
|
|||||||
+19
-6
@@ -6,18 +6,18 @@ import com.adc.da.att.entity.AttFileEO;
|
|||||||
import com.adc.da.base.web.BaseController;
|
import com.adc.da.base.web.BaseController;
|
||||||
import com.adc.da.http.ResponseMessage;
|
import com.adc.da.http.ResponseMessage;
|
||||||
import com.adc.da.http.Result;
|
import com.adc.da.http.Result;
|
||||||
|
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarLawsAttrDetailedList;
|
||||||
import com.adc.da.slrs.sarLawsDetailedList.Util.BeanConverUtil;
|
import com.adc.da.slrs.sarLawsDetailedList.Util.BeanConverUtil;
|
||||||
import com.adc.da.slrs.sarLawsDetailedList.entity.AddDetailedDto;
|
import com.adc.da.slrs.sarLawsDetailedList.entity.*;
|
||||||
import com.adc.da.slrs.sarLawsDetailedList.entity.FindFileNameDto;
|
|
||||||
import com.adc.da.slrs.sarLawsDetailedList.entity.SarLawsDetailedList;
|
|
||||||
import com.adc.da.slrs.sarLawsDetailedList.entity.DetailedUpDto;
|
|
||||||
import com.adc.da.slrs.sarLawsDetailedList.service.impl.SarLawsDetailedListServiceImpl;
|
import com.adc.da.slrs.sarLawsDetailedList.service.impl.SarLawsDetailedListServiceImpl;
|
||||||
import com.adc.da.util.utils.CollectionUtils;
|
import com.adc.da.util.utils.CollectionUtils;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -26,6 +26,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -114,7 +115,6 @@ public class SarLawsDetailedListController extends BaseController<SarLawsDetaile
|
|||||||
fileNameDto.setFileName(FileNames);//存入
|
fileNameDto.setFileName(FileNames);//存入
|
||||||
|
|
||||||
}
|
}
|
||||||
list1.set(a,fileNameDto);
|
|
||||||
}else if (null!=list.get(a).getFileIds()){
|
}else if (null!=list.get(a).getFileIds()){
|
||||||
AttFileEO attFileEO = attFileEOController.getAttFileInfo(list.get(a).getFileIds()).getData();
|
AttFileEO attFileEO = attFileEOController.getAttFileInfo(list.get(a).getFileIds()).getData();
|
||||||
FindFileNameDto fileNameDto = list1.get(a);
|
FindFileNameDto fileNameDto = list1.get(a);
|
||||||
@@ -153,8 +153,21 @@ public class SarLawsDetailedListController extends BaseController<SarLawsDetaile
|
|||||||
@PutMapping("/updateList")
|
@PutMapping("/updateList")
|
||||||
public ResponseMessage updateList(@RequestBody DetailedUpDto detailedUpDto) {
|
public ResponseMessage updateList(@RequestBody DetailedUpDto detailedUpDto) {
|
||||||
String src = sarLawsDetailedListService.updateList(detailedUpDto);
|
String src = sarLawsDetailedListService.updateList(detailedUpDto);
|
||||||
return Result.success("200",src,true);
|
if (Objects.equals(src, "国家/地区清单修改失败") || Objects.equals(src, "车型类别清单修改失败")){
|
||||||
|
return Result.error("200","",false);
|
||||||
|
}else if (Objects.equals(src, "国家/地区清单修改成功") || Objects.equals(src, "车型类别清单修改成功")){
|
||||||
|
return Result.success("200","",true);
|
||||||
|
}else {
|
||||||
|
return Result.success("200","",true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "标准插入已存在的清单")
|
||||||
|
@PostMapping("/standardToLaws")
|
||||||
|
public ResponseMessage standardToLaws(String countryArea,TimeDto timeDto){
|
||||||
|
sarLawsDetailedListService.standardToLaws(countryArea,timeDto);
|
||||||
|
return Result.success("200",null);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+4
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarLawsDetailedList.service;
|
|||||||
import com.adc.da.slrs.sarLawsDetailedList.entity.AddDetailedDto;
|
import com.adc.da.slrs.sarLawsDetailedList.entity.AddDetailedDto;
|
||||||
import com.adc.da.slrs.sarLawsDetailedList.entity.SarLawsDetailedList;
|
import com.adc.da.slrs.sarLawsDetailedList.entity.SarLawsDetailedList;
|
||||||
import com.adc.da.slrs.sarLawsDetailedList.entity.DetailedUpDto;
|
import com.adc.da.slrs.sarLawsDetailedList.entity.DetailedUpDto;
|
||||||
|
import com.adc.da.slrs.sarLawsDetailedList.entity.TimeDto;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@@ -29,4 +30,7 @@ public interface ISarLawsDetailedListService extends IService<SarLawsDetailedLis
|
|||||||
String updateList(DetailedUpDto detailedUpDto);
|
String updateList(DetailedUpDto detailedUpDto);
|
||||||
|
|
||||||
SarLawsDetailedList selSarLawDetailById(@Param("id")String id);
|
SarLawsDetailedList selSarLawDetailById(@Param("id")String id);
|
||||||
|
|
||||||
|
public void standardToLaws(String countryArea,TimeDto timeDto);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+213
-5
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarLawsDetailedList.service.impl;
|
|||||||
import com.adc.da.att.service.IAttFileEOService;
|
import com.adc.da.att.service.IAttFileEOService;
|
||||||
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
||||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarLawsAttrDetailedList;
|
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarLawsAttrDetailedList;
|
||||||
|
import com.adc.da.slrs.sarLawsAttrDetailedList.service.ISarLawsAttrDetailedListService;
|
||||||
import com.adc.da.slrs.sarLawsAttrDetailedList.service.impl.SarLawsAttrDetailedListServiceImpl;
|
import com.adc.da.slrs.sarLawsAttrDetailedList.service.impl.SarLawsAttrDetailedListServiceImpl;
|
||||||
import com.adc.da.slrs.sarLawsDetailedList.dao.SarLawsDetailedListDao;
|
import com.adc.da.slrs.sarLawsDetailedList.dao.SarLawsDetailedListDao;
|
||||||
import com.adc.da.slrs.sarLawsDetailedList.entity.AddDetailedDto;
|
import com.adc.da.slrs.sarLawsDetailedList.entity.AddDetailedDto;
|
||||||
@@ -17,10 +18,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.lang.reflect.Array;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static com.adc.da.login.util.UserUtils.getUserName;
|
import static com.adc.da.login.util.UserUtils.getUserName;
|
||||||
@@ -248,6 +251,8 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
for (int a = 0; a < id.length; a++) {
|
for (int a = 0; a < id.length; a++) {
|
||||||
TimeDto dto = new TimeDto();
|
TimeDto dto = new TimeDto();
|
||||||
dto.setStandId(id[a]);
|
dto.setStandId(id[a]);
|
||||||
|
//putTiem即ssrq可能为空 ''
|
||||||
|
if (putTime.length>0){
|
||||||
if ("-".equals(putTime[a]) || null == putTime[a]) {
|
if ("-".equals(putTime[a]) || null == putTime[a]) {
|
||||||
dto.setSsrq(null);
|
dto.setSsrq(null);
|
||||||
} else {
|
} else {
|
||||||
@@ -263,6 +268,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
} else {
|
} else {
|
||||||
dto.setZccssrqgj(zcc[a]);
|
dto.setZccssrqgj(zcc[a]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
timeDto.add(dto);
|
timeDto.add(dto);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -314,7 +320,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
for (String s : split) {
|
for (String s : split) {
|
||||||
for (Map<String, String> map1 : arr) {
|
for (Map<String, String> map1 : arr) {
|
||||||
if (map1.get("value").equals(s)) {
|
if (map1.get("value").equals(s)) {
|
||||||
s = map1.get("label");
|
s = map1.get("value");
|
||||||
builder.append(s + ",");
|
builder.append(s + ",");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -328,7 +334,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
} else {
|
} else {
|
||||||
for (Map<String, String> map1 : arr) {
|
for (Map<String, String> map1 : arr) {
|
||||||
if (map1.get("value").equals(list1.getCountryArea())) {
|
if (map1.get("value").equals(list1.getCountryArea())) {
|
||||||
list1.setCountryArea(map1.get("label"));
|
list1.setCountryArea(map1.get("value"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -343,11 +349,156 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String updateList(DetailedUpDto detailedUpDto) {
|
public String updateList(DetailedUpDto detailedUpDto) {
|
||||||
|
|
||||||
|
QueryWrapper<SarLawsDetailedList> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.select("DISTINCT country_area,car_type");
|
||||||
|
List<SarLawsDetailedList> sarLawsDetailedLists = sarLawsDetailedListDao.selectList(wrapper);
|
||||||
|
|
||||||
|
//list是数据库里根据id查出来的数据;detailedUpDto是页面传回来的数据
|
||||||
|
SarLawsDetailedList list = sarLawsDetailedListDao.selectById(detailedUpDto.getId());
|
||||||
|
System.out.println("数据库里存的当前数据"+list.getCountryArea());
|
||||||
|
System.out.println("页面现在的数据"+detailedUpDto.getCountryArea());
|
||||||
|
|
||||||
|
//国家/地区清单 多选是否可以添加的标识,true表示可以添加,false表示不许添加
|
||||||
|
boolean multiEditFlag = true;
|
||||||
|
//国家/地区清单 单选是否可以添加的标识,true表示可以添加,false表示不许添加
|
||||||
|
boolean singleEditFlag = true;
|
||||||
|
//车型类别是否可以添加的标识,true表示可以添加,false表示不许添加
|
||||||
|
boolean carEditFlag = true;
|
||||||
|
|
||||||
|
if (detailedUpDto.getCountryArea() == null && detailedUpDto.getCarType() == null) {
|
||||||
|
//下面放修改的具体方法
|
||||||
|
//国家或地区
|
||||||
|
//如果页面的国家地区为空,就把数据库里的国家地区字段也设为空
|
||||||
|
updateListMethod(detailedUpDto);
|
||||||
|
return "其他清单添加成功";
|
||||||
|
}
|
||||||
|
//如果是车辆修改
|
||||||
|
else if (detailedUpDto.getCarType() != null) {
|
||||||
|
//就判断页面的值和数据库里的值是否相等
|
||||||
|
for (int i = 0; i < sarLawsDetailedLists.size(); i++) {
|
||||||
|
//判断数据库里的数据的车型类别字段是否为空
|
||||||
|
if (null == sarLawsDetailedLists.get(i) || null == sarLawsDetailedLists.get(i).getCarType()){
|
||||||
|
System.out.println("数据库里第" + (i + 1) + "条的车型类别字段长度为空,不重复,目前可以添加");
|
||||||
|
}
|
||||||
|
else if (Objects.equals(detailedUpDto.getCarType(), list.getCarType())){
|
||||||
|
System.out.println("页面的数据和数据库里存的当前数据相同,说明没有做更改,允许提交");
|
||||||
|
}
|
||||||
|
//相等就不许添加
|
||||||
|
else if (!Objects.equals(detailedUpDto.getCarType(), list.getCarType()) && Objects.equals(detailedUpDto.getCarType(), sarLawsDetailedLists.get(i).getCarType())) {
|
||||||
|
System.out.println("数据库里第" + (i + 1) + "条的车型类别字段和页面一样,重复,不许添加");
|
||||||
|
carEditFlag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//如果是国家修改
|
||||||
|
else if (detailedUpDto.getCountryArea() != null) {
|
||||||
|
for (int i = 0; i < sarLawsDetailedLists.size(); i++) {
|
||||||
|
//就先判断数据库里的数据的国家/地区字段是否为空
|
||||||
|
if (null == sarLawsDetailedLists.get(i) || null == sarLawsDetailedLists.get(i).getCountryArea()) {
|
||||||
|
System.out.println("数据库里第" + (i + 1) + "条的国家地区字段长度为空,不重复,目前可以添加");
|
||||||
|
}
|
||||||
|
else if (Objects.equals(detailedUpDto.getCountryArea(), list.getCountryArea())){
|
||||||
|
System.out.println("页面的数据和数据库里存的当前数据相同,说明没有做更改,允许提交");
|
||||||
|
}
|
||||||
|
//再判断页面字段长度是否与数据库里的长度一样,如果长度不一样,允许新增
|
||||||
|
else if (detailedUpDto.getCountryArea().length() != sarLawsDetailedLists.get(i).getCountryArea().length()) {
|
||||||
|
System.out.println("数据库里第" + (i + 1) + "条的国家地区字段长度和页面的国家地区字段长度不一样,不重复,目前可以添加");
|
||||||
|
}
|
||||||
|
//如果不为空且长度一样
|
||||||
|
else {
|
||||||
|
//判断页面的国家地区是单选还是多选(判断能不能拆)
|
||||||
|
if (detailedUpDto.getCountryArea().contains(",")) {
|
||||||
|
System.out.println("页面是多选");
|
||||||
|
//如果数据库里的国家地区字段存在",",说明是多选,如果不存在说明是单选
|
||||||
|
if (sarLawsDetailedLists.get(i).getCountryArea().contains(",")) {
|
||||||
|
System.out.println("数据库是多选,如果页面字段拆分之后都包含于数据库字段拆分之后,则说明重复,目前不许添加");
|
||||||
|
System.out.println("页面字段为" + detailedUpDto.getCountryArea());
|
||||||
|
//页面字段以“,”为分隔符拆分后的结果
|
||||||
|
String[] frontCountryArea = detailedUpDto.getCountryArea().split(",");
|
||||||
|
//数据库字段以“,”为分隔符拆分后的结果
|
||||||
|
String[] databaseCountryArea = sarLawsDetailedLists.get(i).getCountryArea().split(",");
|
||||||
|
|
||||||
|
//如果页面字段拆分之后都包含于数据库字段拆分之后,则说明重复,不许添加
|
||||||
|
for (int j = 0; j < frontCountryArea.length; j++) {
|
||||||
|
//如果数据库包含了页面字段的所有值,说明这俩完全相同,重复,不许添加
|
||||||
|
List<String> databaseCountryAreaList = Arrays.asList(databaseCountryArea);
|
||||||
|
if (!Objects.equals(detailedUpDto.getCountryArea(), list.getCountryArea()) && databaseCountryAreaList.contains(frontCountryArea[j])) {
|
||||||
|
System.out.println("数据库" + databaseCountryAreaList);
|
||||||
|
System.out.println("页面" + frontCountryArea[j]);
|
||||||
|
System.out.println("数据库里的字段包含页面里的字段,可能重复,目前不许修改");
|
||||||
|
multiEditFlag = false;
|
||||||
|
} else {
|
||||||
|
System.out.println("数据库" + databaseCountryAreaList);
|
||||||
|
System.out.println("页面" + frontCountryArea[j]);
|
||||||
|
System.out.println("数据库里的字段和页面字段虽然长度相同,但是里面有不一样的元素,可以修改");
|
||||||
|
multiEditFlag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (multiEditFlag == true) {
|
||||||
|
System.out.println("长度相同,只要有一个不重复,就可以添加");
|
||||||
|
} else {
|
||||||
|
System.out.println("长度相同,整个循环下来都重复,说明两个字段重复,不许添加");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
System.out.println("页面是单选");
|
||||||
|
|
||||||
|
//如果数据库里的国家地区字段存在",",说明是多选,如果不存在说明是单选
|
||||||
|
if (sarLawsDetailedLists.get(i).getCountryArea().contains(",")) {
|
||||||
|
System.out.println("数据库是多选,肯定不重复,目前可以添加");
|
||||||
|
} else {
|
||||||
|
System.out.println("数据库是单选,如果数据库里的字段和页面的字段相等,重复,不许添加");
|
||||||
|
//如果数据库里的字段和页面的字段相等,重复,不许添加
|
||||||
|
if (!Objects.equals(detailedUpDto.getCountryArea(), list.getCountryArea()) && Objects.equals(sarLawsDetailedLists.get(i).getCountryArea(), detailedUpDto.getCountryArea())) {
|
||||||
|
System.out.println("数据库里的字段和页面的字段相等,重复,不许添加");
|
||||||
|
singleEditFlag = false;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
System.out.println("数据库里的字段和页面的字段不相等,不重复,允许添加");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//如果整个循环下来都没有重复,则可以添加,不然就说明有重复,不能添加
|
||||||
|
if (carEditFlag == true && multiEditFlag == true && singleEditFlag == true) {
|
||||||
|
//下面放添加的具体方法
|
||||||
|
//国家或地区
|
||||||
|
//如果页面的国家地区为空,就把数据库里的国家地区字段也设为空
|
||||||
|
updateListMethod(detailedUpDto);
|
||||||
|
return "车型类别清单修改成功";
|
||||||
|
//添加方法结束
|
||||||
|
} else if (carEditFlag == false){
|
||||||
|
//0表示添加成功,1表示添加失败
|
||||||
|
return "车型类别清单修改失败";
|
||||||
|
}
|
||||||
|
|
||||||
|
//如果循环完整个数据库,都没有重复使当前数据无法添加,则添加
|
||||||
|
if (multiEditFlag == true && singleEditFlag == true && carEditFlag == true) {
|
||||||
|
//下面放添加的具体方法
|
||||||
|
//国家或地区
|
||||||
|
//如果页面的国家地区为空,就把数据库里的国家地区字段也设为空
|
||||||
|
updateListMethod(detailedUpDto);
|
||||||
|
//0表示添加成功,1表示添加失败
|
||||||
|
return "国家/地区清单修改成功";
|
||||||
|
//添加方法结束
|
||||||
|
} else {
|
||||||
|
//0表示添加成功,1表示添加失败
|
||||||
|
return "国家/地区清单修改失败";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateListMethod(DetailedUpDto detailedUpDto) {
|
||||||
//list是数据库里根据id查出来的数据;detailedUpDto是页面传回来的数据
|
//list是数据库里根据id查出来的数据;detailedUpDto是页面传回来的数据
|
||||||
SarLawsDetailedList list = sarLawsDetailedListDao.selectById(detailedUpDto.getId());
|
SarLawsDetailedList list = sarLawsDetailedListDao.selectById(detailedUpDto.getId());
|
||||||
|
|
||||||
//国家或地区
|
|
||||||
//如果页面的国家地区为空,就把数据库里的国家地区字段也设为空
|
|
||||||
if (StringUtils.isBlank(detailedUpDto.getCountryArea())) list.setCountryArea(null);
|
if (StringUtils.isBlank(detailedUpDto.getCountryArea())) list.setCountryArea(null);
|
||||||
else if ("null".equals(detailedUpDto.getCountryArea())) ;
|
else if ("null".equals(detailedUpDto.getCountryArea())) ;
|
||||||
//把数据库里的国家地区字段设为页面的国家地区
|
//把数据库里的国家地区字段设为页面的国家地区
|
||||||
@@ -432,11 +583,68 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
|||||||
}
|
}
|
||||||
service.updateDetailedLaws(detailedUpDto.getId(), timeDto);
|
service.updateDetailedLaws(detailedUpDto.getId(), timeDto);
|
||||||
}
|
}
|
||||||
return "修改成功";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SarLawsDetailedList selSarLawDetailById(String id) {
|
public SarLawsDetailedList selSarLawDetailById(String id) {
|
||||||
return baseMapper.selectById(id);
|
return baseMapper.selectById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISarLawsAttrDetailedListService sarLawsAttrDetailedListService;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void standardToLaws(String countryArea,TimeDto timeDto) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加入对应"国家/地区"的清单列表
|
||||||
|
*/
|
||||||
|
//清单id
|
||||||
|
//标准id
|
||||||
|
|
||||||
|
//1.获取标准清单的"国家/地区"
|
||||||
|
QueryWrapper<SarLawsDetailedList> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.select("country_area","id");
|
||||||
|
//查询清单中的国家地区和清单id
|
||||||
|
List<SarLawsDetailedList> sarLawsDetailedLists = sarLawsDetailedListDao.selectList(wrapper);
|
||||||
|
//2.判断修改的标准的"国家/地区"与清单中的是否一致,一致则添加到清单中,不一致不作处理
|
||||||
|
String[] split = countryArea.split(","); //拆分标准中的国家地区
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//遍历清单 对比国家地区
|
||||||
|
for (SarLawsDetailedList lawsDetailed : sarLawsDetailedLists) {
|
||||||
|
if (lawsDetailed.getCountryArea()==null){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String[] sarLawsCounties = lawsDetailed.getCountryArea().split(",");//拆分清单中的国家地区
|
||||||
|
// 对比清单列表中的国家地区,是否一致
|
||||||
|
Arrays.sort(split);
|
||||||
|
Arrays.sort(sarLawsCounties);
|
||||||
|
if ( Arrays.equals(split,sarLawsCounties)){
|
||||||
|
|
||||||
|
//一致时插入表并关联detailedListId和standId
|
||||||
|
ArrayList<TimeDto> timeDtos = new ArrayList<>();
|
||||||
|
timeDtos.add(timeDto);
|
||||||
|
|
||||||
|
QueryWrapper<SarLawsAttrDetailedList> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("stand_id",timeDto.getStandId());
|
||||||
|
|
||||||
|
|
||||||
|
//如果目标清单中已存标准在则更新 懒得写更新(⓿_⓿) 直接删掉,再重新插入
|
||||||
|
if (sarLawsAttrDetailedListDao.selectCount(queryWrapper)>0) {
|
||||||
|
sarLawsAttrDetailedListDao.delete(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
sarLawsAttrDetailedListService.insertDetailedList(lawsDetailed.getId(),timeDtos);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+8
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -52,6 +53,13 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
|||||||
return Result.success("200",publicList);
|
return Result.success("200",publicList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询流程汇总-公共意见")
|
||||||
|
@GetMapping("/getPublicIdea")
|
||||||
|
public ResponseMessage getPublicIdea(@Param("unique") String unique){
|
||||||
|
List<SarPublicIdeaAll> publicList =sarPublicIdeaAllDao.getPublicIdea(unique);
|
||||||
|
return Result.success("200",publicList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "查询全部意见")
|
@ApiOperation(value = "查询全部意见")
|
||||||
@GetMapping("/checkIsShow")
|
@GetMapping("/checkIsShow")
|
||||||
|
|||||||
@@ -3,6 +3,11 @@ package com.adc.da.slrs.sarStandIdea.dao;
|
|||||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -15,4 +20,5 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface SarPublicIdeaAllDao extends BaseMapper<SarPublicIdeaAll> {
|
public interface SarPublicIdeaAllDao extends BaseMapper<SarPublicIdeaAll> {
|
||||||
|
|
||||||
|
List<SarPublicIdeaAll> getPublicIdea(@Param("unique")String unique);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,4 +10,5 @@ public class DetAllStandDto {
|
|||||||
String userId;
|
String userId;
|
||||||
String endTime;
|
String endTime;
|
||||||
String Account;
|
String Account;
|
||||||
|
String ideaId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,5 +63,8 @@ public class SarPublicIdea extends BaseEntity {
|
|||||||
@TableField("stand_type")
|
@TableField("stand_type")
|
||||||
private String standType;
|
private String standType;
|
||||||
|
|
||||||
|
@TableField("uniques")
|
||||||
|
private String uniques;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ public class SarPublicIdeaAll extends BaseEntity {
|
|||||||
@TableField("new_text")
|
@TableField("new_text")
|
||||||
private String newText;
|
private String newText;
|
||||||
|
|
||||||
|
@TableField("idea_id")
|
||||||
|
private String ideaId;
|
||||||
|
|
||||||
public static final String CID = "cid";
|
public static final String CID = "cid";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@ public class SarPublicIdeaAllServiceImpl extends ServiceImpl<SarPublicIdeaAllDao
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
QueryWrapper<SarPublicIdeaAll> wrapper = new QueryWrapper<>();
|
QueryWrapper<SarPublicIdeaAll> wrapper = new QueryWrapper<>();
|
||||||
wrapper.eq("CID", detAllStandDto.getCid());
|
wrapper.eq("idea_id", detAllStandDto.getIdeaId());
|
||||||
Page<SarPublicIdeaAll> page = new Page<>(detAllStandDto.getPage(), detAllStandDto.getSize());
|
Page<SarPublicIdeaAll> page = new Page<>(detAllStandDto.getPage(), detAllStandDto.getSize());
|
||||||
IPage<SarPublicIdeaAll> userIPage = sarPublicIdeaAllDao.selectPage(page, wrapper);
|
IPage<SarPublicIdeaAll> userIPage = sarPublicIdeaAllDao.selectPage(page, wrapper);
|
||||||
System.out.println("总条数" + userIPage.getTotal());
|
System.out.println("总条数" + userIPage.getTotal());
|
||||||
|
|||||||
+1
-5
@@ -193,13 +193,9 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
|||||||
|
|
||||||
|
|
||||||
public List<SarStandItems> querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
|
public List<SarStandItems> querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
|
||||||
|
//分页查询的总数
|
||||||
|
|
||||||
|
|
||||||
Integer count=dao.sarItemCount(page);
|
Integer count=dao.sarItemCount(page);
|
||||||
page.getPager().setRowCount(count);
|
page.getPager().setRowCount(count);
|
||||||
|
|
||||||
|
|
||||||
List<SarStandItems> sarStandItems = dao.querySarItemAndInterpretation(page);
|
List<SarStandItems> sarStandItems = dao.querySarItemAndInterpretation(page);
|
||||||
return sarStandItems;
|
return sarStandItems;
|
||||||
}
|
}
|
||||||
|
|||||||
+28
-22
@@ -11,7 +11,6 @@ import com.adc.da.mq.CreateStandMQService;
|
|||||||
import com.adc.da.person.dao.PersonCollectEODao;
|
import com.adc.da.person.dao.PersonCollectEODao;
|
||||||
import com.adc.da.person.dao.PersonShareEODao;
|
import com.adc.da.person.dao.PersonShareEODao;
|
||||||
import com.adc.da.person.service.IPersonCollectEOService;
|
import com.adc.da.person.service.IPersonCollectEOService;
|
||||||
import com.adc.da.search.entity.StandLawsEO;
|
|
||||||
import com.adc.da.search.service.StandLawsSearchService;
|
import com.adc.da.search.service.StandLawsSearchService;
|
||||||
import com.adc.da.slrs.otConvertMq.dao.OtConvertMqDao;
|
import com.adc.da.slrs.otConvertMq.dao.OtConvertMqDao;
|
||||||
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
||||||
@@ -1137,6 +1136,17 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
* @Return: com.adc.da.util.http.ResponseMessage<com.adc.da.lawss.entity.SarStandardsInfoEO>
|
* @Return: com.adc.da.util.http.ResponseMessage<com.adc.da.lawss.entity.SarStandardsInfoEO>
|
||||||
*/
|
*/
|
||||||
public int updateSarStandardsInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception {
|
public int updateSarStandardsInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加入对应"国家/地区"的清单列表
|
||||||
|
*/
|
||||||
|
|
||||||
|
//1.获取标准清单的"国家/地区"
|
||||||
|
//2.判断修改的标准的"国家/地区"与清单中的是否一致,一致则添加到清单中,不一致不作处理
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String standId = sarStandardsInfoEO.getId();
|
String standId = sarStandardsInfoEO.getId();
|
||||||
// 查询修改前数据信息,为修改代替标准号使用
|
// 查询修改前数据信息,为修改代替标准号使用
|
||||||
SarStandardsInfo beforeSarStandardsInfo = dao.selectById(standId);
|
SarStandardsInfo beforeSarStandardsInfo = dao.selectById(standId);
|
||||||
@@ -1274,30 +1284,30 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
sarStandPutTimeEODao.deleteByStandId(id);
|
sarStandPutTimeEODao.deleteByStandId(id);
|
||||||
//删除文件详情表数据
|
//删除文件详情表数据
|
||||||
sarStandFileEODao.deleteByStandId(id);
|
sarStandFileEODao.deleteByStandId(id);
|
||||||
List<SarStandFile> listFile = sarStandFileEODao.selectFileByStandId(id);
|
// List<SarStandFile> listFile = sarStandFileEODao.selectFileByStandId(id);
|
||||||
if (listFile != null) {
|
// if (listFile != null) {
|
||||||
if (!listFile.isEmpty()) {
|
// if (!listFile.isEmpty()) {
|
||||||
for (int f = 0; f < listFile.size(); f++) {
|
// for (int f = 0; f < listFile.size(); f++) {
|
||||||
//删除文件信息表数据
|
// //删除文件信息表数据
|
||||||
// sarFileInfoEODao.deleteByfileId(listFile.get(f).getId());
|
// sarFileInfoEODao.deleteByfileId(listFile.get(f).getId());
|
||||||
//删除转换表ot_convert数据
|
// //删除转换表ot_convert数据
|
||||||
otConvertEODao.deleteByAttId(listFile.get(f).getAttId());
|
// otConvertEODao.deleteByAttId(listFile.get(f).getAttId());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
//删除代替关系
|
//删除代替关系
|
||||||
updateStandReplaceConnect(getDelStandInfoList);
|
updateStandReplaceConnect(getDelStandInfoList);
|
||||||
//删除收藏表中数据
|
//删除收藏表中数据
|
||||||
personCollectEODao.deleteByResId(id);
|
personCollectEODao.deleteByResId(id);
|
||||||
// 删除分享表中数据
|
// 删除分享表中数据
|
||||||
personShareEODao.deleteByResId(id);
|
personShareEODao.deleteByResId(id);
|
||||||
if(elasflag) {
|
// if(elasflag) {
|
||||||
//删除成功后,将索引中对应数据删除
|
// //删除成功后,将索引中对应数据删除
|
||||||
StandLawsEO standLawsEO = new StandLawsEO();
|
// StandLawsEO standLawsEO = new StandLawsEO();
|
||||||
standLawsEO.setId(sarStandardsInfoEO.getId());
|
// standLawsEO.setId(sarStandardsInfoEO.getId());
|
||||||
standLawsEO.setType("stand");
|
// standLawsEO.setType("stand");
|
||||||
standLawsSearchService.deleteStandLawsSearch(standLawsEO);
|
// sarStandAndLawsEOService.deleteFomrIndex(standLawsEO);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
return countResult;
|
return countResult;
|
||||||
}
|
}
|
||||||
@@ -1387,11 +1397,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
page.setOrderBy("SAR_STANDARDS_INFO.issue_time is null,SAR_STANDARDS_INFO.issue_time desc,SAR_STANDARDS_INFO.id");
|
page.setOrderBy("SAR_STANDARDS_INFO.issue_time is null,SAR_STANDARDS_INFO.issue_time desc,SAR_STANDARDS_INFO.id");
|
||||||
if(standardsInfoExcelVO.getUserId() != null){
|
|
||||||
page.setUserId(standardsInfoExcelVO.getUserId());
|
|
||||||
}else {
|
|
||||||
page.setUserId(LoginUserUtil.getUserId());
|
page.setUserId(LoginUserUtil.getUserId());
|
||||||
}
|
|
||||||
List<SarStandardsInfo> getList = dao.getSarStandardsExportInfo(page);
|
List<SarStandardsInfo> getList = dao.getSarStandardsExportInfo(page);
|
||||||
attrInfoShow(getList);
|
attrInfoShow(getList);
|
||||||
return getList;
|
return getList;
|
||||||
|
|||||||
+3
@@ -1,5 +1,6 @@
|
|||||||
package com.adc.da.slrs.standardSplit.dao;
|
package com.adc.da.slrs.standardSplit.dao;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||||
import com.adc.da.slrs.standardSplit.dto.FileSplitItemsExportDto;
|
import com.adc.da.slrs.standardSplit.dto.FileSplitItemsExportDto;
|
||||||
import com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO;
|
import com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO;
|
||||||
import com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEOPage;
|
import com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEOPage;
|
||||||
@@ -21,6 +22,8 @@ public interface SarFileSplitItemsEODao extends BaseMapper<SarFileSplitItemsEO>
|
|||||||
|
|
||||||
int insertForeach(List<SarFileSplitItemsEO> list);
|
int insertForeach(List<SarFileSplitItemsEO> list);
|
||||||
|
|
||||||
|
int insertStandSplitForeach(@Param(value = "list") List<SarStandItems> list);
|
||||||
|
|
||||||
int deleteByIds(SarFileSplitItemsEO sarFileSplitItemsEO);
|
int deleteByIds(SarFileSplitItemsEO sarFileSplitItemsEO);
|
||||||
|
|
||||||
int deleteByItemsIds(SarFileSplitItemsEO sarFileSplitItemsEO);
|
int deleteByItemsIds(SarFileSplitItemsEO sarFileSplitItemsEO);
|
||||||
|
|||||||
+59
-33
@@ -2,6 +2,7 @@ package com.adc.da.slrs.standardSplit.service.impl;
|
|||||||
|
|
||||||
import com.adc.da.att.service.IAttFileEOService;
|
import com.adc.da.att.service.IAttFileEOService;
|
||||||
import com.adc.da.person.entity.PersonMsgEO;
|
import com.adc.da.person.entity.PersonMsgEO;
|
||||||
|
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||||
import com.adc.da.slrs.standardSplit.dao.*;
|
import com.adc.da.slrs.standardSplit.dao.*;
|
||||||
import com.adc.da.slrs.standardSplit.service.SarLawsInfoEOService;
|
import com.adc.da.slrs.standardSplit.service.SarLawsInfoEOService;
|
||||||
import com.adc.da.att.entity.AttFileEO;
|
import com.adc.da.att.entity.AttFileEO;
|
||||||
@@ -31,10 +32,12 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import com.adc.da.common.SplitFilePragraTypeEnum;
|
import com.adc.da.common.SplitFilePragraTypeEnum;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import com.adc.da.person.dao.PersonShareEODao;
|
import com.adc.da.person.dao.PersonShareEODao;
|
||||||
import com.adc.da.person.dao.PersonCollectEODao;
|
import com.adc.da.person.dao.PersonCollectEODao;
|
||||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||||
@@ -105,7 +108,12 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public int fileAplit(SarFileSplitInfoEO sarFileSplitInfoEO){
|
public int fileAplit(SarFileSplitInfoEO sarFileSplitInfoEO) {
|
||||||
|
|
||||||
|
//用来往标准分解单里添加数据
|
||||||
|
List<SarStandItems> standList = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
// 拆分文件主表中插入数据
|
// 拆分文件主表中插入数据
|
||||||
sarFileSplitInfoEO.setId(UUIDUtils.randomUUID20());
|
sarFileSplitInfoEO.setId(UUIDUtils.randomUUID20());
|
||||||
sarFileSplitInfoEO.setValidFlag(0);
|
sarFileSplitInfoEO.setValidFlag(0);
|
||||||
@@ -244,8 +252,7 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
addItermsConditionsText(messageList.get(messageList.size()-1),itemValList, p.getText());
|
addItermsConditionsText(messageList.get(messageList.size()-1),itemValList, p.getText());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else if (messageNumber >= 3) {
|
||||||
else if (messageNumber>=3){
|
|
||||||
ptest = Pattern.compile("^[\\d.]*$");
|
ptest = Pattern.compile("^[\\d.]*$");
|
||||||
boolean hasGoIf = false;
|
boolean hasGoIf = false;
|
||||||
for (int i=0;i<nowStart.size();i++){
|
for (int i=0;i<nowStart.size();i++){
|
||||||
@@ -326,6 +333,24 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
sarFileSplitMenuEODao.insertForeach(treeList);
|
sarFileSplitMenuEODao.insertForeach(treeList);
|
||||||
sarFileSplitItemsEODao.insertForeach(messageList);
|
sarFileSplitItemsEODao.insertForeach(messageList);
|
||||||
sarFileSplitItemsValEODao.insertForeach(itemValList);
|
sarFileSplitItemsValEODao.insertForeach(itemValList);
|
||||||
|
|
||||||
|
|
||||||
|
//用来往标准分解单插入数据
|
||||||
|
messageList.forEach(item -> {
|
||||||
|
//new一个对象
|
||||||
|
SarStandItems standItems1 = new SarStandItems();
|
||||||
|
//standItems1里的这个值为messageList里的ItermsConditions
|
||||||
|
standItems1.setId(UUIDUtils.randomUUID20())
|
||||||
|
.setFileType(sarFileSplitInfoEO.getFileType())
|
||||||
|
.setStandId(sarFileSplitInfoEO.getStandId())
|
||||||
|
.setItemsNum(item.getItemsNum())
|
||||||
|
.setItemsName(item.getItemsName())
|
||||||
|
.setTermsConditions(item.getItermsConditions());
|
||||||
|
standList.add(standItems1);
|
||||||
|
});
|
||||||
|
sarFileSplitItemsEODao.insertStandSplitForeach(standList);
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -398,7 +423,7 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (o instanceof CTLevelText){
|
} else if (o instanceof CTLevelText) {
|
||||||
logger.info(((CTLevelText) o).getVal());
|
logger.info(((CTLevelText) o).getVal());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -407,14 +432,14 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 像每个条款中依次插入每一段的内容
|
// 像每个条款中依次插入每一段的内容
|
||||||
private void addItermsConditionsImage(SarFileSplitItemsEO message,List<SarFileSplitItemsValEO> itemsValList,XWPFParagraph p,List<String> imageBundleList) {
|
private void addItermsConditionsImage(SarFileSplitItemsEO message, List<SarFileSplitItemsValEO> itemsValList, XWPFParagraph p, List<String> imageBundleList) {
|
||||||
for (String pictureId : imageBundleList) {
|
for (String pictureId : imageBundleList) {
|
||||||
XWPFPictureData pictureData = p.getDocument().getPictureDataByID(pictureId);
|
XWPFPictureData pictureData = p.getDocument().getPictureDataByID(pictureId);
|
||||||
String imageName = UUIDUtils.randomUUID10() + pictureData.getFileName();
|
String imageName = UUIDUtils.randomUUID10() + pictureData.getFileName();
|
||||||
byte[] bytev = pictureData.getData();
|
byte[] bytev = pictureData.getData();
|
||||||
String outPath = filePath + "/img/";
|
String outPath = filePath + "/img/";
|
||||||
File file1 = new File(outPath);
|
File file1 = new File(outPath);
|
||||||
if(!file1.exists()){
|
if (!file1.exists()) {
|
||||||
file1.mkdirs();
|
file1.mkdirs();
|
||||||
}
|
}
|
||||||
String filepathandname = filePath + "/img/" + imageName;
|
String filepathandname = filePath + "/img/" + imageName;
|
||||||
@@ -425,14 +450,14 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
String imgCon = "<img class=\'wordImg\' src=\'" + path + "\'>";
|
String imgCon = "<img class=\'wordImg\' src=\'" + path + "\'>";
|
||||||
message.getItemsCondi().add(imgCon);
|
message.getItemsCondi().add(imgCon);
|
||||||
message.setItermsConditions(message.getItermsConditions() + imgCon);
|
message.setItermsConditions(message.getItermsConditions() + imgCon);
|
||||||
itemsValList.add(getSplitItemsValObject(message.getId(),SplitFilePragraTypeEnum.IMG.getValue(),imgCon,message.getItemsCondi().size(),null));
|
itemsValList.add(getSplitItemsValObject(message.getId(), SplitFilePragraTypeEnum.IMG.getValue(), imgCon, message.getItemsCondi().size(), null));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private SarFileSplitItemsValEO getSplitItemsValObject (String itemId,String type,String itemContent,int disPlaySql,List<SarFileSplitItemsTableEO> tableList) {
|
private SarFileSplitItemsValEO getSplitItemsValObject(String itemId, String type, String itemContent, int disPlaySql, List<SarFileSplitItemsTableEO> tableList) {
|
||||||
SarFileSplitItemsValEO sarFileSplitItemsValEO = new SarFileSplitItemsValEO();
|
SarFileSplitItemsValEO sarFileSplitItemsValEO = new SarFileSplitItemsValEO();
|
||||||
sarFileSplitItemsValEO.setId(UUIDUtils.randomUUID20());
|
sarFileSplitItemsValEO.setId(UUIDUtils.randomUUID20());
|
||||||
sarFileSplitItemsValEO.setValidFlag(0);
|
sarFileSplitItemsValEO.setValidFlag(0);
|
||||||
@@ -448,9 +473,9 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 像每个条款中依次插入每一段的内容
|
// 像每个条款中依次插入每一段的内容
|
||||||
private void addItermsConditionsText(SarFileSplitItemsEO message,List<SarFileSplitItemsValEO> itemsValList,String p) {
|
private void addItermsConditionsText(SarFileSplitItemsEO message, List<SarFileSplitItemsValEO> itemsValList, String p) {
|
||||||
message.getItemsCondi().add(p);
|
message.getItemsCondi().add(p);
|
||||||
message.setItermsConditions(message.getItermsConditions() + "<p>"+p+ "<p>");
|
message.setItermsConditions(message.getItermsConditions() + "<p>" + p + "<p>");
|
||||||
// 判断message中是否引用到其他标准
|
// 判断message中是否引用到其他标准
|
||||||
// String testString = p;
|
// String testString = p;
|
||||||
// Pattern ptest = Pattern.compile("[A-Z]{1,}/{0,1}[A-Z]{1,}\\s{0,1}[0-9]\\d*\\.?\\d*");
|
// Pattern ptest = Pattern.compile("[A-Z]{1,}/{0,1}[A-Z]{1,}\\s{0,1}[0-9]\\d*\\.?\\d*");
|
||||||
@@ -473,20 +498,20 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
// message.setReferenceStand(matcher.group());
|
// message.setReferenceStand(matcher.group());
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
itemsValList.add(getSplitItemsValObject(message.getId(),SplitFilePragraTypeEnum.TEXT.getValue(),p,message.getItemsCondi().size(),null));
|
itemsValList.add(getSplitItemsValObject(message.getId(), SplitFilePragraTypeEnum.TEXT.getValue(), p, message.getItemsCondi().size(), null));
|
||||||
}
|
}
|
||||||
|
|
||||||
private SarFileSplitMenuEO getTreeList(String name, List<SarFileSplitMenuEO> treeList,String generalCatalogueId,SarFileSplitInfoEO sarFileSplitInfoEO ,Long treeListDisplay,String itemName){
|
private SarFileSplitMenuEO getTreeList(String name, List<SarFileSplitMenuEO> treeList, String generalCatalogueId, SarFileSplitInfoEO sarFileSplitInfoEO, Long treeListDisplay, String itemName) {
|
||||||
SarFileSplitMenuEO documentTreeEO = new SarFileSplitMenuEO(UUIDUtils.randomUUID20(),name,sarFileSplitInfoEO.getId(),treeListDisplay,itemName);
|
SarFileSplitMenuEO documentTreeEO = new SarFileSplitMenuEO(UUIDUtils.randomUUID20(), name, sarFileSplitInfoEO.getId(), treeListDisplay, itemName);
|
||||||
// 用现在得name 和之前得name 做比较,确定,parentId
|
// 用现在得name 和之前得name 做比较,确定,parentId
|
||||||
if (name.indexOf(".")>=0) {
|
if (name.indexOf(".") >= 0) {
|
||||||
for (SarFileSplitMenuEO forDocumentTree : treeList) {
|
for (SarFileSplitMenuEO forDocumentTree : treeList) {
|
||||||
if (name.substring(0, name.lastIndexOf(".")).equals(forDocumentTree.getName())) {
|
if (name.substring(0, name.lastIndexOf(".")).equals(forDocumentTree.getName())) {
|
||||||
documentTreeEO.setPId(forDocumentTree.getId());
|
documentTreeEO.setPId(forDocumentTree.getId());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
documentTreeEO.setPId(generalCatalogueId);
|
documentTreeEO.setPId(generalCatalogueId);
|
||||||
}
|
}
|
||||||
return documentTreeEO;
|
return documentTreeEO;
|
||||||
@@ -494,30 +519,31 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过传递过来的编号,得出下次可能出现的编号
|
* 通过传递过来的编号,得出下次可能出现的编号
|
||||||
|
*
|
||||||
* @param nowStart
|
* @param nowStart
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private List<String> getNewNowStart(String nowStart){
|
private List<String> getNewNowStart(String nowStart) {
|
||||||
List<String> nowStartList = new ArrayList<>();
|
List<String> nowStartList = new ArrayList<>();
|
||||||
List<String> nowResultStartList = new ArrayList<>();
|
List<String> nowResultStartList = new ArrayList<>();
|
||||||
String[] numberStr = nowStart.split("\\.");
|
String[] numberStr = nowStart.split("\\.");
|
||||||
String startnumber = "";
|
String startnumber = "";
|
||||||
for(int i=0;i<numberStr.length;i++) {
|
for (int i = 0; i < numberStr.length; i++) {
|
||||||
if (i==0) {
|
if (i == 0) {
|
||||||
startnumber = "";
|
startnumber = "";
|
||||||
} else if (i==1) {
|
} else if (i == 1) {
|
||||||
startnumber = numberStr[0];
|
startnumber = numberStr[0];
|
||||||
} else {
|
} else {
|
||||||
startnumber = startnumber +"." +numberStr[i-1];
|
startnumber = startnumber + "." + numberStr[i - 1];
|
||||||
}
|
}
|
||||||
Integer lastnumber = Integer.valueOf(numberStr[i])+1;
|
Integer lastnumber = Integer.valueOf(numberStr[i]) + 1;
|
||||||
nowResultStartList.add((startnumber.equals("")?"":(startnumber+".")) + lastnumber);
|
nowResultStartList.add((startnumber.equals("") ? "" : (startnumber + ".")) + lastnumber);
|
||||||
}
|
}
|
||||||
nowResultStartList.add(nowStart+".1");
|
nowResultStartList.add(nowStart + ".1");
|
||||||
return nowResultStartList;
|
return nowResultStartList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addItermsConditionsOfTable(SarFileSplitItemsEO message,List<SarFileSplitItemsValEO> itemsValList,XWPFTable table) throws IOException {
|
private void addItermsConditionsOfTable(SarFileSplitItemsEO message, List<SarFileSplitItemsValEO> itemsValList, XWPFTable table) throws IOException {
|
||||||
StringBuilder tabaleStringNew = new StringBuilder("");
|
StringBuilder tabaleStringNew = new StringBuilder("");
|
||||||
//将表格转为html字符串
|
//将表格转为html字符串
|
||||||
ReadWordTable readWordTable = new ReadWordTable();
|
ReadWordTable readWordTable = new ReadWordTable();
|
||||||
@@ -525,21 +551,21 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
tabaleStringNew.append(tableStr);
|
tabaleStringNew.append(tableStr);
|
||||||
message.getItemsCondi().add(table.getText());
|
message.getItemsCondi().add(table.getText());
|
||||||
message.setItermsConditions(message.getItermsConditions() + tabaleStringNew);
|
message.setItermsConditions(message.getItermsConditions() + tabaleStringNew);
|
||||||
itemsValList.add(getSplitItemsValObject(message.getId(),SplitFilePragraTypeEnum.TABLE.getValue(),tabaleStringNew.toString(),message.getItemsCondi().size(),null));
|
itemsValList.add(getSplitItemsValObject(message.getId(), SplitFilePragraTypeEnum.TABLE.getValue(), tabaleStringNew.toString(), message.getItemsCondi().size(), null));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SarFileSplitInfoEO> queryByPageOwn(SarFileSplitInfoEOPage page){
|
public List<SarFileSplitInfoEO> queryByPageOwn(SarFileSplitInfoEOPage page) {
|
||||||
int rowCount = sarFileSplitInfoEODao.queryByCountOwn(page);
|
int rowCount = sarFileSplitInfoEODao.queryByCountOwn(page);
|
||||||
page.getPager().setRowCount(rowCount);
|
page.getPager().setRowCount(rowCount);
|
||||||
List<SarFileSplitInfoEO> rows = sarFileSplitInfoEODao.queryByPageOwn(page);
|
List<SarFileSplitInfoEO> rows = sarFileSplitInfoEODao.queryByPageOwn(page);
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
map.put("CA","草稿");
|
map.put("CA", "草稿");
|
||||||
map.put("ZQYJG","征求意见稿");
|
map.put("ZQYJG", "征求意见稿");
|
||||||
map.put("BPG","报批稿");
|
map.put("BPG", "报批稿");
|
||||||
map.put("SSG","送审稿");
|
map.put("SSG", "送审稿");
|
||||||
map.put("FBGBJBD","发布稿(必读)");
|
map.put("FBGBJBD", "发布稿(必读)");
|
||||||
|
|
||||||
if (rows != null && !rows.isEmpty()) {
|
if (rows != null && !rows.isEmpty()) {
|
||||||
for (SarFileSplitInfoEO infoEO : rows) {
|
for (SarFileSplitInfoEO infoEO : rows) {
|
||||||
@@ -571,7 +597,7 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int deleteByIds(String ids){
|
public int deleteByIds(String ids) {
|
||||||
String[] infoIds = ids.split(",");
|
String[] infoIds = ids.split(",");
|
||||||
// 删除info表数据
|
// 删除info表数据
|
||||||
SarFileSplitInfoEO sarFileSplitInfoEO = new SarFileSplitInfoEO();
|
SarFileSplitInfoEO sarFileSplitInfoEO = new SarFileSplitInfoEO();
|
||||||
|
|||||||
@@ -1,144 +0,0 @@
|
|||||||
package com.adc.da.utils.util;
|
|
||||||
|
|
||||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
|
||||||
import com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetails;
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.apache.poi.ss.usermodel.*;
|
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description: 标准导出工具
|
|
||||||
* @Author: yangxuenan
|
|
||||||
* date: 2020/9/16 14:09
|
|
||||||
*/
|
|
||||||
public class BussStandExportUtil {
|
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(BussStandExportUtil.class);
|
|
||||||
|
|
||||||
|
|
||||||
public static Workbook exportDatas (List<SarBussionessStand> datas) {
|
|
||||||
Workbook workbook = new XSSFWorkbook();
|
|
||||||
try {
|
|
||||||
StringBuilder attrBud = new StringBuilder();
|
|
||||||
List<SarStandAttrDetails> detailsEOList = InitStandAttrUtil.bussAttrFieldList;
|
|
||||||
Map<String,String> attrInfoMap = new HashMap<>();
|
|
||||||
for (SarStandAttrDetails detailsEO : detailsEOList) {
|
|
||||||
if (!InitStandAttrUtil.fileFieldListBuss.contains(detailsEO.getAttrField())) {
|
|
||||||
attrBud.append(detailsEO.getAttrName() + ",");
|
|
||||||
attrInfoMap.put(detailsEO.getAttrName(),detailsEO.getAttrField());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
String header = FieldConvertUtil.exportBaseFieldNamesBuss + "," + attrBud.toString();
|
|
||||||
//创建工作表对象
|
|
||||||
Sheet sheet = workbook.createSheet();
|
|
||||||
// 创建头部
|
|
||||||
createHeader(workbook,sheet,header);
|
|
||||||
// 创建数据
|
|
||||||
createDatas(workbook,sheet,datas,header,attrInfoMap);
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error(e.getMessage(), e);
|
|
||||||
}
|
|
||||||
return workbook;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void createHeader(Workbook workbook,Sheet sheet,String header){
|
|
||||||
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
|
|
||||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
|
||||||
Row rowHeader = sheet.createRow(0);//开始创建标题行
|
|
||||||
if (StringUtils.isNotBlank(header)) {
|
|
||||||
String[] headerArr = header.split(",");
|
|
||||||
for (int i=0;i < headerArr.length; i++) {
|
|
||||||
rowHeader.createCell(i).setCellValue(headerArr[i]);
|
|
||||||
// rowHeader.createCell(i).setCellStyle(cellStyle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void createDatas(Workbook workbook,Sheet sheet,List<SarBussionessStand> datas,
|
|
||||||
String header,Map<String,String> attrInfoMap) throws Exception{
|
|
||||||
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
|
|
||||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
|
||||||
if (datas != null && !datas.isEmpty()) {
|
|
||||||
for (int i=0;i < datas.size(); i++) {
|
|
||||||
SarBussionessStand sarStandardsInfoEO = datas.get(i);
|
|
||||||
Row row = sheet.createRow(i+1);
|
|
||||||
String[] headerArr = header.split(",");
|
|
||||||
int sheetNum = 0;
|
|
||||||
for (String headerName : headerArr) {
|
|
||||||
String value = getValueByName(headerName,sarStandardsInfoEO,attrInfoMap);
|
|
||||||
if (StringUtils.isBlank(value) || "null".equals(value)) {
|
|
||||||
value = "";
|
|
||||||
}
|
|
||||||
row.createCell(sheetNum).setCellValue(value);
|
|
||||||
sheetNum++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据表头返回相应值
|
|
||||||
public static String getValueByName (String name,SarBussionessStand sarStandardsInfoEO,Map<String,String> attrInfoMap) throws Exception{
|
|
||||||
String value = "";
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||||
Map<String,Object> attrValueMap = sarStandardsInfoEO.getAttrInfoMap();
|
|
||||||
switch (name) {
|
|
||||||
case "企标类别":
|
|
||||||
value = sarStandardsInfoEO.getStandSortShow();
|
|
||||||
break;
|
|
||||||
case "企标编号":
|
|
||||||
value = sarStandardsInfoEO.getStandCode();
|
|
||||||
break;
|
|
||||||
case "中文名称":
|
|
||||||
value = sarStandardsInfoEO.getStandName();
|
|
||||||
break;
|
|
||||||
case "英文名称":
|
|
||||||
value = sarStandardsInfoEO.getStandEnName();
|
|
||||||
break;
|
|
||||||
case "标准状态":
|
|
||||||
value = sarStandardsInfoEO.getStandStatusShow();
|
|
||||||
break;
|
|
||||||
case "标准实施日期":
|
|
||||||
if (sarStandardsInfoEO.getPutTime() != null) {
|
|
||||||
String issueTime = sdf.format(sarStandardsInfoEO.getPutTime());
|
|
||||||
value = issueTime;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "代替企标编号":
|
|
||||||
value = sarStandardsInfoEO.getReplaceStandNum();
|
|
||||||
break;
|
|
||||||
case "被代替企标编号":
|
|
||||||
value = sarStandardsInfoEO.getReplacedStandNum();
|
|
||||||
break;
|
|
||||||
case "发布日期":
|
|
||||||
if (sarStandardsInfoEO.getIssueTime() != null) {
|
|
||||||
String issueTime = sdf.format(sarStandardsInfoEO.getIssueTime());
|
|
||||||
value = issueTime;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "复审日期":
|
|
||||||
String field1 = attrInfoMap.get(name);
|
|
||||||
if (attrValueMap != null) {
|
|
||||||
value = String.valueOf(attrValueMap.get(field1));
|
|
||||||
if (value.length()>10){
|
|
||||||
value = value.substring(0,10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
String field = attrInfoMap.get(name);
|
|
||||||
if (attrValueMap != null) {
|
|
||||||
value = String.valueOf(attrValueMap.get(field));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
-380
@@ -1,385 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.adc.da.slrs.sarBussStandItems.dao.SarBussStandItemsDao">
|
<mapper namespace="com.adc.da.slrs.sarBussStandItems.dao.SarBussStandItemsDao">
|
||||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarBussStandItems.entity.SarBussStandItems" >
|
|
||||||
<id column="id" property="id" />
|
|
||||||
<result column="modify_time" property="modifyTime" />
|
|
||||||
<result column="creation_time" property="creationTime" />
|
|
||||||
<result column="valid_flag" property="validFlag" />
|
|
||||||
<result column="remarks" property="remarks" />
|
|
||||||
<result column="responsible_unit" property="responsibleUnit" />
|
|
||||||
<result column="energy_kind" property="energyKind" />
|
|
||||||
<result column="apply_arctic" property="applyArctic" />
|
|
||||||
<result column="tack_time" property="tackTime" />
|
|
||||||
<result column="parts" property="parts" />
|
|
||||||
<result column="items_name" property="itemsName" />
|
|
||||||
<result column="items_num" property="itemsNum" />
|
|
||||||
<result column="stand_id" property="standId" />
|
|
||||||
<result column="MAINPOINTS_IMPEMENTATION" property="mainPointImplementation"/>
|
|
||||||
<result column="TERMS_CONDITIONS" property="termsConditions"/>
|
|
||||||
<result column="fo" property="fo" />
|
|
||||||
<result column="duty_engineer" property="dutyEngineer" />
|
|
||||||
<result column="svpps" property="svpps" />
|
|
||||||
<result column="claim_type" property="claimType" />
|
|
||||||
<result column="bus_stand_cover" property="busStandCover" />
|
|
||||||
<result column="file_type" property="fileType" />
|
|
||||||
<result column="claimTypeShow" property="claimTypeShow" />
|
|
||||||
<result column="dutyEngineerShow" property="dutyEngineerShow" />
|
|
||||||
<result column="responsibleUnitShow" property="responsibleUnitShow" />
|
|
||||||
<result column="foShow" property="foShow"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<!-- SAR_BUSS_STAND_ITEMS table all fields -->
|
|
||||||
<sql id="Base_Column_List" >
|
|
||||||
SAR_BUSS_STAND_ITEMS.modify_time, SAR_BUSS_STAND_ITEMS.creation_time, SAR_BUSS_STAND_ITEMS.valid_flag, SAR_BUSS_STAND_ITEMS.remarks, responsible_unit, energy_kind, apply_arctic, tack_time, parts, items_name, items_num, SAR_BUSS_STAND_ITEMS.stand_id, SAR_BUSS_STAND_ITEMS.id,SAR_BUSS_STAND_ITEMS.MAINPOINTS_IMPEMENTATION,SAR_BUSS_STAND_ITEMS.TERMS_CONDITIONS,
|
|
||||||
tsFo.UNAME as foShow,SAR_BUSS_STAND_ITEMS.duty_engineer,SAR_BUSS_STAND_ITEMS.svpps,
|
|
||||||
SAR_BUSS_STAND_ITEMS.claim_type,SAR_BUSS_STAND_ITEMS.bus_stand_cover,SAR_BUSS_STAND_ITEMS.file_type,dicClaimType.DIC_TYPE_NAME as claimTypeShow,tsdutyEngineer.UNAME as dutyEngineerShow
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 查询条件 -->
|
|
||||||
<sql id="Base_Where_Clause">
|
|
||||||
left join TS_DICTYPE dicClaimType on (dicClaimType.dic_type_code = SAR_BUSS_STAND_ITEMS.claim_type and dicClaimType.dic_id is
|
|
||||||
not null and dicClaimType.valid_flag = 0)
|
|
||||||
left join TS_USER tsdutyEngineer on (tsdutyEngineer.USID = SAR_BUSS_STAND_ITEMS.duty_engineer and tsdutyEngineer.valid_flag=0
|
|
||||||
and tsdutyEngineer.DISABLE_FLAG=0)
|
|
||||||
left join TS_USER tsFo on (tsFo.USID = SAR_BUSS_STAND_ITEMS.fo and tsFo.valid_flag=0
|
|
||||||
and tsFo.DISABLE_FLAG=0)
|
|
||||||
where 1=1
|
|
||||||
<trim suffixOverrides="," >
|
|
||||||
<if test="modifyTime != null" >
|
|
||||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime1 != null" >
|
|
||||||
and modify_time >= #{modifyTime1}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime2 != null" >
|
|
||||||
and modify_time <= #{modifyTime2}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime != null" >
|
|
||||||
and creation_time ${creationTimeOperator} #{creationTime}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime1 != null" >
|
|
||||||
and creation_time >= #{creationTime1}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime2 != null" >
|
|
||||||
and creation_time <= #{creationTime2}
|
|
||||||
</if>
|
|
||||||
<if test="validFlag != null" >
|
|
||||||
and SAR_BUSS_STAND_ITEMS.valid_flag ${validFlagOperator} #{validFlag}
|
|
||||||
</if>
|
|
||||||
<if test="remarks != null" >
|
|
||||||
and remarks ${remarksOperator} #{remarks}
|
|
||||||
</if>
|
|
||||||
<if test="responsibleUnit != null" >
|
|
||||||
and responsible_unit ${responsibleUnitOperator} #{responsibleUnit}
|
|
||||||
</if>
|
|
||||||
<if test="energyKind != null" >
|
|
||||||
and energy_kind ${energyKindOperator} #{energyKind}
|
|
||||||
</if>
|
|
||||||
<if test="applyArctic != null" >
|
|
||||||
and apply_arctic ${applyArcticOperator} #{applyArctic}
|
|
||||||
</if>
|
|
||||||
<if test="tackTime != null" >
|
|
||||||
and tack_time ${tackTimeOperator} #{tackTime}
|
|
||||||
</if>
|
|
||||||
<if test="tackTime1 != null" >
|
|
||||||
and tack_time >= #{tackTime1}
|
|
||||||
</if>
|
|
||||||
<if test="tackTime2 != null" >
|
|
||||||
and tack_time <= #{tackTime2}
|
|
||||||
</if>
|
|
||||||
<if test="parts != null" >
|
|
||||||
and SAR_BUSS_STAND_ITEMS.parts like concat(concat('%', #{parts}),'%')
|
|
||||||
</if>
|
|
||||||
<if test="nameOrRequest != null" >
|
|
||||||
and (SAR_BUSS_STAND_ITEMS.items_name like concat(concat('%', #{nameOrRequest}),'%') or SAR_BUSS_STAND_ITEMS.TERMS_CONDITIONS like concat(concat('%', #{nameOrRequest}),'%'))
|
|
||||||
</if>
|
|
||||||
<if test="itemsName != null" >
|
|
||||||
and items_name ${itemsNameOperator} #{itemsName}
|
|
||||||
</if>
|
|
||||||
<if test="itemsNum != null" >
|
|
||||||
and items_num ${itemsNumOperator} #{itemsNum}
|
|
||||||
</if>
|
|
||||||
<if test="standId != null" >
|
|
||||||
and SAR_BUSS_STAND_ITEMS.stand_id ${standIdOperator} #{standId}
|
|
||||||
</if>
|
|
||||||
<if test="id != null" >
|
|
||||||
and SAR_BUSS_STAND_ITEMS.id ${idOperator} #{id}
|
|
||||||
</if>
|
|
||||||
<if test="idlist != null">
|
|
||||||
and SAR_BUSS_STAND_ITEMS.id in
|
|
||||||
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="fileType != null" >
|
|
||||||
and SAR_BUSS_STAND_ITEMS.file_type = #{fileType}
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 插入记录 -->
|
|
||||||
<insert id="insert" parameterType="com.adc.da.slrs.sarBussStandItems.entity.SarBussStandItems" >
|
|
||||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
||||||
SELECT SEQ_SAR_BUSS_STAND_ITEMS.NEXTVAL FROM DUAL
|
|
||||||
</selectKey> -->
|
|
||||||
insert into SAR_BUSS_STAND_ITEMS(<include refid="Base_Column_List" />)
|
|
||||||
values (#{modifyTime, jdbcType=TIMESTAMP}, #{creationTime, jdbcType=TIMESTAMP}, #{validFlag, jdbcType=INTEGER}, #{remarks, jdbcType=CLOB}, #{responsibleUnit, jdbcType=VARCHAR}, #{energyKind, jdbcType=VARCHAR}, #{applyArctic, jdbcType=VARCHAR}, #{tackTime, jdbcType=TIMESTAMP}, #{parts, jdbcType=VARCHAR}, #{itemsName, jdbcType=VARCHAR}, #{itemsNum, jdbcType=VARCHAR}, #{standId, jdbcType=VARCHAR}, #{id, jdbcType=VARCHAR})
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<!-- 动态插入记录 主键是序列 -->
|
|
||||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.sarBussStandItems.entity.SarBussStandItems" >
|
|
||||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
||||||
SELECT SEQ_SAR_BUSS_STAND_ITEMS.NEXTVAL FROM DUAL
|
|
||||||
</selectKey> -->
|
|
||||||
insert into SAR_BUSS_STAND_ITEMS
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="modifyTime != null" >modify_time,</if>
|
|
||||||
<if test="creationTime != null" >creation_time,</if>
|
|
||||||
<if test="validFlag != null" >valid_flag,</if>
|
|
||||||
<if test="remarks != null" >remarks,</if>
|
|
||||||
<if test="responsibleUnit != null" >responsible_unit,</if>
|
|
||||||
<if test="energyKind != null" >energy_kind,</if>
|
|
||||||
<if test="applyArctic != null" >apply_arctic,</if>
|
|
||||||
<if test="tackTime != null" >tack_time,</if>
|
|
||||||
<if test="parts != null" >parts,</if>
|
|
||||||
<if test="itemsName != null" >items_name,</if>
|
|
||||||
<if test="itemsNum != null" >items_num,</if>
|
|
||||||
<if test="standId != null" >stand_id,</if>
|
|
||||||
<if test="id != null" >id,</if>
|
|
||||||
<if test="mainPointImplementation != null">MAINPOINTS_IMPEMENTATION,</if>
|
|
||||||
<if test="termsConditions != null">TERMS_CONDITIONS,</if>
|
|
||||||
|
|
||||||
<if test="fo != null" >fo,</if>
|
|
||||||
<if test="dutyEngineer != null" >duty_engineer,</if>
|
|
||||||
<if test="svpps != null" >svpps,</if>
|
|
||||||
<if test="claimType != null" >claim_type,</if>
|
|
||||||
<if test="busStandCover != null">bus_stand_cover,</if>
|
|
||||||
<if test="fileType != null">file_type</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
|
||||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
|
||||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
|
||||||
<if test="remarks != null" >#{remarks, jdbcType=CLOB},</if>
|
|
||||||
<if test="responsibleUnit != null" >#{responsibleUnit, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="energyKind != null" >#{energyKind, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="applyArctic != null" >#{applyArctic, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="tackTime != null" >#{tackTime, jdbcType=TIMESTAMP},</if>
|
|
||||||
<if test="parts != null" >#{parts, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="itemsName != null" >#{itemsName, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="itemsNum != null" >#{itemsNum, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="standId != null" >#{standId, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="mainPointImplementation != null">#{mainPointImplementation, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="termsConditions != null">#{termsConditions, jdbcType=VARCHAR},</if>
|
|
||||||
|
|
||||||
<if test="fo != null" >#{fo, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="dutyEngineer != null" >#{dutyEngineer, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="svpps != null" >#{svpps, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="claimType != null" >#{claimType, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="busStandCover != null" >#{busStandCover, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="fileType != null" >#{fileType, jdbcType=VARCHAR}</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<!-- 根据pk,修改记录-->
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.sarBussStandItems.entity.SarBussStandItems" >
|
|
||||||
update SAR_BUSS_STAND_ITEMS
|
|
||||||
set modify_time = #{modifyTime},
|
|
||||||
creation_time = #{creationTime},
|
|
||||||
valid_flag = #{validFlag},
|
|
||||||
remarks = #{remarks},
|
|
||||||
responsible_unit = #{responsibleUnit},
|
|
||||||
energy_kind = #{energyKind},
|
|
||||||
apply_arctic = #{applyArctic},
|
|
||||||
tack_time = #{tackTime},
|
|
||||||
parts = #{parts},
|
|
||||||
items_name = #{itemsName},
|
|
||||||
items_num = #{itemsNum},
|
|
||||||
stand_id = #{standId}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 修改记录,只修改只不为空的字段 -->
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.sarBussStandItems.page.SarBussStandItemsEOPage" >
|
|
||||||
update SAR_BUSS_STAND_ITEMS
|
|
||||||
<set >
|
|
||||||
<if test="modifyTime != null" >
|
|
||||||
modify_time = #{modifyTime},
|
|
||||||
</if>
|
|
||||||
<if test="creationTime != null" >
|
|
||||||
creation_time = #{creationTime},
|
|
||||||
</if>
|
|
||||||
<if test="validFlag != null" >
|
|
||||||
valid_flag = #{validFlag},
|
|
||||||
</if>
|
|
||||||
<if test="remarks != null" >
|
|
||||||
remarks = #{remarks},
|
|
||||||
</if>
|
|
||||||
<if test="responsibleUnit != null" >
|
|
||||||
responsible_unit = #{responsibleUnit},
|
|
||||||
</if>
|
|
||||||
<if test="energyKind != null" >
|
|
||||||
energy_kind = #{energyKind},
|
|
||||||
</if>
|
|
||||||
<if test="applyArctic != null" >
|
|
||||||
apply_arctic = #{applyArctic},
|
|
||||||
</if>
|
|
||||||
<if test="tackTime != null" >
|
|
||||||
tack_time = #{tackTime},
|
|
||||||
</if>
|
|
||||||
<if test="tackTime == null">
|
|
||||||
tack_time = null,
|
|
||||||
</if>
|
|
||||||
<if test="parts != null" >
|
|
||||||
parts = #{parts},
|
|
||||||
</if>
|
|
||||||
<if test="itemsName != null" >
|
|
||||||
items_name = #{itemsName},
|
|
||||||
</if>
|
|
||||||
<if test="itemsNum != null" >
|
|
||||||
items_num = #{itemsNum},
|
|
||||||
</if>
|
|
||||||
<if test="standId != null" >
|
|
||||||
stand_id = #{standId},
|
|
||||||
</if>
|
|
||||||
<if test="mainPointImplementation != null">
|
|
||||||
MAINPOINTS_IMPEMENTATION = #{mainPointImplementation},
|
|
||||||
</if>
|
|
||||||
<if test="termsConditions != null">
|
|
||||||
TERMS_CONDITIONS = #{termsConditions},
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="fo != null" >
|
|
||||||
fo = #{fo},
|
|
||||||
</if>
|
|
||||||
<if test="dutyEngineer != null" >
|
|
||||||
duty_engineer = #{dutyEngineer},
|
|
||||||
</if>
|
|
||||||
<if test="svpps != null" >
|
|
||||||
svpps = #{svpps},
|
|
||||||
</if>
|
|
||||||
<if test="claimType != null" >
|
|
||||||
claim_type = #{claimType},
|
|
||||||
</if>
|
|
||||||
<if test="busStandCover != null" >
|
|
||||||
bus_stand_cover = #{busStandCover},
|
|
||||||
</if>
|
|
||||||
<if test="fileType != null" >
|
|
||||||
file_type = #{fileType},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 根据id查询 SAR_BUSS_STAND_ITEMS -->
|
|
||||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
||||||
select <include refid="Base_Column_List" />
|
|
||||||
from SAR_BUSS_STAND_ITEMS
|
|
||||||
where id = #{value}
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 删除记录 -->
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
||||||
delete from SAR_BUSS_STAND_ITEMS
|
|
||||||
where id = #{value}
|
|
||||||
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<!-- SAR_BUSS_STAND_ITEMS 列表总数-->
|
|
||||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
|
||||||
select count(1) from SAR_BUSS_STAND_ITEMS
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询SAR_BUSS_STAND_ITEMS列表 -->
|
|
||||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
|
||||||
select * from
|
|
||||||
(select tmp_tb.* from
|
|
||||||
(select <include refid="Base_Column_List" /> from SAR_BUSS_STAND_ITEMS
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
|
||||||
${pager.orderCondition}
|
|
||||||
</if>
|
|
||||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
|
||||||
select SAR_BUSS_STAND_ITEMS.*,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
group_concat(TS_DICTYPE.DIC_TYPE_NAME ORDER BY SAR_BUSS_STAND_ITEM_VAL.property_type separator ',')
|
|
||||||
FROM
|
|
||||||
SAR_BUSS_STAND_ITEM_VAL left join TS_DICTYPE on (TS_DICTYPE.dic_type_code = SAR_BUSS_STAND_ITEM_VAL.property_value and TS_DICTYPE.dic_id is not null)
|
|
||||||
WHERE
|
|
||||||
SAR_BUSS_STAND_ITEM_VAL.ITEM_ID = SAR_BUSS_STAND_ITEMS.id
|
|
||||||
AND SAR_BUSS_STAND_ITEM_VAL.property_type = 'APPLY_ARCTIC'
|
|
||||||
) AS applyArcticShow,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
group_concat(TS_DICTYPE.DIC_TYPE_NAME ORDER BY SAR_BUSS_STAND_ITEM_VAL.property_type separator ',')
|
|
||||||
FROM
|
|
||||||
SAR_BUSS_STAND_ITEM_VAL left join TS_DICTYPE on (TS_DICTYPE.dic_type_code = SAR_BUSS_STAND_ITEM_VAL.property_value and TS_DICTYPE.dic_id is not null)
|
|
||||||
WHERE
|
|
||||||
SAR_BUSS_STAND_ITEM_VAL.ITEM_ID = SAR_BUSS_STAND_ITEMS.id
|
|
||||||
AND SAR_BUSS_STAND_ITEM_VAL.property_type = 'ENERGY_KIND'
|
|
||||||
) AS energyKindShow,
|
|
||||||
TS_ORG.ORG_NAME as responsibleUnitShow
|
|
||||||
from SAR_BUSS_STAND_ITEMS left join TS_ORG on SAR_BUSS_STAND_ITEMS.RESPONSIBLE_UNIT = TS_ORG.ID
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
|
||||||
${pager.orderCondition}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="querySarBussStandItemsList" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarBussStandItems.page.SarBussStandItemsEOPage">
|
|
||||||
select * from
|
|
||||||
(select tmp_tb.* from
|
|
||||||
(
|
|
||||||
select <include refid="Base_Column_List"/>,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
group_concat(TS_DICTYPE.DIC_TYPE_NAME ORDER BY SAR_BUSS_STAND_ITEM_VAL.property_type separator ',')
|
|
||||||
FROM
|
|
||||||
SAR_BUSS_STAND_ITEM_VAL left join TS_DICTYPE on (TS_DICTYPE.dic_type_code = SAR_BUSS_STAND_ITEM_VAL.property_value and TS_DICTYPE.dic_id is not null)
|
|
||||||
WHERE
|
|
||||||
SAR_BUSS_STAND_ITEM_VAL.ITEM_ID = SAR_BUSS_STAND_ITEMS.id
|
|
||||||
AND SAR_BUSS_STAND_ITEM_VAL.property_type = 'APPLY_ARCTIC'
|
|
||||||
) AS applyArcticShow,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
group_concat(TS_DICTYPE.DIC_TYPE_NAME ORDER BY SAR_BUSS_STAND_ITEM_VAL.property_type separator ',')
|
|
||||||
FROM
|
|
||||||
SAR_BUSS_STAND_ITEM_VAL left join TS_DICTYPE on (TS_DICTYPE.dic_type_code = SAR_BUSS_STAND_ITEM_VAL.property_value and TS_DICTYPE.dic_id is not null)
|
|
||||||
WHERE
|
|
||||||
SAR_BUSS_STAND_ITEM_VAL.ITEM_ID = SAR_BUSS_STAND_ITEMS.id
|
|
||||||
AND SAR_BUSS_STAND_ITEM_VAL.property_type = 'ENERGY_KIND'
|
|
||||||
) AS energyKindShow,
|
|
||||||
TS_ORG.ORG_NAME as responsibleUnitShow
|
|
||||||
from SAR_BUSS_STAND_ITEMS left join TS_ORG on SAR_BUSS_STAND_ITEMS.RESPONSIBLE_UNIT = TS_ORG.id
|
|
||||||
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
ORDER BY SAR_BUSS_STAND_ITEMS,modify_time,SAR_BUSS_STAND_ITEMS.id
|
|
||||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
|
||||||
</select>
|
|
||||||
<select id="querySarBussStandItemsListCount" resultType="java.lang.Integer" parameterType="com.adc.da.slrs.sarBussStandItems.page.SarBussStandItemsEOPage">
|
|
||||||
select count(1) from SAR_BUSS_STAND_ITEMS left join TS_ORG on SAR_BUSS_STAND_ITEMS.RESPONSIBLE_UNIT = TS_ORG.id
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectItemByItemNum" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarBussStandItems.page.SarBussStandItemsEOPage">
|
|
||||||
select *
|
|
||||||
from SAR_BUSS_STAND_ITEMS
|
|
||||||
where valid_flag = '0' and items_num = #{itemsNum} and stand_id = #{standId} and file_type = #{fileType}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<delete id="deleteByStandIdAndFileType" parameterType="java.lang.String">
|
|
||||||
delete from SAR_BUSS_STAND_ITEMS
|
|
||||||
where stand_id = #{standId}
|
|
||||||
<if test="fileType != null">
|
|
||||||
and file_type = #{fileType}
|
|
||||||
</if>
|
|
||||||
</delete>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaAllDao">
|
<mapper namespace="com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaAllDao">
|
||||||
|
|
||||||
|
<select id="getPublicIdea" resultType="com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll">
|
||||||
|
SELECT sar_public_idea_all.* FROM sar_public_idea
|
||||||
|
INNER JOIN sar_public_idea_all on sar_public_idea_all.idea_id = sar_public_idea.id
|
||||||
|
WHERE sar_public_idea_all.idea_id IS NOT NULL and sar_public_idea.uniques = #{unique}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
+1
-1
@@ -249,6 +249,6 @@
|
|||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
<select id="getAllStands" resultType="java.lang.String">
|
<select id="getAllStands" resultType="java.lang.String">
|
||||||
SELECT DISTINCT STAND_ID FROM sar_stand_items
|
SELECT DISTINCT ID FROM sar_standards_info
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?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.adc.da.scheduled.dao.SarStandardInfoDao">
|
||||||
|
|
||||||
|
<!-- Result Map-->
|
||||||
|
<resultMap id="resultMap" type="com.adc.da.scheduled.entity.WarningEO" >
|
||||||
|
<id column="ID" property="id" />
|
||||||
|
<result column="STAND_NUMBER" property="standCode" />
|
||||||
|
<result column="STAND_NAME" property="standName" />
|
||||||
|
<result column="XCXSSRQ" property="XCXSSRQ"/>
|
||||||
|
<result column="ZCCSSRQ" property="ZCCSSRQ"/>
|
||||||
|
<result column="CLLX" property="applyType" />
|
||||||
|
<result column="STAND_TYPE" property="standType" />
|
||||||
|
<result column="ZRGCS" property="dutyEngineer" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 查询条件 -->
|
||||||
|
<select id="select" resultMap="resultMap" parameterType="com.adc.da.scheduled.entity.DataDTO">
|
||||||
|
SELECT
|
||||||
|
info.ID,
|
||||||
|
info.STAND_NUMBER,
|
||||||
|
info.STAND_NAME,
|
||||||
|
info.STAND_TYPE,
|
||||||
|
attrInfo.CLLX,
|
||||||
|
attrInfo.ZRGCS,
|
||||||
|
attrInfo.${str}
|
||||||
|
FROM
|
||||||
|
sar_standards_info AS info
|
||||||
|
JOIN sar_stand_attr_info AS attrInfo ON info.id = attrinfo.stand_id
|
||||||
|
WHERE
|
||||||
|
attrInfo.${str} BETWEEN #{date.startDate} and #{date.endDate}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?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.adc.da.scheduled.dao.SarStandardItemDao">
|
||||||
|
|
||||||
|
<!-- Result Map-->
|
||||||
|
<resultMap id="resultMap" type="com.adc.da.scheduled.entity.WarningEO">
|
||||||
|
<id column="ID" property="id"/>
|
||||||
|
<result column="STAND_NUMBER" property="standCode"/>
|
||||||
|
<result column="STAND_NAME" property="standName"/>
|
||||||
|
<result column="XCXSSRQ" property="XCXSSRQ"/>
|
||||||
|
<result column="ZCCSSRQ" property="ZCCSSRQ"/>
|
||||||
|
<result column="CLLX" property="applyType"/>
|
||||||
|
<result column="STAND_TYPE" property="standType"/>
|
||||||
|
<result column="ZRGCS" property="dutyEngineer"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询条件 -->
|
||||||
|
<select id="select" resultMap="resultMap" parameterType="com.adc.da.scheduled.entity.DataDTO">
|
||||||
|
SELECT
|
||||||
|
STAND_ID,
|
||||||
|
ITEMS_NUM,
|
||||||
|
TERMS_CONDITIONS,
|
||||||
|
DUTY_ENGINEER,
|
||||||
|
APPLY_ARCTIC,
|
||||||
|
info.STAND_TYPE,
|
||||||
|
|
||||||
|
${str}
|
||||||
|
FROM
|
||||||
|
sar_stand_items AS items
|
||||||
|
JOIN sar_standards_info AS info ON items.STAND_ID=info.ID
|
||||||
|
|
||||||
|
WHERE
|
||||||
|
${str} BETWEEN #{date.startDate} and #{date.endDate}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
<?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.adc.da.scheduled.dao.SarStandardWarningDao">
|
||||||
|
|
||||||
|
<insert id="ignoreInsert" parameterType="java.util.LinkedList">
|
||||||
|
|
||||||
|
INSERT IGNORE INTO sar_stand_warning (ID, STAND_TYPE, STAND_CODE,STAND_NAME,PUT_TIME,APPLY_TYPE,DUTY_ENGINEER,ITEMS_ID,ITEMS_NAME,POLICY_ID,POLICY_NAME,MARK,POWER)
|
||||||
|
VALUES
|
||||||
|
<if test="warningEOS !=null and warningEOS.size()!=0">
|
||||||
|
<foreach collection="warningEOS" item="item" index="index" separator=",">
|
||||||
|
(
|
||||||
|
#{item.id}
|
||||||
|
,#{item.standType}
|
||||||
|
,#{item.standCode}
|
||||||
|
,#{item.standName}
|
||||||
|
,#{item.putTime}
|
||||||
|
,#{item.applyType}
|
||||||
|
,#{item.dutyEngineer}
|
||||||
|
,#{item.itemsId}
|
||||||
|
,#{item.itemsName}
|
||||||
|
,#{item.policyId}
|
||||||
|
,#{item.policyName}
|
||||||
|
,#{item.mark}
|
||||||
|
,#{item.power}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
+14
@@ -471,6 +471,20 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<!-- 用来往标准分解单插入数据 -->
|
||||||
|
<insert id="insertStandSplitForeach" parameterType="java.util.List">
|
||||||
|
insert into SAR_STAND_ITEMS
|
||||||
|
(id, STAND_ID, items_num, items_name, TERMS_CONDITIONS,FILE_TYPE)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" index="index" separator=",">
|
||||||
|
(
|
||||||
|
#{item.id, jdbcType=VARCHAR}, #{item.standId, jdbcType=VARCHAR}, #{item.itemsNum, jdbcType=VARCHAR},
|
||||||
|
#{item.itemsName, jdbcType=VARCHAR}, #{item.termsConditions, jdbcType=CLOB},
|
||||||
|
#{item.fileType, jdbcType=VARCHAR}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
<delete id="deleteByIds" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO">
|
<delete id="deleteByIds" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO">
|
||||||
delete from SAR_FILE_SPLIT_ITEMS
|
delete from SAR_FILE_SPLIT_ITEMS
|
||||||
where info_id in
|
where info_id in
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import com.adc.da.person.entity.TsPersonCollect;
|
|||||||
import com.adc.da.person.page.PersonCollectEOPage;
|
import com.adc.da.person.page.PersonCollectEOPage;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -17,7 +16,6 @@ import java.util.List;
|
|||||||
* <b>日期:</b> 2018-09-03 <br>
|
* <b>日期:</b> 2018-09-03 <br>
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||||
*/
|
*/
|
||||||
@Repository
|
|
||||||
public interface PersonCollectEODao extends BaseMapper<TsPersonCollect> {
|
public interface PersonCollectEODao extends BaseMapper<TsPersonCollect> {
|
||||||
|
|
||||||
public List<TsPersonCollect> queryByList(BasePage page);
|
public List<TsPersonCollect> queryByList(BasePage page);
|
||||||
|
|||||||
Reference in New Issue
Block a user