fix(自定义对比): 78391
This commit is contained in:
+5
@@ -180,6 +180,7 @@ public class LawsCustomCompareInfoController {
|
|||||||
@RequiresPermissions("customComparison:edit")
|
@RequiresPermissions("customComparison:edit")
|
||||||
public Result<IPage<StandardVO>> saveCell(@RequestBody LawsCustomCompareCell lawsCustomCompareCell) {
|
public Result<IPage<StandardVO>> saveCell(@RequestBody LawsCustomCompareCell lawsCustomCompareCell) {
|
||||||
lawsCustomCompareCellService.saveOrUpdate(lawsCustomCompareCell);
|
lawsCustomCompareCellService.saveOrUpdate(lawsCustomCompareCell);
|
||||||
|
lawsCustomCompareInfoService.editCompareCreateTime(lawsCustomCompareCell.getInfoId());
|
||||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -193,6 +194,7 @@ public class LawsCustomCompareInfoController {
|
|||||||
@RequiresPermissions("customComparison:edit")
|
@RequiresPermissions("customComparison:edit")
|
||||||
public Result<IPage<StandardVO>> saveCellCompareResult(@RequestBody LawsCustomCompareInventory lawsCustomCompareCell) {
|
public Result<IPage<StandardVO>> saveCellCompareResult(@RequestBody LawsCustomCompareInventory lawsCustomCompareCell) {
|
||||||
lawsCustomCompareInventoryService.saveOrUpdate(lawsCustomCompareCell);
|
lawsCustomCompareInventoryService.saveOrUpdate(lawsCustomCompareCell);
|
||||||
|
lawsCustomCompareInfoService.editCompareCreateTime(lawsCustomCompareCell.getInfoId());
|
||||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,6 +221,7 @@ public class LawsCustomCompareInfoController {
|
|||||||
@RequiresPermissions("customComparison:edit")
|
@RequiresPermissions("customComparison:edit")
|
||||||
public Result<T> save(@RequestBody LawsCustomCompareInfo lawsCustomCompareInfo) {
|
public Result<T> save(@RequestBody LawsCustomCompareInfo lawsCustomCompareInfo) {
|
||||||
lawsCustomCompareInfoService.saveOrUpdate(lawsCustomCompareInfo);
|
lawsCustomCompareInfoService.saveOrUpdate(lawsCustomCompareInfo);
|
||||||
|
lawsCustomCompareInfoService.editCompareCreateTime(lawsCustomCompareInfo.getId());
|
||||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,6 +236,7 @@ public class LawsCustomCompareInfoController {
|
|||||||
public Result<T> delById(@RequestBody Map<String, Object> map) {
|
public Result<T> delById(@RequestBody Map<String, Object> map) {
|
||||||
if (map.containsKey("id")){
|
if (map.containsKey("id")){
|
||||||
lawsCustomCompareInfoService.delById((String) map.get("id"));
|
lawsCustomCompareInfoService.delById((String) map.get("id"));
|
||||||
|
lawsCustomCompareInfoService.editCompareCreateTime((String) map.get("id"));
|
||||||
}
|
}
|
||||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||||
}
|
}
|
||||||
@@ -248,6 +252,7 @@ public class LawsCustomCompareInfoController {
|
|||||||
public Result<T> delInventoryById(@RequestBody Map<String, Object> map) {
|
public Result<T> delInventoryById(@RequestBody Map<String, Object> map) {
|
||||||
if (map.containsKey("id")){
|
if (map.containsKey("id")){
|
||||||
lawsCustomCompareInventoryService.removeById((String) map.get("id"));
|
lawsCustomCompareInventoryService.removeById((String) map.get("id"));
|
||||||
|
lawsCustomCompareInfoService.editCompareCreateTime((String) map.get("id"));
|
||||||
}
|
}
|
||||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -107,5 +107,11 @@ public interface ILawsCustomCompareInfoService extends IService<LawsCustomCompar
|
|||||||
* @param map
|
* @param map
|
||||||
*/
|
*/
|
||||||
void editInventory(Map<String, Object> map);
|
void editInventory(Map<String, Object> map);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义对比-更新对比时间
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
void editCompareCreateTime(String id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-2
@@ -247,6 +247,7 @@ public class LawsCustomCompareInfoServiceImpl extends ServiceImpl<LawsCustomComp
|
|||||||
.eq(LawsCustomCompareCell::getInfoId, lawsCustomCompareInfo.getId())
|
.eq(LawsCustomCompareCell::getInfoId, lawsCustomCompareInfo.getId())
|
||||||
.notIn(LawsCustomCompareCell::getStandardId, standardIdList));
|
.notIn(LawsCustomCompareCell::getStandardId, standardIdList));
|
||||||
}
|
}
|
||||||
|
editCompareCreateTime(lawsCustomCompareInfo.getId());
|
||||||
return lawsCustomCompareInfo.getId();
|
return lawsCustomCompareInfo.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -344,6 +345,7 @@ public class LawsCustomCompareInfoServiceImpl extends ServiceImpl<LawsCustomComp
|
|||||||
new LambdaQueryWrapper<LawsCustomCompareInfoStandard>()
|
new LambdaQueryWrapper<LawsCustomCompareInfoStandard>()
|
||||||
.eq(LawsCustomCompareInfoStandard::getInfoId, infoId)
|
.eq(LawsCustomCompareInfoStandard::getInfoId, infoId)
|
||||||
.eq(LawsCustomCompareInfoStandard::getStandardId, standardId));
|
.eq(LawsCustomCompareInfoStandard::getStandardId, standardId));
|
||||||
|
editCompareCreateTime(standardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -434,6 +436,14 @@ public class LawsCustomCompareInfoServiceImpl extends ServiceImpl<LawsCustomComp
|
|||||||
.or().eq(LawsCustomCompareCell::getCompareItemId, idList)));
|
.or().eq(LawsCustomCompareCell::getCompareItemId, idList)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
editCompareCreateTime(infoId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editCompareCreateTime(String id) {
|
||||||
|
update(new LambdaUpdateWrapper<LawsCustomCompareInfo>()
|
||||||
|
.eq(LawsCustomCompareInfo::getId, id)
|
||||||
|
.set(LawsCustomCompareInfo::getCreateTime, new Date()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createTableCellContent(XSSFSheet sheet, List<StandardVO> standardVOS, List<LawsCustomCompareInventory> featureList, List<LawsCustomCompareInventory> compareList, List<LawsCustomCompareCell> list, CellStyle cellStyle) {
|
private void createTableCellContent(XSSFSheet sheet, List<StandardVO> standardVOS, List<LawsCustomCompareInventory> featureList, List<LawsCustomCompareInventory> compareList, List<LawsCustomCompareCell> list, CellStyle cellStyle) {
|
||||||
@@ -496,14 +506,16 @@ public class LawsCustomCompareInfoServiceImpl extends ServiceImpl<LawsCustomComp
|
|||||||
|
|
||||||
private void writeFile(LawsCustomCompareCell v) {
|
private void writeFile(LawsCustomCompareCell v) {
|
||||||
if (StringUtils.isNotBlank(v.getFileId())){
|
if (StringUtils.isNotBlank(v.getFileId())){
|
||||||
|
String exportPath = exportExcelTempPath.replace("exportExcelTemp", "清单详情");
|
||||||
OSSFile ossFile = iossFileService.getById(v.getFileId());
|
OSSFile ossFile = iossFileService.getById(v.getFileId());
|
||||||
InputStream download = MinioUtil.download(ossFile.getUrl());
|
InputStream download = MinioUtil.download(ossFile.getUrl());
|
||||||
inputStreamToFile(download, exportExcelTempPath + File.separator + ossFile.getFileName());
|
inputStreamToFile(download, exportPath + File.separator + ossFile.getFileName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void inputStreamToFile (InputStream inputStream, String filePath) {
|
public void inputStreamToFile (InputStream inputStream, String filePath) {
|
||||||
File saveFile = new File(exportExcelTempPath);
|
String replacePath = exportExcelTempPath.replace("exportExcelTemp", "清单详情");
|
||||||
|
File saveFile = new File(replacePath);
|
||||||
// 导出路径 没有则创建
|
// 导出路径 没有则创建
|
||||||
if (!saveFile.exists()) {
|
if (!saveFile.exists()) {
|
||||||
saveFile.mkdirs();
|
saveFile.mkdirs();
|
||||||
|
|||||||
Reference in New Issue
Block a user