md
This commit is contained in:
parent
348eb5bb74
commit
98f74a7f61
@ -181,7 +181,7 @@ public class EmisSettleInvoiceRecordController extends BaseController
|
|||||||
|
|
||||||
EmisSettleInvoiceRecord old=emisSettleInvoiceRecordService.selectEmisSettleInvoiceRecordById(id);
|
EmisSettleInvoiceRecord old=emisSettleInvoiceRecordService.selectEmisSettleInvoiceRecordById(id);
|
||||||
if(old==null){
|
if(old==null){
|
||||||
return AjaxResult.error("账单不存在");
|
return AjaxResult.error("申请不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
if("2".equals(old.getBlAudit())){
|
if("2".equals(old.getBlAudit())){
|
||||||
@ -208,4 +208,43 @@ public class EmisSettleInvoiceRecordController extends BaseController
|
|||||||
}
|
}
|
||||||
return AjaxResult.success("操作成功");
|
return AjaxResult.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Log(title = "中心驳回", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/auditCenterPass/{ids}")
|
||||||
|
public AjaxResult auditCenterPass(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
if(ids!=null && ids.length>0){
|
||||||
|
for(int i=0;i<ids.length;i++){
|
||||||
|
try {
|
||||||
|
long id=ids[i];
|
||||||
|
|
||||||
|
EmisSettleInvoiceRecord old=emisSettleInvoiceRecordService.selectEmisSettleInvoiceRecordById(id);
|
||||||
|
if(old==null){
|
||||||
|
return AjaxResult.error("申请不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
if("1".equals(old.getBlAudit())){
|
||||||
|
return AjaxResult.error("已审核通过");
|
||||||
|
}
|
||||||
|
|
||||||
|
EmisSettleInvoiceRecord emisSettleInvoiceRecord = new EmisSettleInvoiceRecord();
|
||||||
|
emisSettleInvoiceRecord.setId(id);
|
||||||
|
emisSettleInvoiceRecordService.auditCenterNoPass(emisSettleInvoiceRecord);
|
||||||
|
|
||||||
|
// 重新计算账单开票状态
|
||||||
|
|
||||||
|
}catch (Exception ex){
|
||||||
|
ex.printStackTrace();
|
||||||
|
// 返回子定义异常
|
||||||
|
if(ex instanceof EmisBizError){
|
||||||
|
return AjaxResult.error(ex.getMessage(),((EmisBizError)ex).getErrorCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
return AjaxResult.error("审核异常,联系客服");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return AjaxResult.success("操作成功");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,6 +92,9 @@ public interface EmisSettleInvoiceRecordMapper extends BaseMapper<EmisSettleInvo
|
|||||||
*/
|
*/
|
||||||
public int deleteEmisSettleInvoiceRecordByIds(Long[] ids);
|
public int deleteEmisSettleInvoiceRecordByIds(Long[] ids);
|
||||||
|
|
||||||
|
|
||||||
public int auditCenterNoPass(EmisSettleInvoiceRecord emisSettleInvoiceRecord);
|
public int auditCenterNoPass(EmisSettleInvoiceRecord emisSettleInvoiceRecord);
|
||||||
|
|
||||||
|
public int auditCenterPass(EmisSettleInvoiceRecord emisSettleInvoiceRecord);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,7 +51,7 @@ public interface IEmisSettleInvoiceChRecordService
|
|||||||
* @param emisSettleInvoiceChRecord 渠道开票记录表
|
* @param emisSettleInvoiceChRecord 渠道开票记录表
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertEmisSettleInvoiceChRecord(EmisSettleInvoiceChRecord emisSettleInvoiceChRecord);
|
public int insertEmisSettleInvoiceChRecord(EmisSettleInvoiceChRecord emisSettleInvoiceChRecord) throws EmisBizError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改渠道开票记录表
|
* 修改渠道开票记录表
|
||||||
|
|||||||
@ -87,5 +87,8 @@ public interface IEmisSettleInvoiceRecordService
|
|||||||
public int auditCenterNoPass(EmisSettleInvoiceRecord inputObj) throws EmisBizError;
|
public int auditCenterNoPass(EmisSettleInvoiceRecord inputObj) throws EmisBizError;
|
||||||
|
|
||||||
|
|
||||||
|
public int auditCenterPass(EmisSettleInvoiceRecord inputObj) throws EmisBizError;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -97,16 +97,18 @@ public class EmisSettleInvoiceChRecordServiceImpl implements IEmisSettleInvoiceC
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertEmisSettleInvoiceChRecord(EmisSettleInvoiceChRecord emisSettleInvoiceChRecord)
|
public int insertEmisSettleInvoiceChRecord(EmisSettleInvoiceChRecord emisSettleInvoiceChRecord) throws EmisBizError {
|
||||||
{
|
|
||||||
EmisSettleInvoiceRecord oldApply=emisSettleInvoiceRecordMapper.selectInvoiceRecordByApplySeqNo(emisSettleInvoiceChRecord.getApplySeqNo());
|
EmisSettleInvoiceRecord oldApply=emisSettleInvoiceRecordMapper.selectInvoiceRecordByApplySeqNo(emisSettleInvoiceChRecord.getApplySeqNo());
|
||||||
|
if(!"1".equals(oldApply.getBlAudit()) ){
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL,"未审核通过,不允许开票!");
|
||||||
|
}
|
||||||
|
|
||||||
// 判断对应账单是否存在
|
// 判断对应账单是否存在
|
||||||
String reqNo= WaybillHelper.genOrderSn();
|
String reqNo= WaybillHelper.genOrderSn();
|
||||||
emisSettleInvoiceChRecord.setReqNo(reqNo);
|
emisSettleInvoiceChRecord.setReqNo(reqNo);
|
||||||
emisSettleInvoiceChRecordMapper.insertEmisSettleInvoiceChRecord(emisSettleInvoiceChRecord);
|
emisSettleInvoiceChRecordMapper.insertEmisSettleInvoiceChRecord(emisSettleInvoiceChRecord);
|
||||||
|
|
||||||
// 更新开票状态
|
// 更新开票状态为开票中
|
||||||
EmisSettleInvoiceRecord newApply = new EmisSettleInvoiceRecord();
|
EmisSettleInvoiceRecord newApply = new EmisSettleInvoiceRecord();
|
||||||
newApply.setId(oldApply.getId());
|
newApply.setId(oldApply.getId());
|
||||||
newApply.setInvoiceStatus("1");
|
newApply.setInvoiceStatus("1");
|
||||||
@ -117,11 +119,11 @@ public class EmisSettleInvoiceChRecordServiceImpl implements IEmisSettleInvoiceC
|
|||||||
newApply.setOpSiteCode(SecurityUtils.getLoginUser().getUser().getOwnerSiteCode());
|
newApply.setOpSiteCode(SecurityUtils.getLoginUser().getUser().getOwnerSiteCode());
|
||||||
newApply.setOpDate(new Date());
|
newApply.setOpDate(new Date());
|
||||||
|
|
||||||
// 审核人
|
// // 审核人
|
||||||
newApply.setBlAudit("1");
|
// newApply.setBlAudit("1");
|
||||||
newApply.setAuditManCode(SecurityUtils.getLoginUser().getUser().getEmpCode());
|
// newApply.setAuditManCode(SecurityUtils.getLoginUser().getUser().getEmpCode());
|
||||||
newApply.setAuditDate(new Date());
|
// newApply.setAuditDate(new Date());
|
||||||
newApply.setAuditSiteCode(SecurityUtils.getLoginUser().getUser().getOwnerSiteCode());
|
// newApply.setAuditSiteCode(SecurityUtils.getLoginUser().getUser().getOwnerSiteCode());
|
||||||
|
|
||||||
// 渠道待发送
|
// 渠道待发送
|
||||||
newApply.setOpenChStatus("0");
|
newApply.setOpenChStatus("0");
|
||||||
|
|||||||
@ -253,6 +253,12 @@ public class EmisSettleInvoiceRecordServiceImpl extends EmisBaseService implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中心驳回
|
||||||
|
* @param inputObj
|
||||||
|
* @return
|
||||||
|
* @throws EmisBizError
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int auditCenterNoPass(EmisSettleInvoiceRecord inputObj) throws EmisBizError {
|
public int auditCenterNoPass(EmisSettleInvoiceRecord inputObj) throws EmisBizError {
|
||||||
|
|
||||||
@ -283,5 +289,41 @@ public class EmisSettleInvoiceRecordServiceImpl extends EmisBaseService implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核通过
|
||||||
|
* @param inputObj
|
||||||
|
* @return
|
||||||
|
* @throws EmisBizError
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int auditCenterPass(EmisSettleInvoiceRecord inputObj) throws EmisBizError {
|
||||||
|
|
||||||
|
EmisSettleInvoiceRecord emisSettleInvoiceRecord = emisSettleInvoiceRecordMapper.selectEmisSettleInvoiceRecordById(inputObj.getId());
|
||||||
|
if("1".equals(emisSettleInvoiceRecord.getBlAudit()) ){
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL,"已审核!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 审核通过
|
||||||
|
emisSettleInvoiceRecord.setBlAudit("1");
|
||||||
|
// 开票中
|
||||||
|
emisSettleInvoiceRecord.setInvoiceStatus("1");
|
||||||
|
emisSettleInvoiceRecord.setAuditManCode(getCurrentUser().getEmpCode());
|
||||||
|
emisSettleInvoiceRecord.setAuditSiteCode(getCurrentUser().getOwnerSiteCode());
|
||||||
|
|
||||||
|
// 审核通过
|
||||||
|
emisSettleInvoiceRecordMapper.auditCenterPass(emisSettleInvoiceRecord);
|
||||||
|
|
||||||
|
// 重新计算开票状态
|
||||||
|
String[] settleBillArr=emisSettleInvoiceRecord.getSettleBillNo().split(",");
|
||||||
|
for(int i=0;i<settleBillArr.length;i++){
|
||||||
|
reCalcSettleBillInvoiceInfo(settleBillArr[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -425,6 +425,16 @@
|
|||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="auditCenterPass" parameterType="EmisSettleInvoiceRecord">
|
||||||
|
update emis_settle_invoice_record
|
||||||
|
set bl_audit='1',
|
||||||
|
invoice_status='1',
|
||||||
|
audit_date=now(),
|
||||||
|
audit_man_code = #{auditManCode},
|
||||||
|
audit_site_code = #{auditSiteCode}
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
<update id="auditCenterNoPass" parameterType="EmisSettleInvoiceRecord">
|
<update id="auditCenterNoPass" parameterType="EmisSettleInvoiceRecord">
|
||||||
update emis_settle_invoice_record
|
update emis_settle_invoice_record
|
||||||
set bl_audit='2',
|
set bl_audit='2',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user