|
|
@@ -8,10 +8,13 @@ import com.goafanti.business.bo.InputRestrictProject;
|
|
|
import com.goafanti.common.bo.EmailBo;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.*;
|
|
|
+import com.goafanti.common.enums.AssistContentType;
|
|
|
+import com.goafanti.common.enums.AssistType;
|
|
|
import com.goafanti.common.enums.NoticeStatus;
|
|
|
import com.goafanti.common.error.BusinessException;
|
|
|
import com.goafanti.common.model.*;
|
|
|
import com.goafanti.common.utils.*;
|
|
|
+import com.goafanti.common.utils.excel.NewExcelUtil;
|
|
|
import com.goafanti.common.utils.weChat.WeChatUtils;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
@@ -30,6 +33,7 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.socket.TextMessage;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
|
import java.util.*;
|
|
|
@@ -1721,8 +1725,55 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
|
|
|
@Override
|
|
|
public Object listAssist(InputListAssist in) {
|
|
|
+ Pagination<OutListAssist> page = (Pagination<OutListAssist>) findPage("findAssistList", "findAssistCount", in);
|
|
|
+ for (OutListAssist e : (List<OutListAssist>)page.getList()) {
|
|
|
+ pushTypeName(e);
|
|
|
+ }
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void listAssistExprot(InputListAssist in, HttpServletResponse response) {
|
|
|
+ List<OutListAssist> list = (List<OutListAssist>) findList("findAssistList", in);
|
|
|
+ for (OutListAssist e : list) {
|
|
|
+ pushTypeName(e);
|
|
|
+ }
|
|
|
+ NewExcelUtil<OutListAssist> excelExport = new NewExcelUtil<>(OutListAssist.class);
|
|
|
+ excelExport.exportExcel(list, "协单统计列表",response);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void pushTypeName(OutListAssist e) {
|
|
|
+ //处理公出项目分类
|
|
|
+ e.setAssistType(pushAssistTypeName(e.getAssistType()));
|
|
|
+
|
|
|
+ //处理公出内容分类
|
|
|
+ if (StringUtils.isNotBlank(e.getContentType())){
|
|
|
+ String[] split = e.getContentType().split(",");
|
|
|
+ StringBuilder str=new StringBuilder();
|
|
|
+ for (String s : split) {
|
|
|
+ str.append(AssistContentType.getDesc(Integer.valueOf(s))).append(",");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(e.getContent())){
|
|
|
+ str.append(e.getContent());
|
|
|
+ }else {
|
|
|
+ str.deleteCharAt(str.length()-1);
|
|
|
+ }
|
|
|
+
|
|
|
+ e.setContent(str.toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- return findPage("findAssistList", "findAssistCount", in);
|
|
|
+ private String pushAssistTypeName(String assistType) {
|
|
|
+ if (StringUtils.isNotBlank(assistType)){
|
|
|
+ String[] split = assistType.split(",");
|
|
|
+ StringBuilder str=new StringBuilder();
|
|
|
+ for (String s : split) {
|
|
|
+ str.append(AssistType.getDesc(Integer.valueOf(s))).append(",");
|
|
|
+ }
|
|
|
+ str.deleteCharAt(str.length()-1);
|
|
|
+ return str.toString();
|
|
|
+ }
|
|
|
+ return "";
|
|
|
}
|
|
|
|
|
|
private void pushCompleteMaxDuration(String orderNo) {
|
|
|
@@ -2623,6 +2674,9 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
List<PublicReleaseClock> publicReleaseClocks = publicReleaseClockMapper.selectList(collect);
|
|
|
pushiClockInTime(list, publicReleaseClocks);
|
|
|
}
|
|
|
+ list.forEach(e -> {
|
|
|
+ e.setAssistType(pushAssistTypeName(e.getAssistType()));
|
|
|
+ });
|
|
|
return page;
|
|
|
}
|
|
|
|