Merge remote-tracking branch 'origin/dev_20230216' into dev_20230216
This commit is contained in:
+1
@@ -118,5 +118,6 @@ public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
|||||||
int insertSelective(SarBussionessStand sarBussionessStandEO);
|
int insertSelective(SarBussionessStand sarBussionessStandEO);
|
||||||
|
|
||||||
|
|
||||||
|
void importSarBussionessStand(SarBussionessStand sarBussionessStands);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
@@ -7,8 +7,10 @@ import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
|||||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStandExport;
|
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStandExport;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -54,5 +56,7 @@ public interface ISarBussionessStandService extends IService<SarBussionessStand>
|
|||||||
|
|
||||||
void checkFileByEncrypt();
|
void checkFileByEncrypt();
|
||||||
|
|
||||||
|
ResponseMessage<SarBussionessStand> importSarBussionessStand(List<Map<String, String>> dataList, String filepath)throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+38
@@ -64,6 +64,17 @@ import net.sf.json.JSONObject;
|
|||||||
import org.apache.commons.beanutils.BeanUtils;
|
import org.apache.commons.beanutils.BeanUtils;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.poi.hssf.usermodel.HSSFCell;
|
||||||
|
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||||
|
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
||||||
|
import org.apache.poi.hssf.usermodel.HSSFRow;
|
||||||
|
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||||
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||||
|
import org.apache.poi.ss.usermodel.Cell;
|
||||||
|
import org.apache.poi.ss.usermodel.Row;
|
||||||
|
import org.apache.poi.ss.usermodel.Sheet;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
import org.json.JSONTokener;
|
import org.json.JSONTokener;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -71,9 +82,11 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.sql.Clob;
|
import java.sql.Clob;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -173,6 +186,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
private EncryptFileUtils encryptFileUtils;
|
private EncryptFileUtils encryptFileUtils;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SarBussionessStand getStandInfoByReviseStatus(String reviseStatus,String standSort,String taskId){
|
public SarBussionessStand getStandInfoByReviseStatus(String reviseStatus,String standSort,String taskId){
|
||||||
SarBussionessStand bussionessStand = new SarBussionessStand();
|
SarBussionessStand bussionessStand = new SarBussionessStand();
|
||||||
@@ -1939,5 +1953,29 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
logger.info("================================文件检查完毕==================================================");
|
logger.info("================================文件检查完毕==================================================");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入
|
||||||
|
* @param dataList
|
||||||
|
* @param filepath
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ResponseMessage<SarBussionessStand> importSarBussionessStand(List<Map<String, String>> dataList, String filepath)throws Exception {
|
||||||
|
try {
|
||||||
|
//将导入数据循环新增至相应表
|
||||||
|
List<SarBussionessStand> list = new ArrayList<>();
|
||||||
|
int countSuccess = 0;
|
||||||
|
for (SarBussionessStand sarBussionessStand : list) {
|
||||||
|
sarBussionessStandEODao.importSarBussionessStand(sarBussionessStand);
|
||||||
|
countSuccess++;
|
||||||
|
}
|
||||||
|
String msg = "成功导入" + countSuccess + "条";
|
||||||
|
return Result.success("0", msg, null);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error(e.getMessage(), e);
|
||||||
|
return Result.error("导入失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+17
@@ -298,6 +298,14 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
|||||||
} else if (StringUtils.isBlank(sarStandardsInfoEO.getMenuId()) && "FOREIGN".equals(sarStandardsInfoEO.getStandType())) {
|
} else if (StringUtils.isBlank(sarStandardsInfoEO.getMenuId()) && "FOREIGN".equals(sarStandardsInfoEO.getStandType())) {
|
||||||
sarStandardsInfoEO.setMenuId("22179d54d4e640098e29");
|
sarStandardsInfoEO.setMenuId("22179d54d4e640098e29");
|
||||||
}
|
}
|
||||||
|
//校验编号和名称是否存在
|
||||||
|
QueryWrapper<SarStandardsInfo> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq(null!=sarStandardsInfoEO.getStandNumber(),"STAND_NUMBER",sarStandardsInfoEO.getStandNumber())
|
||||||
|
.eq(null!=sarStandardsInfoEO.getStandName(),"STAND_NAME",sarStandardsInfoEO.getStandName());
|
||||||
|
Integer s1 = sarStandardsInfoEOService.count(queryWrapper);
|
||||||
|
if (s1>0){
|
||||||
|
return Result.error("当前标准编号和中文名称已存在");
|
||||||
|
}
|
||||||
sarStandardsInfoEOService.createSarStandardsInfo(sarStandardsInfoEO);
|
sarStandardsInfoEOService.createSarStandardsInfo(sarStandardsInfoEO);
|
||||||
return Result.success("0", "添加成功", sarStandardsInfoEO);
|
return Result.success("0", "添加成功", sarStandardsInfoEO);
|
||||||
}
|
}
|
||||||
@@ -307,6 +315,14 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
|||||||
//401问题2021-03-31暂时注释掉 liuhuiwen
|
//401问题2021-03-31暂时注释掉 liuhuiwen
|
||||||
// @RequiresPermissions("lawss:sarStandardsInfo:updateSarStandardsInfo")
|
// @RequiresPermissions("lawss:sarStandardsInfo:updateSarStandardsInfo")
|
||||||
public ResponseMessage<SarStandardsInfo> updateSarStandardsInfo(@RequestBody SarStandardsInfo sarStandardsInfoEO) throws Exception {
|
public ResponseMessage<SarStandardsInfo> updateSarStandardsInfo(@RequestBody SarStandardsInfo sarStandardsInfoEO) throws Exception {
|
||||||
|
//校验编号和名称是否存在
|
||||||
|
QueryWrapper<SarStandardsInfo> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq(null!=sarStandardsInfoEO.getStandNumber(),"STAND_NUMBER",sarStandardsInfoEO.getStandNumber())
|
||||||
|
.eq(null!=sarStandardsInfoEO.getStandName(),"STAND_NAME",sarStandardsInfoEO.getStandName());
|
||||||
|
List<SarStandardsInfo> list = sarStandardsInfoEOService.list(queryWrapper);
|
||||||
|
if ((list.size() ==1 && !list.get(0).getId().equals(sarStandardsInfoEO.getId())) || list.size() >1){
|
||||||
|
return Result.error("当前标准编号和中文名称已存在");
|
||||||
|
}
|
||||||
int result = sarStandardsInfoEOService.updateSarStandardsInfo(sarStandardsInfoEO);
|
int result = sarStandardsInfoEOService.updateSarStandardsInfo(sarStandardsInfoEO);
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
return Result.success("", "修改成功", sarStandardsInfoEO);
|
return Result.success("", "修改成功", sarStandardsInfoEO);
|
||||||
@@ -940,4 +956,5 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -18,6 +18,7 @@ import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
|||||||
import com.adc.da.slrs.sarStandFile.service.ISarStandFileService;
|
import com.adc.da.slrs.sarStandFile.service.ISarStandFileService;
|
||||||
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
||||||
import com.adc.da.slrs.sarStandWarning.service.Impl.WarningDateServiceImpl;
|
import com.adc.da.slrs.sarStandWarning.service.Impl.WarningDateServiceImpl;
|
||||||
|
import com.adc.da.slrs.sarStandardsInfo.controller.SarStandardsInfoController;
|
||||||
import com.adc.da.slrs.sarUser.entity.TsUser;
|
import com.adc.da.slrs.sarUser.entity.TsUser;
|
||||||
import com.adc.da.att.service.IAttFileEOService;
|
import com.adc.da.att.service.IAttFileEOService;
|
||||||
import com.adc.da.att.vo.AttFileVo;
|
import com.adc.da.att.vo.AttFileVo;
|
||||||
@@ -259,6 +260,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
@Autowired
|
@Autowired
|
||||||
private EncryptFileUtils encryptFileUtils;
|
private EncryptFileUtils encryptFileUtils;
|
||||||
|
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * 反向操作标准
|
// * 反向操作标准
|
||||||
// */
|
// */
|
||||||
@@ -2373,6 +2375,14 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
List<SarStandardsInfo> list = (List<SarStandardsInfo>) map.get("resultList");
|
List<SarStandardsInfo> list = (List<SarStandardsInfo>) map.get("resultList");
|
||||||
int countSuccess = 0;
|
int countSuccess = 0;
|
||||||
for (SarStandardsInfo sarStandardsInfoEO : list) {
|
for (SarStandardsInfo sarStandardsInfoEO : list) {
|
||||||
|
//校验编号和名称是否存在
|
||||||
|
QueryWrapper<SarStandardsInfo> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq(null!=sarStandardsInfoEO.getStandNumber(),"STAND_NUMBER",sarStandardsInfoEO.getStandNumber())
|
||||||
|
.eq(null!=sarStandardsInfoEO.getStandName(),"STAND_NAME",sarStandardsInfoEO.getStandName());
|
||||||
|
Integer s1 = count(queryWrapper);
|
||||||
|
if (s1>0){
|
||||||
|
return Result.error("当前标准编号和中文名称已存在");
|
||||||
|
}
|
||||||
sarStandardsInfoEO.setStandType(standType);
|
sarStandardsInfoEO.setStandType(standType);
|
||||||
sarStandardsInfoEO.setMenuId(menuId);
|
sarStandardsInfoEO.setMenuId(menuId);
|
||||||
createSarStandardsInfo(sarStandardsInfoEO);
|
createSarStandardsInfo(sarStandardsInfoEO);
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ public class FieldConvertUtil {
|
|||||||
|
|
||||||
public static String exportBaseFieldNamesBuss = "企标编号,中文名称,英文名称,文本状态,发布日期,企标实施日期,企标制修订状态";
|
public static String exportBaseFieldNamesBuss = "企标编号,中文名称,英文名称,文本状态,发布日期,企标实施日期,企标制修订状态";
|
||||||
|
|
||||||
|
public static String exportBaseFieldNamesBussCode = "起草部门,废止日期,代替企标编号,复审日期,起草人,被代替企标编号,采用标准,文件上传人员,采标程度,引用标准,适用车型,能源类型,适用产品线,上传时间,体系类别,备案日期,关联模块-乘用车VPPS编码,关联模块--乘用车vpps中文名称,关联模块--卡车VPPS编码,关联模块--卡车vpps中文名称";
|
||||||
|
|
||||||
public static String exportAttrFieldNamesBuss = "SVPPS,规范性引用文件,废止日期,复审日期,密级,授权,相关部门," +
|
public static String exportAttrFieldNamesBuss = "SVPPS,规范性引用文件,废止日期,复审日期,密级,授权,相关部门," +
|
||||||
"需会签部门,起草部门,主要起草人,起草分标委,企标文本,过程文本";
|
"需会签部门,起草部门,主要起草人,起草分标委,企标文本,过程文本";
|
||||||
|
|
||||||
|
|||||||
+49
@@ -1176,4 +1176,53 @@
|
|||||||
select usid from SAR_BUSSIONESS_PERSON where QBID=#{qbid}
|
select usid from SAR_BUSSIONESS_PERSON where QBID=#{qbid}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<insert id="importSarBussionessStand" parameterType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand">
|
||||||
|
insert into SAR_BUSSIONESS_STAND
|
||||||
|
<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="standStatus != null" >stand_status,</if>
|
||||||
|
<if test="replacedStandNum != null" >replaced_stand_num,</if>
|
||||||
|
<if test="replaceStandNum != null" >replace_stand_num,</if>
|
||||||
|
<if test="putTime != null" >put_time,</if>
|
||||||
|
<if test="issueTime != null" >issue_time,</if>
|
||||||
|
<if test="standEnName != null" >stand_en_name,</if>
|
||||||
|
<if test="standName != null" >stand_name,</if>
|
||||||
|
<if test="standCode != null" >stand_code,</if>
|
||||||
|
<if test="id != null" >id,</if>
|
||||||
|
<!--数据库新增字段-->
|
||||||
|
<if test="applyCountry != null" >apply_country,</if>
|
||||||
|
<if test="standNature != null" >stand_Nature,</if>
|
||||||
|
<if test="standSort != null" >stand_sort,</if>
|
||||||
|
<if test="standYear != null" >stand_year,</if>
|
||||||
|
<if test="standNumber != null" >stand_number,</if>
|
||||||
|
<if test="reviseStatus != null" >REVISE_STATUS,</if>
|
||||||
|
<if test="revisionStatus != null" >REVISION_STATUS,</if>
|
||||||
|
<if test="standSn != null" >STAND_SN,</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="standStatus != null" >#{standStatus, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="replacedStandNum != null" >#{replacedStandNum, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="replaceStandNum != null" >#{replaceStandNum, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="putTime != null" >#{putTime, jdbcType=TIMESTAMP},</if>
|
||||||
|
<if test="issueTime != null" >#{issueTime, jdbcType=TIMESTAMP},</if>
|
||||||
|
<if test="standEnName != null" >#{standEnName, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="standName != null" >#{standName, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="standCode != null" >#{standCode, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||||
|
<!--数据库新增字段-->
|
||||||
|
<if test="applyCountry != null" >#{applyCountry, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="standNature != null" >#{standNature, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="standSort != null" >#{standSort, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="standYear != null" >#{standYear, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="standNumber != null" >#{standNumber, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="reviseStatus != null" >#{reviseStatus, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="revisionStatus != null" >#{revisionStatus, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="standSn != null" >#{standSn, jdbcType=VARCHAR},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user