|
@@ -1,9 +1,11 @@
|
|
|
package com.jpsoft.excellent.modules;
|
|
|
|
|
|
+import com.github.pagehelper.Page;
|
|
|
import com.jpsoft.excellent.config.OSSConfig;
|
|
|
import com.jpsoft.excellent.modules.base.entity.*;
|
|
|
import com.jpsoft.excellent.modules.base.service.*;
|
|
|
import com.jpsoft.excellent.modules.common.dto.MessageResult;
|
|
|
+import com.jpsoft.excellent.modules.common.dto.Sort;
|
|
|
import com.jpsoft.excellent.modules.common.utils.DES3;
|
|
|
import com.jpsoft.excellent.modules.common.utils.OSSUtil;
|
|
|
import com.jpsoft.excellent.modules.common.utils.POIUtils;
|
|
@@ -57,6 +59,8 @@ public class textController {
|
|
|
private AreaService areaService;
|
|
|
@Autowired
|
|
|
private WorkStationService workStationService;
|
|
|
+ @Autowired
|
|
|
+ private FeedbackOpinionService feedbackOpinionService;
|
|
|
|
|
|
@ApiOperation(value="短信发送")
|
|
|
@RequestMapping(value = "sendSMS",method = RequestMethod.POST)
|
|
@@ -363,4 +367,39 @@ public class textController {
|
|
|
|
|
|
return msgResult;
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value="更新序号")
|
|
|
+ @RequestMapping(value = "updataSortNum",method = RequestMethod.POST)
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name="year", value="年份", required=true, paramType="query"),
|
|
|
+ })
|
|
|
+ public MessageResult updataSortNum(String year){
|
|
|
+ MessageResult msgResult = new MessageResult();
|
|
|
+
|
|
|
+ try {
|
|
|
+ Map<String,Object> searchParams = new HashMap<>();
|
|
|
+ if (StringUtils.isNotEmpty(year)) {
|
|
|
+ searchParams.put("year", year + "%");
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Sort> sortList = new ArrayList<>();
|
|
|
+ sortList.add(new Sort("sort_","asc"));
|
|
|
+
|
|
|
+ Page<FeedbackOpinion> page = feedbackOpinionService.pageSearch(searchParams,1,1000000,false,sortList);
|
|
|
+ for(int i=0; i<page.size(); i++){
|
|
|
+ FeedbackOpinion feedbackOpinion = page.get(i);
|
|
|
+ feedbackOpinion.setSort(year + String.format("%06d",i+1));
|
|
|
+ feedbackOpinionService.update(feedbackOpinion);
|
|
|
+ }
|
|
|
+
|
|
|
+ msgResult.setResult(true);
|
|
|
+ msgResult.setData(page.getResult());
|
|
|
+ }
|
|
|
+ catch(Exception ex){
|
|
|
+ msgResult.setResult(false);
|
|
|
+ msgResult.setMessage(ex.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
+ }
|
|
|
}
|