|
@@ -14,6 +14,7 @@ import nc.vo.pub.lang.UFBoolean;
|
|
|
import nc.vo.pub.lang.UFDateTime;
|
|
|
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
|
|
import nc.vo.pubapp.pattern.pub.PubAppTool;
|
|
|
+import nccloud.commons.collections.CollectionUtils;
|
|
|
import nccloud.framework.core.json.IJson;
|
|
|
import nccloud.framework.service.ServiceLocator;
|
|
|
import nccloud.framework.web.container.ClientInfo;
|
|
@@ -52,7 +53,7 @@ public class WadataexplainCopyLastPeriod extends NCCAction {
|
|
|
|
|
|
GridModelConvertUtils gridConvUtl = new GridModelConvertUtils();
|
|
|
|
|
|
- if(null!=result) {
|
|
|
+ if(CollectionUtils.isNotEmpty(result)) {
|
|
|
|
|
|
grid = gridConvUtl.toGridOpe(WadataexplainConsts.pagecode, result.stream().toArray(Wadataexplain[]::new));
|
|
|
}
|
|
@@ -84,7 +85,6 @@ public class WadataexplainCopyLastPeriod extends NCCAction {
|
|
|
String beforeyear = copyear;
|
|
|
String beformonth = copperiod;
|
|
|
|
|
|
-
|
|
|
if("01".equals(copperiod)){
|
|
|
beformonth = "12";
|
|
|
beforeyear= String.valueOf(Integer.parseInt(copyear)-1);
|
|
@@ -203,28 +203,31 @@ public class WadataexplainCopyLastPeriod extends NCCAction {
|
|
|
|
|
|
List<Wadataexplain> vos = (List<Wadataexplain>) ServiceLocator.find(IUAPQueryBS.class).retrieveByClause(Wadataexplain.class, selectSql.toString());
|
|
|
List<Wadataexplain> volist = new ArrayList<Wadataexplain>();
|
|
|
- vos.forEach(vo->{
|
|
|
- String pk_psndoc = vo.getPk_psndoc();
|
|
|
- String pk_wa_classitem = vo.getPk_wa_classitem();
|
|
|
- String itemid = lastwadataitemMap.get(pk_wa_classitem);//先根据对照,把itemid拿出来
|
|
|
- String thiswaitem = thisclassitemMap.get(itemid);//根据itemid拿出最新的waitem
|
|
|
- if(thiswadataMap.containsKey(pk_psndoc)&&!PubAppTool.isNull(thiswaitem)) {
|
|
|
- vo.setCreationtime(new UFDateTime());
|
|
|
- vo.setCreator(userid);
|
|
|
- vo.setCyear(copyear);
|
|
|
- vo.setCperiod(copperiod);
|
|
|
- vo.setDef1(copyear+copperiod);
|
|
|
- vo.setStatus(VOStatus.NEW);
|
|
|
- vo.setPk_wa_data_explain(null);
|
|
|
- vo.setPk_wa_classitem(thiswaitem);
|
|
|
- vo.setIscommit(UFBoolean.FALSE);
|
|
|
- vo.setIsquote(UFBoolean.FALSE);
|
|
|
- vo.setModifiedtime(null);
|
|
|
- vo.setModifier(null);
|
|
|
- volist.add(vo);
|
|
|
- }
|
|
|
+ if(CollectionUtils.isNotEmpty(vos)) {
|
|
|
|
|
|
- });
|
|
|
+ vos.forEach(vo->{
|
|
|
+ String pk_psndoc = vo.getPk_psndoc();
|
|
|
+ String pk_wa_classitem = vo.getPk_wa_classitem();
|
|
|
+ String itemid = lastwadataitemMap.get(pk_wa_classitem);//先根据对照,把itemid拿出来
|
|
|
+ String thiswaitem = thisclassitemMap.get(itemid);//根据itemid拿出最新的waitem
|
|
|
+ if(thiswadataMap.containsKey(pk_psndoc)&&!PubAppTool.isNull(thiswaitem)) {
|
|
|
+ vo.setCreationtime(new UFDateTime());
|
|
|
+ vo.setCreator(userid);
|
|
|
+ vo.setCyear(copyear);
|
|
|
+ vo.setCperiod(copperiod);
|
|
|
+ vo.setDef1(copyear+copperiod);
|
|
|
+ vo.setStatus(VOStatus.NEW);
|
|
|
+ vo.setPk_wa_data_explain(null);
|
|
|
+ vo.setPk_wa_classitem(thiswaitem);
|
|
|
+ vo.setIscommit(UFBoolean.FALSE);
|
|
|
+ vo.setIsquote(UFBoolean.FALSE);
|
|
|
+ vo.setModifiedtime(null);
|
|
|
+ vo.setModifier(null);
|
|
|
+ volist.add(vo);
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
return volist;
|
|
|
}
|