|
|
@@ -1668,27 +1668,50 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
return map;
|
|
|
}
|
|
|
public Map checkOrderNoDuration( InputPublicRelease in,AdminListBo a) {
|
|
|
-
|
|
|
List<PublicRelease> list = publicReleaseMapper.selectByOrderNo(in.getOrderNo());
|
|
|
TOrderNewBo t = tOrderNewMapper.getOrderNewDetail(in.getOrderNo());
|
|
|
+ OutPublicRelease outPublicRelease=null;
|
|
|
+ if (in.getId()!=null)outPublicRelease= publicReleaseMapper.selectDtails(in.getId());
|
|
|
BigDecimal count = BigDecimal.ZERO;
|
|
|
- count=count.add(BigDecimal.valueOf(in.getDuration()));
|
|
|
+ int timesCount=0;
|
|
|
List<String> peopleList = new ArrayList<>();
|
|
|
peopleList.add(in.getAid());
|
|
|
- int timesCount=1;
|
|
|
for (PublicRelease e : list) {
|
|
|
- if (e.getDuration()!=null){
|
|
|
- count=count.add(BigDecimal.valueOf(e.getDuration()));
|
|
|
- if (!peopleList.contains(e.getAid())){
|
|
|
- peopleList.add(e.getAid());
|
|
|
+ //新增直接计算
|
|
|
+ if (in.getId()==null){
|
|
|
+ if (e.getDuration()!=null){
|
|
|
+ count=count.add(BigDecimal.valueOf(e.getDuration()));
|
|
|
+ if (!peopleList.contains(e.getAid())){
|
|
|
+ peopleList.add(e.getAid());
|
|
|
+ }
|
|
|
+ timesCount++;
|
|
|
}
|
|
|
- timesCount++;
|
|
|
+ }else {
|
|
|
+ //修改当前数据要从修改后获取
|
|
|
+ if (!e.getId().equals(in.getId())){
|
|
|
+ if (e.getDuration()!=null){
|
|
|
+ count=count.add(BigDecimal.valueOf(e.getDuration()));
|
|
|
+ if (!peopleList.contains(e.getAid())){
|
|
|
+ peopleList.add(e.getAid());
|
|
|
+ }
|
|
|
+ timesCount++;
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ if (outPublicRelease != null && outPublicRelease.getDuration() != null) {
|
|
|
+ count = count.add(BigDecimal.valueOf(outPublicRelease.getDuration()));
|
|
|
+ if (!peopleList.contains(outPublicRelease.getAid())) {
|
|
|
+ peopleList.add(outPublicRelease.getAid());
|
|
|
+ }
|
|
|
+ timesCount++;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
Map map=new HashMap();
|
|
|
CheckOrderNoOut data= new CheckOrderNoOut();
|
|
|
- if (in.getId()!=null){
|
|
|
- OutPublicRelease outPublicRelease = publicReleaseMapper.selectDtails(in.getId());
|
|
|
+ if (outPublicRelease!=null){
|
|
|
data.setPublicReleaseName(outPublicRelease.getAname());
|
|
|
}
|
|
|
data.setTimesCount(timesCount);
|