|
|
@@ -27,6 +27,7 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.socket.TextMessage;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
|
@@ -1441,5 +1442,47 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
return publicReleaseDetailsMapper.updateByPrimaryKeySelective(updateprd);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Object publicReleaseAndCount(InputPublicDtails in) {
|
|
|
+ List<OutPublicDtails> list = publicReleaseListDtailsList(in);
|
|
|
+ //公出次数
|
|
|
+ int count=0;
|
|
|
+ BigDecimal durationCount=BigDecimal.ZERO;
|
|
|
+ List<String> aList =new ArrayList<>();
|
|
|
+ for (OutPublicDtails e : list) {
|
|
|
+ if (e.getType()==0||e.getType()==1||e.getType()==2){
|
|
|
+ count++;
|
|
|
+ durationCount=durationCount.add(new BigDecimal(e.getDuration()));
|
|
|
+ if (!aList.contains(e.getAname())){
|
|
|
+ aList.add(e.getAname());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(e.getAssistAidName())){
|
|
|
+ String[] split = e.getAssistAidName().split(",");
|
|
|
+ for (String s : split) {
|
|
|
+ if (!aList.contains(s)){
|
|
|
+ aList.add(s);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(e.getAssistantName())){
|
|
|
+ String[] split = e.getAssistantName().split(",");
|
|
|
+ for (String s : split) {
|
|
|
+ if (!aList.contains(s)){
|
|
|
+ aList.add(s);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ Map<String,Object> map=new HashMap<String, Object>();
|
|
|
+ map.put("list",list);
|
|
|
+ map.put("count",count);
|
|
|
+ map.put("durationCount",durationCount);
|
|
|
+ map.put("peopleCount",aList.size());
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|