@@ -52,6 +52,17 @@ public class PartyDataCustomHandler extends AbstractHandler { | |||||
if(cur_party_id != 0) { | if(cur_party_id != 0) { | ||||
return R.error("当前机构已有该任务的填报数据:"+params.readString("task_text")); | return R.error("当前机构已有该任务的填报数据:"+params.readString("task_text")); | ||||
} | } | ||||
int outOldData = params.readInt("outOldData"); | |||||
if (outOldData == 1){ | |||||
String sql ="select fo_id,fo_task\n" + | |||||
"from "+EntityHelper.getSchemaTableName(FillOut.ENTITY_NAME)+" a\n" + | |||||
"where a.fo_task = (select max(fo_task) from "+EntityHelper.getSchemaTableName(FillOut.ENTITY_NAME)+" where fo_party_id=?)\n" + | |||||
"and fo_party_id=? and fo_state <>-1"; | |||||
FillOut fillOut = DbEngine.getInstance().queryEntity(sql, FillOut.class, us.getPartyId(),us.getPartyId()); | |||||
if (EntityHelper.isEmpty(fillOut)) return R.error("未查询到上期填报数据"); | |||||
} | |||||
return R.success(); | return R.success(); | ||||
} | } | ||||
} | } |
@@ -83,6 +83,7 @@ public class PartyDataFillService extends LCMsService { | |||||
"where a.fo_task = (select max(fo_task) from "+EntityHelper.getSchemaTableName(FillOut.ENTITY_NAME)+" where fo_party_id=?)\n" + | "where a.fo_task = (select max(fo_task) from "+EntityHelper.getSchemaTableName(FillOut.ENTITY_NAME)+" where fo_party_id=?)\n" + | ||||
"and fo_party_id=? and fo_state <>-1"; | "and fo_party_id=? and fo_state <>-1"; | ||||
FillOut fillOut = DbEngine.getInstance().queryEntity(sql, FillOut.class, us.getPartyId(),us.getPartyId()); | FillOut fillOut = DbEngine.getInstance().queryEntity(sql, FillOut.class, us.getPartyId(),us.getPartyId()); | ||||
if (EntityHelper.isEmpty(fillOut)) return R.error("未查询到上期填报数据"); | |||||
BusinessInfo businessInfo = DbEngine.getInstance().findDao(BusinessInfo.class).queryEntityWhere("bi_fo_id=?",fillOut.getId()); | BusinessInfo businessInfo = DbEngine.getInstance().findDao(BusinessInfo.class).queryEntityWhere("bi_fo_id=?",fillOut.getId()); | ||||
if (EntityHelper.isEmpty(businessInfo)) throw new BizException("未查询到相关的业务信息!"); | if (EntityHelper.isEmpty(businessInfo)) throw new BizException("未查询到相关的业务信息!"); | ||||
businessInfo.put("bi_type_text", DictsCache.getInstance().getItemName("tbBusinessType",businessInfo.getType())); | businessInfo.put("bi_type_text", DictsCache.getInstance().getItemName("tbBusinessType",businessInfo.getType())); | ||||
@@ -27,16 +27,21 @@ window.$swEvent.setup("mztb.base.partyDataFill.partyDataFillList", { | |||||
return false | return false | ||||
} | } | ||||
// 检查当前机构是否重复推送 | // 检查当前机构是否重复推送 | ||||
const rt = await $$http.post("mztb/partyDataFill/checkRepetition", {task: $model.ds_1.data.form.task,task_text : $model.ds_1.data.form.task_text}) | |||||
$api.closeDialog("tb_dialog") | |||||
$api.toPage("mztb.partyDataFillCard", { | |||||
$fromAction: 'button:add' | |||||
, task: $model.ds_1.data.form.task | |||||
, type: $model.ds_1.data.form.month | |||||
, task_text: $model.ds_1.data.form.task_text | |||||
, outOldData: $model.ds_1.data.form.outOldData, | |||||
year : $model.ds_1.data.form.year | |||||
const rt = await $$http.post("mztb/partyDataFill/checkRepetition", {task: $model.ds_1.data.form.task, | |||||
task_text : $model.ds_1.data.form.task_text, | |||||
outOldData: $model.ds_1.data.form.outOldData,}).then((res)=>{ | |||||
if (res.code === 0){ | |||||
$api.toPage("mztb.partyDataFillCard", { | |||||
$fromAction: 'button:add' | |||||
, task: $model.ds_1.data.form.task | |||||
, type: $model.ds_1.data.form.month | |||||
, task_text: $model.ds_1.data.form.task_text | |||||
, outOldData: $model.ds_1.data.form.outOldData, | |||||
year : $model.ds_1.data.form.year | |||||
}) | |||||
} | |||||
}) | }) | ||||
$api.closeDialog("tb_dialog") | |||||
} | } | ||||
const selectHide =(data) => { | const selectHide =(data) => { | ||||