Commit 010835bf by jiang'yun

修改问题

parent dc05e871
...@@ -242,7 +242,7 @@ public class SysUserController extends BaseController ...@@ -242,7 +242,7 @@ public class SysUserController extends BaseController
/** /**
* 获取部门树列表 * 获取部门树列表
*/ */
@PreAuthorize("@ss.hasPermi('system:user:list')") // @PreAuthorize("@ss.hasPermi('system:user:list')")
@GetMapping("/deptTree") @GetMapping("/deptTree")
public AjaxResult deptTree(SysDept dept) public AjaxResult deptTree(SysDept dept)
{ {
......
...@@ -40,7 +40,7 @@ public class SjZdbfFjxbzController extends BaseController ...@@ -40,7 +40,7 @@ public class SjZdbfFjxbzController extends BaseController
/** /**
* 查询指导帮扶-否决项标准列表 * 查询指导帮扶-否决项标准列表
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:list')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SjZdbfFjxbz sjZdbfFjxbz) public TableDataInfo list(SjZdbfFjxbz sjZdbfFjxbz)
{ {
...@@ -51,7 +51,7 @@ public class SjZdbfFjxbzController extends BaseController ...@@ -51,7 +51,7 @@ public class SjZdbfFjxbzController extends BaseController
/** /**
* 查询指导帮扶-否决项标准列表 * 查询指导帮扶-否决项标准列表
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:cxlist')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:cxlist')")
@GetMapping("/cxlist") @GetMapping("/cxlist")
public TableDataInfo cxlist(SjZdbfFjxbz sjZdbfFjxbz) public TableDataInfo cxlist(SjZdbfFjxbz sjZdbfFjxbz)
{ {
...@@ -63,7 +63,7 @@ public class SjZdbfFjxbzController extends BaseController ...@@ -63,7 +63,7 @@ public class SjZdbfFjxbzController extends BaseController
/** /**
* 导出指导帮扶-否决项标准列表 * 导出指导帮扶-否决项标准列表
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:export')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:export')")
@Log(title = "指导帮扶-否决项标准", businessType = BusinessType.EXPORT) @Log(title = "指导帮扶-否决项标准", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, SjZdbfFjxbz sjZdbfFjxbz) public void export(HttpServletResponse response, SjZdbfFjxbz sjZdbfFjxbz)
...@@ -76,7 +76,7 @@ public class SjZdbfFjxbzController extends BaseController ...@@ -76,7 +76,7 @@ public class SjZdbfFjxbzController extends BaseController
/** /**
* 获取指导帮扶-否决项标准详细信息 * 获取指导帮扶-否决项标准详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:query')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
...@@ -86,7 +86,7 @@ public class SjZdbfFjxbzController extends BaseController ...@@ -86,7 +86,7 @@ public class SjZdbfFjxbzController extends BaseController
/** /**
* 新增指导帮扶-否决项标准 * 新增指导帮扶-否决项标准
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:add')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:add')")
@Log(title = "指导帮扶-否决项标准", businessType = BusinessType.INSERT) @Log(title = "指导帮扶-否决项标准", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SjZdbfFjxbz sjZdbfFjxbz) public AjaxResult add(@RequestBody SjZdbfFjxbz sjZdbfFjxbz)
...@@ -97,7 +97,7 @@ public class SjZdbfFjxbzController extends BaseController ...@@ -97,7 +97,7 @@ public class SjZdbfFjxbzController extends BaseController
/** /**
* 修改指导帮扶-否决项标准 * 修改指导帮扶-否决项标准
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:edit')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:edit')")
@Log(title = "指导帮扶-否决项标准", businessType = BusinessType.UPDATE) @Log(title = "指导帮扶-否决项标准", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SjZdbfFjxbz sjZdbfFjxbz) public AjaxResult edit(@RequestBody SjZdbfFjxbz sjZdbfFjxbz)
...@@ -108,7 +108,7 @@ public class SjZdbfFjxbzController extends BaseController ...@@ -108,7 +108,7 @@ public class SjZdbfFjxbzController extends BaseController
/** /**
* 删除指导帮扶-否决项标准 * 删除指导帮扶-否决项标准
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:remove')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:remove')")
@Log(title = "指导帮扶-否决项标准", businessType = BusinessType.DELETE) @Log(title = "指导帮扶-否决项标准", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
......
...@@ -40,7 +40,7 @@ public class SjZdbfKhpjbzController extends BaseController ...@@ -40,7 +40,7 @@ public class SjZdbfKhpjbzController extends BaseController
/** /**
* 查询指导帮扶-考核评价标准列表 * 查询指导帮扶-考核评价标准列表
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:list')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SjZdbfKhpjbz sjZdbfKhpjbz) public TableDataInfo list(SjZdbfKhpjbz sjZdbfKhpjbz)
{ {
...@@ -53,7 +53,7 @@ public class SjZdbfKhpjbzController extends BaseController ...@@ -53,7 +53,7 @@ public class SjZdbfKhpjbzController extends BaseController
/** /**
* 查询指导帮扶-考核评价标准列表 * 查询指导帮扶-考核评价标准列表
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:cxlist')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:cxlist')")
@GetMapping("/cxlist") @GetMapping("/cxlist")
public TableDataInfo cxlist(SjZdbfKhpjbz sjZdbfKhpjbz) public TableDataInfo cxlist(SjZdbfKhpjbz sjZdbfKhpjbz)
{ {
...@@ -65,7 +65,7 @@ public class SjZdbfKhpjbzController extends BaseController ...@@ -65,7 +65,7 @@ public class SjZdbfKhpjbzController extends BaseController
/** /**
* 导出指导帮扶-考核评价标准列表 * 导出指导帮扶-考核评价标准列表
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:export')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:export')")
@Log(title = "指导帮扶-考核评价标准", businessType = BusinessType.EXPORT) @Log(title = "指导帮扶-考核评价标准", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, SjZdbfKhpjbz sjZdbfKhpjbz) public void export(HttpServletResponse response, SjZdbfKhpjbz sjZdbfKhpjbz)
...@@ -78,7 +78,7 @@ public class SjZdbfKhpjbzController extends BaseController ...@@ -78,7 +78,7 @@ public class SjZdbfKhpjbzController extends BaseController
/** /**
* 获取指导帮扶-考核评价标准详细信息 * 获取指导帮扶-考核评价标准详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:query')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
...@@ -88,7 +88,7 @@ public class SjZdbfKhpjbzController extends BaseController ...@@ -88,7 +88,7 @@ public class SjZdbfKhpjbzController extends BaseController
/** /**
* 新增指导帮扶-考核评价标准 * 新增指导帮扶-考核评价标准
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:add')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:add')")
@Log(title = "指导帮扶-考核评价标准", businessType = BusinessType.INSERT) @Log(title = "指导帮扶-考核评价标准", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SjZdbfKhpjbz sjZdbfKhpjbz) public AjaxResult add(@RequestBody SjZdbfKhpjbz sjZdbfKhpjbz)
...@@ -99,7 +99,7 @@ public class SjZdbfKhpjbzController extends BaseController ...@@ -99,7 +99,7 @@ public class SjZdbfKhpjbzController extends BaseController
/** /**
* 修改指导帮扶-考核评价标准 * 修改指导帮扶-考核评价标准
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:edit')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:edit')")
@Log(title = "指导帮扶-考核评价标准", businessType = BusinessType.UPDATE) @Log(title = "指导帮扶-考核评价标准", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SjZdbfKhpjbz sjZdbfKhpjbz) public AjaxResult edit(@RequestBody SjZdbfKhpjbz sjZdbfKhpjbz)
...@@ -110,7 +110,7 @@ public class SjZdbfKhpjbzController extends BaseController ...@@ -110,7 +110,7 @@ public class SjZdbfKhpjbzController extends BaseController
/** /**
* 删除指导帮扶-考核评价标准 * 删除指导帮扶-考核评价标准
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:remove')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:remove')")
@Log(title = "指导帮扶-考核评价标准", businessType = BusinessType.DELETE) @Log(title = "指导帮扶-考核评价标准", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
......
...@@ -5,11 +5,13 @@ import java.io.InputStream; ...@@ -5,11 +5,13 @@ import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.core.domain.entity.SysDept; import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.common.exception.BusinessException; import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.StringUtils; import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.SjZdbfFjxbzCb; import com.qianhe.domain.SjZdbfFjxbzCb;
import com.qianhe.domain.SjZdbfKhpjbzCb; import com.qianhe.domain.SjZdbfKhpjbzCb;
...@@ -120,7 +122,7 @@ public class SjZdbfZsdwfjxcjController extends BaseController ...@@ -120,7 +122,7 @@ public class SjZdbfZsdwfjxcjController extends BaseController
/** /**
* 获取指导帮扶-直属单位否决项采集详细信息 * 获取指导帮扶-直属单位否决项采集详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwfjxcj:query')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwfjxcj:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
...@@ -161,7 +163,7 @@ public class SjZdbfZsdwfjxcjController extends BaseController ...@@ -161,7 +163,7 @@ public class SjZdbfZsdwfjxcjController extends BaseController
} }
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwfjxcj:importData')")
@PostMapping("/importData") @PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{ public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{
...@@ -190,7 +192,12 @@ public class SjZdbfZsdwfjxcjController extends BaseController ...@@ -190,7 +192,12 @@ public class SjZdbfZsdwfjxcjController extends BaseController
if(StringUtils.isEmpty(rq)){ if(StringUtils.isEmpty(rq)){
return AjaxResult.error("导入失败,第"+(i+1)+"行日期不能为空"); return AjaxResult.error("导入失败,第"+(i+1)+"行日期不能为空");
} }
zsdwwtcj.setRq(rq); Date date = DateUtils.parseDate(rq);
if(date==null){
return AjaxResult.error("导入失败,第"+(i+1)+"行日期格式错误");
}
zsdwwtcj.setRq(DateUtils.parseDateToStr("yyyy-MM",date));
//单位 //单位
String dw=new DataFormatter().formatCellValue(row.getCell(2)) ; String dw=new DataFormatter().formatCellValue(row.getCell(2)) ;
if(StringUtils.isEmpty(dw)){ if(StringUtils.isEmpty(dw)){
......
package com.qianhe.controller; package com.qianhe.controller;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.exception.BusinessException; import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.StringUtils; import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.SjZdbfZsdwkhpj; import com.qianhe.domain.SjZdbfZsdwkhpj;
import org.apache.poi.ss.usermodel.DataFormatter; import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.http.MediaType;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
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;
...@@ -60,20 +67,121 @@ public class SjZdbfZsdwkhpjfjxController extends BaseController ...@@ -60,20 +67,121 @@ public class SjZdbfZsdwkhpjfjxController extends BaseController
/** /**
* 导出指导帮扶-直属单位考核评价否决项列表 * 导出指导帮扶-直属单位考核评价否决项列表
*/ */
// @PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:export')") @PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:export')")
@Log(title = "指导帮扶-直属单位考核评价否决项", businessType = BusinessType.EXPORT) @Log(title = "指导帮扶-直属单位考核评价否决项", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx) public void export(HttpServletResponse response, SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx)
{ {
List<SjZdbfZsdwkhpjfjx> list = sjZdbfZsdwkhpjfjxService.selectSjZdbfZsdwkhpjfjxList(sjZdbfZsdwkhpjfjx); List<SjZdbfZsdwkhpjfjx> list = sjZdbfZsdwkhpjfjxService.selectSjZdbfZsdwkhpjfjxList(sjZdbfZsdwkhpjfjx);
ExcelUtil<SjZdbfZsdwkhpjfjx> util = new ExcelUtil<SjZdbfZsdwkhpjfjx>(SjZdbfZsdwkhpjfjx.class); Workbook exl = null;
util.exportExcel(response, list, "指导帮扶-直属单位考核评价否决项数据"); OutputStream out = null;
InputStream in = null;
try {
in =this.getClass().getResourceAsStream("/static/zsdwfjx.xlsx");
exl = WorkbookFactory.create(in);
out = response.getOutputStream();
response.reset();
String filename = URLEncoder.encode("否决项.xlsx", "UTF-8");
response.setCharacterEncoding("UTF-8");
response.setHeader("Content-Disposition", "attachment;filename=" + filename);
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
Sheet sheet = exl.getSheet("Sheet1");
// sheet.getRow(0).getCell(0).setCellValue(sjZdbfZsdwkhpj.getNd()+"年"+sjZdbfZsdwkhpj.getZqfw()+sjZdbfZsdwkhpj.getDeptName());
CellStyle cellStyle = exl.createCellStyle();
cellStyle.setWrapText(true);
cellStyle.setAlignment(HorizontalAlignment.LEFT);
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
cellStyle.setBorderBottom(BorderStyle.THIN);
cellStyle.setBottomBorderColor(IndexedColors.BLACK.getIndex());
cellStyle.setBorderLeft(BorderStyle.THIN);
cellStyle.setLeftBorderColor(IndexedColors.BLACK.getIndex());
cellStyle.setBorderRight(BorderStyle.THIN);
cellStyle.setRightBorderColor(IndexedColors.BLACK.getIndex());
cellStyle.setBorderTop(BorderStyle.THIN);
cellStyle.setTopBorderColor(IndexedColors.BLACK.getIndex());
String deptName="";
int lastRow = sheet.getLastRowNum()+1;
for( SjZdbfZsdwkhpjfjx zsdwkhpj:list){
deptName= zsdwkhpj.getDeptName();;
Row row = sheet.createRow(lastRow);
row.setHeightInPoints(18);
int m = 0;
Cell cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(zsdwkhpj.getFlmc());
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(zsdwkhpj.getPjbzmc());
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(zsdwkhpj.getSffs());
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(zsdwkhpj.getWtms());
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(zsdwkhpj.getId());
cell = row.createCell(m++);cell.setCellStyle(cellStyle); cell.setCellValue(zsdwkhpj.getZbId());
lastRow++;
}
//合并行
mergeCellsByColumn(sheet,0);
sheet.getRow(0).getCell(0).setCellValue(sjZdbfZsdwkhpjfjx.getNd()+sjZdbfZsdwkhpjfjx.getZqfw()+deptName+"否决项评价");
exl.write(out);
exl.close();
}catch (Exception e){
e.getMessage();
throw new BusinessException("导出Excel失败,请联系网站管理员!");
}finally {
if (exl != null) {
try {
exl.close();
} catch (IOException e1) {
e1.printStackTrace();
}
}
if (out != null) {
try {
out.close();
} catch (IOException e1) {
e1.printStackTrace();
}
}
}
}
// 根据某一列的值是否相同,对其他列的单元格进行合并
private static void mergeCellsByColumn(Sheet sheet, int columnIndex) {
Map<String, Integer> groups = new HashMap<>();
// 遍历该列,记录相同值的行索引
int start=1;
int end=1;
String old="";
for (int i = 1; i <= sheet.getLastRowNum(); i++) {
Row row = sheet.getRow(i);
Cell cell = row.getCell(columnIndex);
String cellValue = cell.getStringCellValue();
if (!groups.containsKey(cellValue)) {
if(groups.get(old)!=null){
start = groups.get(old);
}
old=cellValue;
groups.put(cellValue, i);
//合并行
mergeCellsInRange(sheet, columnIndex, start, end);
start=i;
end=i;
} else {
end++;
if(i==sheet.getLastRowNum()){
mergeCellsInRange(sheet, columnIndex, start, end);
}
}
}
}
// 合并指定范围内的单元格
private static void mergeCellsInRange(Sheet sheet, int columnIndex, int startIndex, int endIndex) {
if(startIndex!=endIndex){
sheet.addMergedRegion(new CellRangeAddress(startIndex, endIndex, columnIndex, columnIndex));
}
} }
/** /**
* 获取指导帮扶-直属单位考核评价否决项详细信息 * 获取指导帮扶-直属单位考核评价否决项详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:query')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
...@@ -116,7 +224,7 @@ public class SjZdbfZsdwkhpjfjxController extends BaseController ...@@ -116,7 +224,7 @@ public class SjZdbfZsdwkhpjfjxController extends BaseController
/** /**
* 修改指导帮扶-直属单位考核评价否决项 * 修改指导帮扶-直属单位考核评价否决项
*/ */
// @PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:edit')") @PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:pledit')")
@Log(title = "指导帮扶-直属单位考核评价否决项", businessType = BusinessType.UPDATE) @Log(title = "指导帮扶-直属单位考核评价否决项", businessType = BusinessType.UPDATE)
@PutMapping("/pledit") @PutMapping("/pledit")
public AjaxResult pledit(@RequestBody List<SjZdbfZsdwkhpjfjx> list) public AjaxResult pledit(@RequestBody List<SjZdbfZsdwkhpjfjx> list)
...@@ -124,7 +232,7 @@ public class SjZdbfZsdwkhpjfjxController extends BaseController ...@@ -124,7 +232,7 @@ public class SjZdbfZsdwkhpjfjxController extends BaseController
return toAjax(sjZdbfZsdwkhpjfjxService.pledit(list)); return toAjax(sjZdbfZsdwkhpjfjxService.pledit(list));
} }
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:importData')")
@PostMapping("/importData") @PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{ public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{
......
...@@ -5,11 +5,13 @@ import java.io.InputStream; ...@@ -5,11 +5,13 @@ import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.core.domain.entity.SysDept; import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.common.exception.BusinessException; import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.StringUtils; import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.SjZdbfKhpjbz; import com.qianhe.domain.SjZdbfKhpjbz;
import com.qianhe.domain.SjZdbfKhpjbzCb; import com.qianhe.domain.SjZdbfKhpjbzCb;
...@@ -118,7 +120,7 @@ public class SjZdbfZsdwwtcjController extends BaseController ...@@ -118,7 +120,7 @@ public class SjZdbfZsdwwtcjController extends BaseController
/** /**
* 获取指导帮扶-直属单位问题采集详细信息 * 获取指导帮扶-直属单位问题采集详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwwtcj:query')") // @PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwwtcj:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
...@@ -160,7 +162,7 @@ public class SjZdbfZsdwwtcjController extends BaseController ...@@ -160,7 +162,7 @@ public class SjZdbfZsdwwtcjController extends BaseController
} }
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwwtcj:importData')")
@PostMapping("/importData") @PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{ public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{
...@@ -189,7 +191,12 @@ public class SjZdbfZsdwwtcjController extends BaseController ...@@ -189,7 +191,12 @@ public class SjZdbfZsdwwtcjController extends BaseController
if(StringUtils.isEmpty(rq)){ if(StringUtils.isEmpty(rq)){
return AjaxResult.error("导入失败,第"+(i+1)+"行日期不能为空"); return AjaxResult.error("导入失败,第"+(i+1)+"行日期不能为空");
} }
zsdwwtcj.setRq(rq);
Date date = DateUtils.parseDate(rq);
if(date==null){
return AjaxResult.error("导入失败,第"+(i+1)+"行日期格式错误");
}
zsdwwtcj.setRq(DateUtils.parseDateToStr("yyyy-MM",date));
//单位 //单位
String dw=new DataFormatter().formatCellValue(row.getCell(2)) ; String dw=new DataFormatter().formatCellValue(row.getCell(2)) ;
if(StringUtils.isEmpty(dw)){ if(StringUtils.isEmpty(dw)){
......
...@@ -19,14 +19,14 @@ public class SjZdbfZsdwkhpj extends BaseEntity ...@@ -19,14 +19,14 @@ public class SjZdbfZsdwkhpj extends BaseEntity
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Excel(name = "单位名称") // @Excel(name = "单位名称")
private String deptName; private String deptName;
/** 年度 */ /** 年度 */
@Excel(name = "年度") // @Excel(name = "年度")
private String nd; private String nd;
/** 周期范围(第一季度-第四季度、上半年、下半年) */ /** 周期范围(第一季度-第四季度、上半年、下半年) */
@Excel(name = "周期范围") // @Excel(name = "周期范围")
private String zqfw; private String zqfw;
/** 周期类型(季度、半年度、年度) */ /** 周期类型(季度、半年度、年度) */
...@@ -38,17 +38,17 @@ public class SjZdbfZsdwkhpj extends BaseEntity ...@@ -38,17 +38,17 @@ public class SjZdbfZsdwkhpj extends BaseEntity
private String jb; private String jb;
/** 考核内容 */ /** 考核内容 */
@Excel(name = "考核内容") @Excel(name = "考核内容",needMerge=true)
private String khnr; private String khnr;
/** 考核项点 */ /** 考核项点 */
@Excel(name = "考核项点") @Excel(name = "考核项点",needMerge=true)
private String khxd; private String khxd;
/** 评价标准名称 */ /** 评价标准名称 */
@Excel(name = "评价标准名称") @Excel(name = "评价标准")
private String pjbzmc; private String pjbzmc;
/** 数量 */ /** 数量 */
...@@ -92,10 +92,10 @@ public class SjZdbfZsdwkhpj extends BaseEntity ...@@ -92,10 +92,10 @@ public class SjZdbfZsdwkhpj extends BaseEntity
private Long zbId; private Long zbId;
/** 单位id */ /** 单位id */
@Excel(name = "单位id(勿动)",headerColor= IndexedColors.RED1) // @Excel(name = "单位id(勿动)",headerColor= IndexedColors.RED1)
private Long deptId; private Long deptId;
/** 评价标准id */ /** 评价标准id */
@Excel(name = "评价标准id") // @Excel(name = "评价标准id")
private String pjbzid; private String pjbzid;
} }
...@@ -39,11 +39,11 @@ public class SjZdbfZsdwkhpjZb extends BaseEntity ...@@ -39,11 +39,11 @@ public class SjZdbfZsdwkhpjZb extends BaseEntity
private String nd; private String nd;
/** 周期范围(第一季度-第四季度、上半年、下半年) */ /** 周期范围(第一季度-第四季度、上半年、下半年) */
@Excel(name = "周期范围") // @Excel(name = "周期范围")
private String zqfw; private String zqfw;
/** 周期类型(季度、半年度、年度) */ /** 周期类型(季度、半年度、年度) */
@Excel(name = "周期类型") // @Excel(name = "周期类型")
private String zqlx; private String zqlx;
/** 级别(直属单位(半年度)、基层单位(季度)、三基帮扶组(年度)) */ /** 级别(直属单位(半年度)、基层单位(季度)、三基帮扶组(年度)) */
......
...@@ -201,6 +201,8 @@ public class SjZdbfZsdwkhpjServiceImpl implements ISjZdbfZsdwkhpjService ...@@ -201,6 +201,8 @@ public class SjZdbfZsdwkhpjServiceImpl implements ISjZdbfZsdwkhpjService
sjZdbfZsdwkhpjZb.setZhdf( sunfs.multiply(new BigDecimal(0.9)).setScale(2, BigDecimal.ROUND_HALF_UP)); sjZdbfZsdwkhpjZb.setZhdf( sunfs.multiply(new BigDecimal(0.9)).setScale(2, BigDecimal.ROUND_HALF_UP));
}else if ("C类".equals(deptDfl)) { }else if ("C类".equals(deptDfl)) {
sjZdbfZsdwkhpjZb.setZhdf( sunfs.multiply(new BigDecimal(0.85)).setScale(2, BigDecimal.ROUND_HALF_UP)); sjZdbfZsdwkhpjZb.setZhdf( sunfs.multiply(new BigDecimal(0.85)).setScale(2, BigDecimal.ROUND_HALF_UP));
}else {
sjZdbfZsdwkhpjZb.setZhdf(sunfs);
} }
} }
//更新主表 //更新主表
...@@ -208,5 +210,10 @@ public class SjZdbfZsdwkhpjServiceImpl implements ISjZdbfZsdwkhpjService ...@@ -208,5 +210,10 @@ public class SjZdbfZsdwkhpjServiceImpl implements ISjZdbfZsdwkhpjService
return sjZdbfZsdwkhpjMapper.pledit(list); return sjZdbfZsdwkhpjMapper.pledit(list);
} }
public static void main(String[] args) {
System.out.println(Double.parseDouble("-5"));
System.out.println(Double.parseDouble("+5"));
}
} }
...@@ -99,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -99,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where 1=1 where 1=1
<if test="khnr != null and khnr != ''"> and khnr = #{khnr}</if> <if test="khnr != null and khnr != ''"> and khnr = #{khnr}</if>
<if test="nd != null and nd != ''"> and nd = #{nd}</if> <if test="nd != null and nd != ''"> and nd = #{nd}</if>
<if test="lx != null and lx != ''"> and lx = #{lx}</if>
</select> </select>
<select id="getPjbzList" resultType="com.qianhe.domain.SjZdbfKhpjbzCb"> <select id="getPjbzList" resultType="com.qianhe.domain.SjZdbfKhpjbzCb">
...@@ -106,6 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -106,6 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where 1=1 where 1=1
<if test="khxd != null and khxd != ''"> and khxd = #{khxd}</if> <if test="khxd != null and khxd != ''"> and khxd = #{khxd}</if>
<if test="nd != null and nd != ''"> and nd = #{nd}</if> <if test="nd != null and nd != ''"> and nd = #{nd}</if>
<if test="lx != null and lx != ''"> and lx = #{lx}</if>
</select> </select>
<select id="selectSjZdbfKhpjbzCb" resultType="com.qianhe.domain.SjZdbfKhpjbzCb"> <select id="selectSjZdbfKhpjbzCb" resultType="com.qianhe.domain.SjZdbfKhpjbzCb">
select * from sj_zdbf_khpjbz_cb where lx=#{lx} and khnr=#{khnr} and khxd=#{khxd} and px=#{px} and nd=#{nd} select * from sj_zdbf_khpjbz_cb where lx=#{lx} and khnr=#{khnr} and khxd=#{khxd} and px=#{px} and nd=#{nd}
......
...@@ -142,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -142,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}
</where> </where>
order by zhdf desc
</select> </select>
<select id="selectSjZdbfZsdwkhpjZbById" parameterType="Long" resultMap="SjZdbfZsdwkhpjZbResult"> <select id="selectSjZdbfZsdwkhpjZbById" parameterType="Long" resultMap="SjZdbfZsdwkhpjZbResult">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment