update:医保对账页面新增手动添加备注页面
This commit is contained in:
@@ -145,6 +145,40 @@ public class MedicalInsuranceReconciliationController {
|
|||||||
|
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "更新医保对账备注", notes = "")
|
||||||
|
@PostMapping("/updateMedicalInsuranceReconciliationRemark")
|
||||||
|
@ResponseBody
|
||||||
|
public HashMap<Object, Object> updateMedicalInsuranceReconciliationRemark(
|
||||||
|
@ApiParam(value = "记录ID") @RequestParam String id,
|
||||||
|
@ApiParam(value = "备注") @RequestParam(required = false) String remark) {
|
||||||
|
|
||||||
|
HashMap<Object, Object> responseMap = new HashMap<>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (id == null || "".equals(id.trim())) {
|
||||||
|
responseMap.put("code", 1);
|
||||||
|
responseMap.put("msg", "id不能为空");
|
||||||
|
return responseMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
HashMap<Object, Object> updateMap = new HashMap<>();
|
||||||
|
updateMap.put("id", id.trim());
|
||||||
|
updateMap.put("remark", remark == null ? "" : remark.trim());
|
||||||
|
|
||||||
|
medicalInsuranceReconciliationService.updateMedicalInsuranceReconciliationRemark(updateMap);
|
||||||
|
|
||||||
|
responseMap.put("code", 0);
|
||||||
|
responseMap.put("msg", "OK");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
LogUtil.error(this.getClass(), "更新医保对账备注失败:" + e.getMessage());
|
||||||
|
responseMap.put("code", 1);
|
||||||
|
responseMap.put("msg", "更新失败:" + e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return responseMap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,11 @@ public interface MedicalInsuranceReconciliationMapper {
|
|||||||
* 删除医保对账结果
|
* 删除医保对账结果
|
||||||
*/
|
*/
|
||||||
void deleteMedicalInsuranceReconciliationResult(HashMap<Object, Object> map) throws Exception;
|
void deleteMedicalInsuranceReconciliationResult(HashMap<Object, Object> map) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新医保对账备注
|
||||||
|
*/
|
||||||
|
void updateMedicalInsuranceReconciliationRemark(HashMap<Object, Object> map) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -102,10 +102,12 @@ public class MedicalInsuranceReconciliationMethod {
|
|||||||
prevQueryMap.put("trade_date", trade_date);
|
prevQueryMap.put("trade_date", trade_date);
|
||||||
List<HashMap<Object, Object>> prevResults = reconciliationService.findMedicalInsuranceReconciliationResult(prevQueryMap);
|
List<HashMap<Object, Object>> prevResults = reconciliationService.findMedicalInsuranceReconciliationResult(prevQueryMap);
|
||||||
HashMap<String, String> prevStatusMap = new HashMap<>();
|
HashMap<String, String> prevStatusMap = new HashMap<>();
|
||||||
|
HashMap<String, String> prevRemarkMap = new HashMap<>();
|
||||||
if (prevResults != null) {
|
if (prevResults != null) {
|
||||||
for (HashMap<Object, Object> prev : prevResults) {
|
for (HashMap<Object, Object> prev : prevResults) {
|
||||||
String key = StringDUtil.changeNullToEmpty(prev.get("insutype")) + "|" + StringDUtil.changeNullToEmpty(prev.get("clr_type"));
|
String key = StringDUtil.changeNullToEmpty(prev.get("insutype")) + "|" + StringDUtil.changeNullToEmpty(prev.get("clr_type"));
|
||||||
prevStatusMap.put(key, StringDUtil.changeNullToEmpty(prev.get("stmt_rslt")));
|
prevStatusMap.put(key, StringDUtil.changeNullToEmpty(prev.get("stmt_rslt")));
|
||||||
|
prevRemarkMap.put(key, StringDUtil.changeNullToEmpty(prev.get("recheck_user")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,7 +167,7 @@ public class MedicalInsuranceReconciliationMethod {
|
|||||||
resultMap.put("recheck_flag", recheckFlag);
|
resultMap.put("recheck_flag", recheckFlag);
|
||||||
resultMap.put("prev_stmt_rslt", prevStmt);
|
resultMap.put("prev_stmt_rslt", prevStmt);
|
||||||
resultMap.put("recheck_time", "1".equals(recheckFlag) ? DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss) : null);
|
resultMap.put("recheck_time", "1".equals(recheckFlag) ? DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss) : null);
|
||||||
resultMap.put("recheck_user", "");
|
resultMap.put("recheck_user", prevRemarkMap.getOrDefault(key, ""));
|
||||||
resultMap.put("infcode", callResult.get("infcode"));
|
resultMap.put("infcode", callResult.get("infcode"));
|
||||||
resultMap.put("err_msg", callResult.get("err_msg"));
|
resultMap.put("err_msg", callResult.get("err_msg"));
|
||||||
resultMap.put("warn_msg", callResult.get("warn_msg"));
|
resultMap.put("warn_msg", callResult.get("warn_msg"));
|
||||||
@@ -199,7 +201,7 @@ public class MedicalInsuranceReconciliationMethod {
|
|||||||
resultMap.put("recheck_flag", "0");
|
resultMap.put("recheck_flag", "0");
|
||||||
resultMap.put("prev_stmt_rslt", "");
|
resultMap.put("prev_stmt_rslt", "");
|
||||||
resultMap.put("recheck_time", null);
|
resultMap.put("recheck_time", null);
|
||||||
resultMap.put("recheck_user", "");
|
resultMap.put("recheck_user", prevRemarkMap.getOrDefault(insutype + "|" + clrType, ""));
|
||||||
resultMap.put("api_result", "ERROR");
|
resultMap.put("api_result", "ERROR");
|
||||||
resultMap.put("create_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss));
|
resultMap.put("create_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss));
|
||||||
resultMap.put("modify_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss));
|
resultMap.put("modify_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss));
|
||||||
|
|||||||
@@ -30,6 +30,11 @@ public interface MedicalInsuranceReconciliationService {
|
|||||||
* 删除医保对账结果
|
* 删除医保对账结果
|
||||||
*/
|
*/
|
||||||
void deleteMedicalInsuranceReconciliationResult(HashMap<Object, Object> map) throws Exception;
|
void deleteMedicalInsuranceReconciliationResult(HashMap<Object, Object> map) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新医保对账备注
|
||||||
|
*/
|
||||||
|
void updateMedicalInsuranceReconciliationRemark(HashMap<Object, Object> map) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,11 @@ public class MedicalInsuranceReconciliationServiceImpl implements MedicalInsuran
|
|||||||
public void deleteMedicalInsuranceReconciliationResult(HashMap<Object, Object> map) throws Exception {
|
public void deleteMedicalInsuranceReconciliationResult(HashMap<Object, Object> map) throws Exception {
|
||||||
medicalInsuranceReconciliationMapper.deleteMedicalInsuranceReconciliationResult(map);
|
medicalInsuranceReconciliationMapper.deleteMedicalInsuranceReconciliationResult(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateMedicalInsuranceReconciliationRemark(HashMap<Object, Object> map) throws Exception {
|
||||||
|
medicalInsuranceReconciliationMapper.updateMedicalInsuranceReconciliationRemark(map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -114,6 +114,13 @@
|
|||||||
order by create_time desc, trade_date desc, insutype, clr_type
|
order by create_time desc, trade_date desc, insutype, clr_type
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateMedicalInsuranceReconciliationRemark" parameterType="HashMap">
|
||||||
|
update medical_insurance_reconciliation_result
|
||||||
|
set recheck_user = #{remark},
|
||||||
|
modify_time = now()
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
<!-- 删除医保对账结果 -->
|
<!-- 删除医保对账结果 -->
|
||||||
<delete id="deleteMedicalInsuranceReconciliationResult" parameterType="HashMap">
|
<delete id="deleteMedicalInsuranceReconciliationResult" parameterType="HashMap">
|
||||||
delete from medical_insurance_reconciliation_result
|
delete from medical_insurance_reconciliation_result
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
<option value="340">新农合</option>
|
<option value="340">新农合</option>
|
||||||
<option value="390">城乡居民基本医疗保险</option>
|
<option value="390">城乡居民基本医疗保险</option>
|
||||||
<option value="510">公务员医疗补助</option>
|
<option value="510">公务员医疗补助</option>
|
||||||
<option value="99410">工商保险</option>
|
<option value="99410">工伤保险</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -176,7 +176,13 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-weight: bold;">备注</td>
|
<td style="font-weight: bold;">备注</td>
|
||||||
<td id="detail_remark"></td>
|
<td>
|
||||||
|
<div id="detail_remark_flag" style="margin-bottom: 6px;"></div>
|
||||||
|
<textarea id="detail_remark_input" class="layui-textarea" style="min-height: 80px;"></textarea>
|
||||||
|
<div style="margin-top: 6px;">
|
||||||
|
<button type="button" class="layui-btn layui-btn-sm" onclick="saveDetailRemark()">保存备注</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-weight: bold;">创建时间</td>
|
<td style="font-weight: bold;">创建时间</td>
|
||||||
@@ -188,10 +194,55 @@
|
|||||||
|
|
||||||
<script type="text/html" id="barDemo">
|
<script type="text/html" id="barDemo">
|
||||||
<a class="layui-btn layui-btn-xs" lay-event="getInfo">详细信息</a>
|
<a class="layui-btn layui-btn-xs" lay-event="getInfo">详细信息</a>
|
||||||
|
<a class="layui-btn layui-btn-xs layui-btn-primary" lay-event="editRemark">编辑备注</a>
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
let layer, laydate, table, form;
|
let layer, laydate, table, form;
|
||||||
|
let currentDetailId = null;
|
||||||
|
|
||||||
|
function escapeHtml(value) {
|
||||||
|
if (value === null || value === undefined) return '';
|
||||||
|
return String(value)
|
||||||
|
.replace(/&/g, '&')
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>')
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/'/g, ''');
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildRemarkDisplay(data) {
|
||||||
|
let parts = [];
|
||||||
|
if (data.recheck_flag === '1') {
|
||||||
|
parts.push('<span style="color:#409EFF;">二次核对</span>');
|
||||||
|
}
|
||||||
|
if (data.recheck_user) {
|
||||||
|
parts.push('<span>' + escapeHtml(data.recheck_user) + '</span>');
|
||||||
|
}
|
||||||
|
return parts.join(' / ');
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateRemark(id, remark, onSuccess) {
|
||||||
|
let load = layer.load(1, {shade: [0.3, '#000']});
|
||||||
|
$.ajax({
|
||||||
|
url: '/medicalInsuranceReconciliation/updateMedicalInsuranceReconciliationRemark',
|
||||||
|
type: 'POST',
|
||||||
|
data: {id: id, remark: remark},
|
||||||
|
success: function (data) {
|
||||||
|
layer.close(load);
|
||||||
|
if (data.code === 0) {
|
||||||
|
layer.msg('保存成功!', {icon: 1, time: 1500});
|
||||||
|
if (onSuccess) onSuccess();
|
||||||
|
} else {
|
||||||
|
layer.alert('保存失败:' + (data.msg || ''), {icon: 2});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
layer.close(load);
|
||||||
|
layer.alert('保存失败,请检查网络连接!', {icon: 2});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
layui.use(['element', 'table', 'laydate', 'layer', 'form'], function () {
|
layui.use(['element', 'table', 'laydate', 'layer', 'form'], function () {
|
||||||
layer = layui.layer;
|
layer = layui.layer;
|
||||||
@@ -220,7 +271,7 @@
|
|||||||
if(d.insutype === '340') return '新农合';
|
if(d.insutype === '340') return '新农合';
|
||||||
if(d.insutype === '390') return '居民医保';
|
if(d.insutype === '390') return '居民医保';
|
||||||
if(d.insutype === '510') return '公务员补助';
|
if(d.insutype === '510') return '公务员补助';
|
||||||
if(d.insutype === '99410') return '工商保险';
|
if(d.insutype === '99410') return '工伤保险';
|
||||||
return d.insutype;
|
return d.insutype;
|
||||||
}},
|
}},
|
||||||
{field: 'clr_type', title: '清算类别', align: 'center', width: 100, templet: function(d){
|
{field: 'clr_type', title: '清算类别', align: 'center', width: 100, templet: function(d){
|
||||||
@@ -238,8 +289,8 @@
|
|||||||
{field: 'fund_pay_sumamt', title: '基金支付总额', align: 'center', width: 130},
|
{field: 'fund_pay_sumamt', title: '基金支付总额', align: 'center', width: 130},
|
||||||
{field: 'acct_pay', title: '账户支付金额', align: 'center', width: 130},
|
{field: 'acct_pay', title: '账户支付金额', align: 'center', width: 130},
|
||||||
{field: 'fixmedins_setl_cnt', title: '结算笔数', align: 'center', width: 100},
|
{field: 'fixmedins_setl_cnt', title: '结算笔数', align: 'center', width: 100},
|
||||||
{field: 'remark', title: '备注', align: 'center', width: 120, templet: function(d){
|
{field: 'recheck_user', title: '备注', align: 'center', width: 220, templet: function(d){
|
||||||
return d.recheck_flag === '1' ? '<span style="color:#409EFF;">二次核对</span>' : '';
|
return buildRemarkDisplay(d);
|
||||||
}},
|
}},
|
||||||
{field: 'stmt_rslt', title: '对账结果', align: 'center', width: 100, templet: function(d){
|
{field: 'stmt_rslt', title: '对账结果', align: 'center', width: 100, templet: function(d){
|
||||||
if(d.stmt_rslt === '0') {
|
if(d.stmt_rslt === '0') {
|
||||||
@@ -276,6 +327,19 @@
|
|||||||
if (obj.event === 'getInfo') {
|
if (obj.event === 'getInfo') {
|
||||||
showDetail(data);
|
showDetail(data);
|
||||||
}
|
}
|
||||||
|
if (obj.event === 'editRemark') {
|
||||||
|
layer.prompt({
|
||||||
|
title: '请输入备注',
|
||||||
|
formType: 2,
|
||||||
|
value: data.recheck_user || '',
|
||||||
|
btn: ['保存', '取消']
|
||||||
|
}, function (value, index, elem) {
|
||||||
|
layer.close(index);
|
||||||
|
updateRemark(data.id, value, function () {
|
||||||
|
table.reload('test');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 初始化:设置默认日期为前一天
|
// 初始化:设置默认日期为前一天
|
||||||
@@ -407,6 +471,7 @@
|
|||||||
|
|
||||||
// 显示详情
|
// 显示详情
|
||||||
function showDetail(data) {
|
function showDetail(data) {
|
||||||
|
currentDetailId = data.id || null;
|
||||||
$("#detail_trade_date").text(data.trade_date || '-');
|
$("#detail_trade_date").text(data.trade_date || '-');
|
||||||
|
|
||||||
let insutypeText = data.insutype;
|
let insutypeText = data.insutype;
|
||||||
@@ -414,7 +479,7 @@
|
|||||||
if(data.insutype === '340') insutypeText = '340-新农合';
|
if(data.insutype === '340') insutypeText = '340-新农合';
|
||||||
if(data.insutype === '390') insutypeText = '390-城乡居民基本医疗保险';
|
if(data.insutype === '390') insutypeText = '390-城乡居民基本医疗保险';
|
||||||
if(data.insutype === '510') insutypeText = '510-公务员医疗补助';
|
if(data.insutype === '510') insutypeText = '510-公务员医疗补助';
|
||||||
if(data.insutype === '99410') insutypeText = '99410-工商保险';
|
if(data.insutype === '99410') insutypeText = '99410-工伤保险';
|
||||||
$("#detail_insutype").text(insutypeText || '-');
|
$("#detail_insutype").text(insutypeText || '-');
|
||||||
|
|
||||||
let clrTypeText = data.clr_type;
|
let clrTypeText = data.clr_type;
|
||||||
@@ -438,7 +503,8 @@
|
|||||||
|
|
||||||
$("#detail_stmt_rslt_dscr").text(data.stmt_rslt_dscr || '-');
|
$("#detail_stmt_rslt_dscr").text(data.stmt_rslt_dscr || '-');
|
||||||
$("#detail_api_result").text(data.api_result || '-');
|
$("#detail_api_result").text(data.api_result || '-');
|
||||||
$("#detail_remark").text(data.recheck_flag === '1' ? '二次核对' : '');
|
$("#detail_remark_flag").html(data.recheck_flag === '1' ? '<span style="color:#409EFF;">二次核对</span>' : '');
|
||||||
|
$("#detail_remark_input").val(data.recheck_user || '');
|
||||||
$("#detail_create_time").text(data.create_time || '-');
|
$("#detail_create_time").text(data.create_time || '-');
|
||||||
|
|
||||||
layer.open({
|
layer.open({
|
||||||
@@ -450,6 +516,16 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function saveDetailRemark() {
|
||||||
|
if (!currentDetailId) {
|
||||||
|
layer.alert('缺少记录ID,无法保存备注', {icon: 2});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
updateRemark(currentDetailId, $("#detail_remark_input").val() || '', function () {
|
||||||
|
table.reload('test');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
function exportExcel() {
|
function exportExcel() {
|
||||||
let url = "/medicalInsuranceReconciliation/exportMedicalInsuranceReconciliationResult";
|
let url = "/medicalInsuranceReconciliation/exportMedicalInsuranceReconciliationResult";
|
||||||
|
|||||||
Reference in New Issue
Block a user