Commit 369bc32d authored by 徐州's avatar 徐州

非税通知书-自动缴销需求提交

parent 4bea66da
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
{ {
window.location.href="${ctx}/jsp/accountBank/downloadFile.action?attachId="+id; window.location.href="${ctx}/jsp/accountBank/downloadFile.action?attachId="+id;
} }
function viewFs(fsId) {
createSimpleWindow("win_fstzs","打印非税通知书","${ctx}/jsp/fstzs/winPrintFstzs.action?id=" + fsId,900,700);
}
</script> </script>
</head> </head>
<body> <body>
...@@ -30,6 +34,17 @@ ...@@ -30,6 +34,17 @@
<td width="35%" >${accountBank.remark}</td> <td width="35%" >${accountBank.remark}</td>
</tr> </tr>
<c:if test="${accountBank.hasInvoice == 0}"> <c:if test="${accountBank.hasInvoice == 0}">
<c:choose>
<c:when test="${not empty accountBank.fsId}">
<tr>
<th width="15%">附件</th>
<td colspan="4" style="text-align: left;">
<a href="#" class="btn_01" onclick=viewFs('${accountBank.fsId}');>查看<b></b></a>
</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach var="c" items="${attach}" varStatus="status"> <c:forEach var="c" items="${attach}" varStatus="status">
<tr> <tr>
<th width="15%">附件${status.count}</th> <th width="15%">附件${status.count}</th>
...@@ -38,6 +53,10 @@ ...@@ -38,6 +53,10 @@
</td> </td>
</tr> </tr>
</c:forEach> </c:forEach>
</c:otherwise>
</c:choose>
</c:if> </c:if>
<tr> <tr>
</tr> </tr>
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
<tr> <tr>
<th width="15">应缴总面积(平方米)</th> <th width="15">应缴总面积(平方米)</th>
<td width="35%"> <td width="35%">
<input id="csmj" name="fstzsXm.paymentItemPending.csmj" style="width:90%" value="${fstzsXm.paymentItemPending.csmj}" disabled/> <input id="csmj" name="fstzsXm.xmxxb.csmj" style="width:90%" value="${fstzsXm.xmxxb.csmj}" disabled/>
</td> </td>
<th width="15">收费标准(元)</th> <th width="15">收费标准(元)</th>
...@@ -396,12 +396,11 @@ ...@@ -396,12 +396,11 @@
}else if (typeof(num) === 'number' && isNaN(num)) { }else if (typeof(num) === 'number' && isNaN(num)) {
$.messager.alert('提示', '请输入正确的数字!'); $.messager.alert('提示', '请输入正确的数字!');
} else { } else {
//计算应缴面积 //计算应缴面积
var yjmjNums = numb / 150 var yjmjNums = numb / 150
var x = String(yjmjNums).indexOf(".")+1;//得到小数点的位置 var x = String(yjmjNums).indexOf(".")+1;//得到小数点的位置
var y = String(yjmjNums).length - x;//小数点的位数 var y = String(yjmjNums).length - x;//小数点的位数
if(y > 2) { if(x != 0 && y > 2) {
$.messager.alert('提示', '请输入正确的应缴金额!'); $.messager.alert('提示', '请输入正确的应缴金额!');
$(this).parent().prev().text(''); $(this).parent().prev().text('');
return false; return false;
......
...@@ -53,10 +53,10 @@ ...@@ -53,10 +53,10 @@
} }
}}, }},
{field:'zyjje',title:'项目总应缴金额',width:150,formatter: function (value, row, index){ {field:'zyjje',title:'项目总应缴金额',width:150,formatter: function (value, row, index){
return (parseFloat(row.paymentItemPending.zyjje).toFixed(2) + '').replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,'); return (parseFloat(row.xmxxb.yjje).toFixed(2) + '').replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,');
}}, }},
{field:'jzmj',title:'总建筑面积',width:150,formatter: function (value, row, index){ {field:'jzmj',title:'总建筑面积',width:150,formatter: function (value, row, index){
return row.paymentItemPending.csmj; return row.xmxxb.csmj;
}} }}
]] ]]
})); }));
......
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
<tr> <tr>
<th width="15">应缴总面积(平方米)</th> <th width="15">应缴总面积(平方米)</th>
<td width="35%"> <td width="35%">
<input id="csmj" name="fstzsXm.paymentItemPending.csmj" style="width:90%" value="${fstzsXm.paymentItemPending.csmj}" disabled/> <input id="csmj" name="fstzsXm.xmxxb.csmj" style="width:90%" value="${fstzsXm.xmxxb.csmj}" disabled/>
</td> </td>
<th width="15">收费标准(元)</th> <th width="15">收费标准(元)</th>
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
function dayin(id){ function dayin(id){
var dt=new Date(); var dt=new Date();
createSimpleWindow("win_fstzs","打印非税通知书","${ctx}/jsp/fstzs/winPrintFstzs.action?id=" + id,900,700); createSimpleWindow("win_fstzs","打印非税通知书","${ctx}/jsp/fstzs/winPrintFstzs.action?id=" + id,900,700);
} }
function reloadDate(){ function reloadDate(){
......
...@@ -120,10 +120,10 @@ ...@@ -120,10 +120,10 @@
} }
}}, }},
{field:'zyjje',title:'项目总应缴金额',width:150,formatter: function (value, row, index){ {field:'zyjje',title:'项目总应缴金额',width:150,formatter: function (value, row, index){
return (parseFloat(row.paymentItemPending.zyjje).toFixed(2) + '').replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,'); return (parseFloat(row.xmxxb.yjje).toFixed(2) + '').replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,');
}}, }},
{field:'jzmj',title:'总建筑面积',width:100,formatter: function (value, row, index){ {field:'jzmj',title:'总建筑面积',width:100,formatter: function (value, row, index){
return row.paymentItemPending.csmj; return row.xmxxb.csmj;
}}, }},
{field:'status',title:'是否复核',width:80,formatter: function (value, row, index){ {field:'status',title:'是否复核',width:80,formatter: function (value, row, index){
if (value == 1) return "待复核"; if (value == 1) return "待复核";
......
...@@ -93,6 +93,11 @@ public class AccountBank extends BaseModel ...@@ -93,6 +93,11 @@ public class AccountBank extends BaseModel
*/ */
private String sysType; private String sysType;
/**
* 如果是由非税查询状态时,自动插入的数据,则存一下fs记录的id
*/
private String fsId;
public AccountBank(){ public AccountBank(){
} }
...@@ -235,4 +240,12 @@ public class AccountBank extends BaseModel ...@@ -235,4 +240,12 @@ public class AccountBank extends BaseModel
public void setSysType(String sysType) { public void setSysType(String sysType) {
this.sysType = sysType; this.sysType = sysType;
} }
public String getFsId() {
return fsId;
}
public void setFsId(String fsId) {
this.fsId = fsId;
}
} }
...@@ -276,7 +276,7 @@ public class AccountBankServiceImpl extends BaseServiceImpl implements AccountBa ...@@ -276,7 +276,7 @@ public class AccountBankServiceImpl extends BaseServiceImpl implements AccountBa
String ECN = "PZ"+xmxxb.getBllb()+xmxxb.getDwdm().toUpperCase()+genericManager.getSN("dzpz"); String ECN = "PZ"+xmxxb.getBllb()+xmxxb.getDwdm().toUpperCase()+genericManager.getSN("dzpz");
paymentItemHis.setECN(ECN); paymentItemHis.setECN(ECN);
//转入已缴款项目 //转入已缴款项目
paymentItemHisDao.save(paymentItemHis); paymentItemHisDao.save(paymentItemHis);//???
//清除待缴款项目 //清除待缴款项目
paymentItemPendingDao.delete(paymentItemPending.getId()); paymentItemPendingDao.delete(paymentItemPending.getId());
//若是催缴项目,则需要清除催缴记录 //若是催缴项目,则需要清除催缴记录
......
...@@ -136,6 +136,12 @@ public class Fstzs extends BaseModel { ...@@ -136,6 +136,12 @@ public class Fstzs extends BaseModel {
*/ */
private String jkqd; private String jkqd;
/**
* 缴款渠道
* 11柜面缴款和13网上缴款
*/
private String jkqdCode;
/** /**
* 操作激活的时间 * 操作激活的时间
*/ */
...@@ -416,4 +422,12 @@ public class Fstzs extends BaseModel { ...@@ -416,4 +422,12 @@ public class Fstzs extends BaseModel {
public void setYjjeQfw(String yjjeQfw) { public void setYjjeQfw(String yjjeQfw) {
this.yjjeQfw = yjjeQfw; this.yjjeQfw = yjjeQfw;
} }
public String getJkqdCode() {
return jkqdCode;
}
public void setJkqdCode(String jkqdCode) {
this.jkqdCode = jkqdCode;
}
} }
...@@ -101,10 +101,8 @@ public class FstzsXm extends BaseModel ...@@ -101,10 +101,8 @@ public class FstzsXm extends BaseModel
*/ */
private String fhyj; private String fhyj;
/**
* 对应项目信息主键 private Xmxxb xmxxb;
*/
private PaymentItemPending paymentItemPending;
/** /**
* 对应的收款人 * 对应的收款人
...@@ -118,6 +116,11 @@ public class FstzsXm extends BaseModel ...@@ -118,6 +116,11 @@ public class FstzsXm extends BaseModel
*/ */
private String jhjd; private String jhjd;
/**
* 项目是否缴销
*/
private Integer isJx;
public Integer getStatus() { public Integer getStatus() {
return status; return status;
...@@ -215,14 +218,14 @@ public class FstzsXm extends BaseModel ...@@ -215,14 +218,14 @@ public class FstzsXm extends BaseModel
this.yjjedx = yjjedx; this.yjjedx = yjjedx;
} }
@ManyToOne(fetch = FetchType.EAGER, targetEntity=PaymentItemPending.class) @ManyToOne(fetch = FetchType.EAGER, targetEntity=Xmxxb.class)
@JoinColumn(name = "PENDING_ZJ",updatable=false,insertable=true) @JoinColumn(name = "XMXXB_ZJ",updatable=false,insertable=true)
public PaymentItemPending getPaymentItemPending() { public Xmxxb getXmxxb() {
return paymentItemPending; return xmxxb;
} }
public void setPaymentItemPending(PaymentItemPending paymentItemPending) { public void setXmxxb(Xmxxb xmxxb) {
this.paymentItemPending = paymentItemPending; this.xmxxb = xmxxb;
} }
@ManyToOne(fetch = FetchType.EAGER, targetEntity=Kpsjgl.class) @ManyToOne(fetch = FetchType.EAGER, targetEntity=Kpsjgl.class)
...@@ -261,4 +264,11 @@ public class FstzsXm extends BaseModel ...@@ -261,4 +264,11 @@ public class FstzsXm extends BaseModel
this.jkrlx = jkrlx; this.jkrlx = jkrlx;
} }
public Integer getIsJx() {
return isJx;
}
public void setIsJx(Integer isJx) {
this.isJx = isJx;
}
} }
...@@ -14,11 +14,17 @@ public class JkztResp { ...@@ -14,11 +14,17 @@ public class JkztResp {
public String confirmDate; public String confirmDate;
/** /**
* 缴款渠道(代码) * 缴款渠道
*/ */
@SerializedName("payment_channel") @SerializedName("payment_channel")
public String paymentChannel; public String paymentChannel;
/**
* 缴款渠道(代码)
*/
@SerializedName("payment_channel_code")
public String paymentChannelCode;
/** /**
* 缴款银行 * 缴款银行
*/ */
......
...@@ -2,6 +2,17 @@ package com.jshx.fstzs.web; ...@@ -2,6 +2,17 @@ package com.jshx.fstzs.web;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.jshx.account.accountBank.entity.AccountBank;
import com.jshx.account.accountBank.service.AccountBankService;
import com.jshx.account.paymentVoucher.service.PaymentVoucherService;
import com.jshx.account.paymentVoucherHis.entity.PaymentVoucherHis;
import com.jshx.account.paymentVoucherHis.service.PaymentVoucherHisService;
import com.jshx.billManager.entity.BillManager;
import com.jshx.billManager.entity.Indeticur;
import com.jshx.billManager.service.BillManagerService;
import com.jshx.billlq.entity.Billlq;
import com.jshx.billlq.service.BilllqService;
import com.jshx.common.utils.Constant;
import com.jshx.common.utils.NumberToCN; import com.jshx.common.utils.NumberToCN;
import com.jshx.core.base.action.BaseAction; import com.jshx.core.base.action.BaseAction;
import com.jshx.core.base.vo.Pagination; import com.jshx.core.base.vo.Pagination;
...@@ -17,10 +28,20 @@ import com.jshx.fstzs.fsutil.bean.KpResp; ...@@ -17,10 +28,20 @@ import com.jshx.fstzs.fsutil.bean.KpResp;
import com.jshx.fstzs.service.FstzsService; import com.jshx.fstzs.service.FstzsService;
import com.jshx.fstzs.service.FstzsXmService; import com.jshx.fstzs.service.FstzsXmService;
import com.jshx.fstzs.fsutil.FsRequest; import com.jshx.fstzs.fsutil.FsRequest;
import com.jshx.jtqd.entity.Jtqd;
import com.jshx.jtqd.service.JtqdService;
import com.jshx.kpsjgl.service.KpsjglService; import com.jshx.kpsjgl.service.KpsjglService;
import com.jshx.module.admin.service.UserRoleService;
import com.jshx.paymentItemDelay.entity.PaymentItemDelay;
import com.jshx.paymentItemDelay.service.PaymentItemDelayService;
import com.jshx.paymentItemHis.entity.PaymentItemHis;
import com.jshx.paymentItemHis.service.PaymentItemHisService;
import com.jshx.pjjx.entity.Pjjx;
import com.jshx.pjjx.service.PjjxService;
import com.jshx.xmxxb.entity.Xmxxb; import com.jshx.xmxxb.entity.Xmxxb;
import com.jshx.xmxxb.service.XmxxbService; import com.jshx.xmxxb.service.XmxxbService;
import com.neusoft.egov.utils.TextUtils; import com.neusoft.egov.utils.TextUtils;
import com.neusoft.egov.utils.billendnumber;
import net.sf.json.JsonConfig; import net.sf.json.JsonConfig;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -45,6 +66,40 @@ public class FstzsAction extends BaseAction { ...@@ -45,6 +66,40 @@ public class FstzsAction extends BaseAction {
@Autowired @Autowired
KpsjglService kpsjglService; KpsjglService kpsjglService;
/**
* 缴费到账入库↓
*/
@Autowired
private UserRoleService userRoleService;
@Autowired
private AccountBankService accountBankService;
/**
* 缴费到账入库↑
*/
/**
* 票据领用缴销↓
*/
@Autowired
private BillManagerService billManagerService;
@Autowired
private PaymentVoucherService paymentVoucherService;
@Autowired
private PaymentVoucherHisService paymentVoucherHisService;
@Autowired
private BilllqService billlqService;
@Autowired
private PjjxService pjjxService;
@Autowired
private PaymentItemDelayService paymentItemDelayService;
@Autowired
private PaymentItemHisService paymentItemHisService;
@Autowired
private JtqdService jtqdService;
/**
* 票据领用缴销↑
*/
/** /**
* 分页信息 * 分页信息
*/ */
...@@ -231,15 +286,12 @@ public class FstzsAction extends BaseAction { ...@@ -231,15 +286,12 @@ public class FstzsAction extends BaseAction {
Fstzs f = new Fstzs(); Fstzs f = new Fstzs();
f.setJkr(fstzsXm.getJsdwmc()); f.setJkr(fstzsXm.getJsdwmc());
f.setYjje(fstzsXm.getYjje()); f.setYjje(fstzsXm.getYjje());
f.setYjmj(fstzsXm.getPaymentItemPending().getCsmj()); f.setYjmj(fstzsXm.getXmxxb().getCsmj());
fstzsList.add(f); fstzsList.add(f);
} }
if(TextUtils.isEmpty(fstzsXm.getMobile())) { if(TextUtils.isEmpty(fstzsXm.getMobile())) {
Xmxxb bySlbh = xmxxbService.getBySlbh(fstzsXm.getSlbh()); fstzsXm.setMobile(fstzsXm.getXmxxb().getPhone());
if(bySlbh != null) {
fstzsXm.setMobile(bySlbh.getPhone());
}
} }
} catch (Exception e) {} } catch (Exception e) {}
return VIEW; return VIEW;
...@@ -497,6 +549,7 @@ public class FstzsAction extends BaseAction { ...@@ -497,6 +549,7 @@ public class FstzsAction extends BaseAction {
} }
this.getResponse().getWriter().println("{\"result\":"+result+",\"message\":\"" + message + "!"+"\"}"); this.getResponse().getWriter().println("{\"result\":"+result+",\"message\":\"" + message + "!"+"\"}");
jiaoxiao(xm);
} }
...@@ -559,18 +612,206 @@ public class FstzsAction extends BaseAction { ...@@ -559,18 +612,206 @@ public class FstzsAction extends BaseAction {
//1,查询全部未激活的信息 //1,查询全部未激活的信息
List<Fstzs> list = fstzsService.findList(paraMap); List<Fstzs> list = fstzsService.findList(paraMap);
list.stream().map(i-> { list.stream().map(i -> {
//2,循环接口请求缴费状态 //2,循环接口请求缴费状态
FsResult<JkztResp> jiaokuanzt = FsRequest.jiaokuanzt(i); FsResult<JkztResp> jiaokuanzt = FsRequest.jiaokuanzt(i);
if(jiaokuanzt.success) { if (jiaokuanzt.success) {
i.setStatus(3);//已缴款 i.setStatus(3);//已缴款
i.setIsJk(1); i.setIsJk(1);
i.setJkTime(jiaokuanzt.data.confirmDate); i.setJkTime(jiaokuanzt.data.confirmDate);
i.setJkqd(jiaokuanzt.data.paymentChannel); i.setJkqd(jiaokuanzt.data.paymentChannel);
i.setJkqdCode(jiaokuanzt.data.paymentChannelCode);
fstzsService.update(i); fstzsService.update(i);
} }
return i; return i;
}).forEach(i-> System.out.println("查询缴费状态!")); }).filter(i-> i.getIsJk() == 1 && "13".equals(i.getJkqdCode()))//筛选出网上缴款的单子
.forEach(i-> {//存入银行到账表
AccountBank accountBank = new AccountBank();
accountBank.setFsId(i.getId());
String sysType = userRoleService.childSysType(getLoginUser());
accountBank.setSysType(sysType);
accountBank.setDelFlag(0);
accountBank.setRemark("线上缴款");
accountBank.setDeptId(this.getLoginUserDepartmentId());
accountBank.setStatus(Constant.AUDIT_STATUS_NO);
accountBank.setDevelopUnit(i.getJkr());
accountBank.setAmount(Double.parseDouble(i.getYjje()));
accountBank.setArrivalTime(new Date());
accountBank.setHasInvoice("0");
accountBankService.save(accountBank,null,null);
});
}
private void jiaoxiao(FstzsXm xm) {
if(xm == null) return;
if(xm.getIsJx() != null && xm.getIsJx() == 1) return;
Map<String, Object> paraMap = new HashMap();
paraMap.put("slbh",new ArrayList<String>(){{
add(xm.getSlbh());
}});
//查询项目的所有缴款人
List<Fstzs> fsList = fstzsService.findList(paraMap);
if(fsList == null || fsList.size() == 0) return;
//筛选出未交款的列表
List<Fstzs> wjk = fsList.stream().filter(i -> i.getIsJk() != 1).collect(Collectors.toList());
if(wjk != null && wjk.size() > 0) return;//有人未交款,不处理
//未开票
List<Fstzs> wkp = fsList.stream().filter(i -> i.getKpState() == null || i.getKpState() == 0).collect(Collectors.toList());
if(wkp != null && wkp.size() > 0) return;//有人开票,不处理
try {
uploadVoucherInfotb(xm,fsList);
xm.setIsJx(1);
fstzsXmService.update(xm);
} catch (Exception e) {
e.printStackTrace();
}
}
public void uploadVoucherInfotb(FstzsXm xm,List<Fstzs> fstzsList) throws Exception{
// String result ="1|成功";
PaymentVoucherHis paymentVoucherHis = new PaymentVoucherHis();
paymentVoucherHis.setXmmc(xm.getGcxmmc());
paymentVoucherHis.setPayerName(xm.getJsdwmc());
paymentVoucherHis.setZsdw(xm.getKpsjgl().getZsdw());
paymentVoucherHis.setZsdwbm(xm.getKpsjgl().getZsdwbm());
paymentVoucherHis.setQhm(xm.getKpsjgl().getQhm());
paymentVoucherHis.setSkrzh(xm.getKpsjgl().getSkrzh());
paymentVoucherHis.setSkrkhh(xm.getKpsjgl().getSkrkhh());
paymentVoucherHis.setSrxmmc(xm.getKpsjgl().getSrxmmc());
paymentVoucherHis.setArea(xm.getXmxxb().getCsmj());
paymentVoucherHis.setPayType("0");
paymentVoucherHis.setPayMethod("1");
// TODO paymentVoucherHis.setVoucherCode(???);凭证编号???
paymentVoucherHis.setDelFlag(0);
paymentVoucherHis.setDeptId(this.getLoginUserDepartmentId());
paymentVoucherHis.setOperator(this.getLoginUser().getDisplayName());
paymentVoucherHis.setPrintDate(new Date());
paymentVoucherHis.setApplyStatus(Constant.VOUCHER_USE_STATUS_0);
paymentVoucherHis.setMessage("上报:成功");
String pjbz="";
pjbz="关联编号:"+paymentVoucherHis.getVoucherCode()+".";
paymentVoucherHis.setDestroyStatus(Constant.VOUCHER_DESTROY_STATUS_1);//TODO 默认已缴销
PaymentItemHis byXmbId = paymentItemHisService.getByXmbId(xm.getXmxxb().getId());
//四位全局校验码
for(Fstzs f : fstzsList) {
BigDecimal areaBd = new BigDecimal(paymentVoucherHis.getArea());
String area = areaBd.setScale(2, BigDecimal.ROUND_HALF_UP).toString();
BigDecimal amountBd = new BigDecimal(paymentVoucherHis.getAmount());
String amount = amountBd.setScale(2, BigDecimal.ROUND_HALF_UP).toString();
paymentVoucherHis.setAmount(f.getYjje());
//模拟票据领取发放功能
List<Indeticur> list = new ArrayList<Indeticur>();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String startNo =f.getJkm();
String endNo = f.getJkm();
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
String no = f.getJkm();
Indeticur indeticur = new Indeticur();
indeticur.setDelFlag(0);
indeticur.setIsrece(0);
indeticur.setNo(no);
indeticur.setIsprint("0");
indeticur.setState("1");
indeticur.setSort(0);
indeticur.setRkTime(sdf.format(new Date()));
indeticur.setSequenceID(uuid);
indeticur.setIsrece(1);
indeticur.setPerson(this.getLoginUser().getDisplayName());
indeticur.setState("1");
indeticur.setZsdw("市收费处");
list.add(indeticur);
// 批量插入indeticur然后更新billManager
billManagerService.batchupdate(list);
BillManager billManager = new BillManager();
// billManager.setCount("1");
billManager.setDeptId(this.getLoginUser().getDept().getId());
billManager.setDelFlag(0);
billManager.setEndno(endNo);
billManager.setRktime(sdf.format(new Date()));
billManager.setStartno(startNo);
billManager.setSequentID(uuid);
billManagerService.save(billManager);
Billlq billlq = new Billlq();
billlq.setCount("1");
billlq.setPerson(this.getLoginUser().getDisplayName());
billlq.setDeptId(this.getLoginUser().getDept().getId());
billlq.setZsdw(this.getLoginUser().getDept().getDeptName());
billlq.setDelFlag(0);
billlq.setStartno(startNo);
billlq.setEndno(endNo);
billlq.setLqtime(sdf.format(new Date()));
billlqService.save(billlq);
paymentVoucherHis.setVoucherCode(f.getJkm());
paymentVoucherService.addtb(paymentVoucherHis, "1", "0", byXmbId.getId(),pjbz);
PaymentVoucherHis paymentVoucherHis1 = paymentVoucherHisService.getByVoucherCode(f.getJkm());
//缴销
Pjjx pjjx = new Pjjx();
pjjx.setDeptId(this.getLoginUserDepartmentId());
pjjx.setDelFlag(0);
pjjx.setPjbm(paymentVoucherHis1.getVoucherCode());
pjjx.setJbr(paymentVoucherHis1.getOperator());
pjjx.setJkrqc(paymentVoucherHis1.getPayerName());
pjjx.setSalary(paymentVoucherHis1.getAmount());
pjjx.setState(paymentVoucherHis1.getApplyStatus());
pjjx.setRkdate(new SimpleDateFormat("yyyy-MM").format(new Date()));
pjjx.setSlbh(paymentVoucherHis1.getOrderId());
pjjx.setDwdm(paymentVoucherHis1.getDwdm());
pjjx.setPayITEMid(paymentVoucherHis1.getRelateId());
pjjx.setZsdw(paymentVoucherHis1.getZsdw());
pjjx.setZsfw(xm.getXmxxb().getZsfw());
Calendar cal=Calendar.getInstance();
cal.setTime(new Date());
int month = cal.get(Calendar.MONTH)+1;
if(month == 1 || month ==2 || month ==3){
pjjx.setSeason(pjjx.getRkdate().substring(0, 4)+ "年01季度");
}
else if(month == 4 || month ==5 || month ==6){
pjjx.setSeason(pjjx.getRkdate().substring(0, 4)+ "年02季度");
}
else if(month == 7 || month ==8 || month ==9){
pjjx.setSeason(pjjx.getRkdate().substring(0, 4)+ "年03季度");
}
else if(month == 10 || month ==11 || month ==12){
pjjx.setSeason(pjjx.getRkdate().substring(0, 4)+ "年04季度");
}
pjjxService.save(pjjx);
Jtqd tfqd=new Jtqd();
tfqd.setDelFlag(0);
tfqd.setSlbh(pjjx.getSlbh());
tfqd.setSequenceId(com.fr.stable.core.UUID.randomUUID().toString().replaceAll("-", ""));
//.setIszd();
tfqd.setPzlx("0");
tfqd.setSalary(pjjx.getSalary());
tfqd.setXmmc(xm.getXmxxb().getXmmc());
tfqd.setZsdw(xm.getXmxxb().getZsdw());
tfqd.setZsdm(xm.getXmxxb().getDwdm());
tfqd.setRkdate(pjjx.getRkdate());
jtqdService.save(tfqd);
}
} }
public Pagination getPagination() { public Pagination getPagination() {
...@@ -596,7 +837,6 @@ public class FstzsAction extends BaseAction { ...@@ -596,7 +837,6 @@ public class FstzsAction extends BaseAction {
public void setFstzsXm(FstzsXm fstzsXm) { public void setFstzsXm(FstzsXm fstzsXm) {
this.fstzsXm = fstzsXm; this.fstzsXm = fstzsXm;
} }
public Integer getStatus() { public Integer getStatus() {
return status; return status;
} }
......
...@@ -254,7 +254,7 @@ public class PaymentItemPendingServiceImpl extends BaseServiceImpl implements Pa ...@@ -254,7 +254,7 @@ public class PaymentItemPendingServiceImpl extends BaseServiceImpl implements Pa
this.save(dj); this.save(dj);
//保存项目到非税通知书表 //保存项目到非税通知书表
FstzsXm xm = new FstzsXm(); FstzsXm xm = new FstzsXm();
xm.setPaymentItemPending(dj); xm.setXmxxb(xmb);
//获取收款人信息保存到项目中 //获取收款人信息保存到项目中
HashMap<String, Object> param = new HashMap<>(); HashMap<String, Object> param = new HashMap<>();
param.put("gllb","001"); param.put("gllb","001");
......
...@@ -18,6 +18,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -18,6 +18,7 @@ import javax.servlet.http.HttpServletResponse;
import com.jshx.fstzs.entity.FstzsXm; import com.jshx.fstzs.entity.FstzsXm;
import com.jshx.fstzs.service.FstzsXmService; import com.jshx.fstzs.service.FstzsXmService;
import com.jshx.xmxxb.service.XmxxbService;
import org.apache.struts2.ServletActionContext; import org.apache.struts2.ServletActionContext;
import org.hibernate.LobHelper; import org.hibernate.LobHelper;
import org.hibernate.SessionFactory; import org.hibernate.SessionFactory;
...@@ -54,6 +55,9 @@ public class PaymentItemPendingAction extends BaseAction ...@@ -54,6 +55,9 @@ public class PaymentItemPendingAction extends BaseAction
*/ */
private PaymentItemPending paymentItemPending = new PaymentItemPending(); private PaymentItemPending paymentItemPending = new PaymentItemPending();
@Autowired
private XmxxbService xmxxbService;
/** /**
* 业务类 * 业务类
*/ */
...@@ -190,7 +194,7 @@ public class PaymentItemPendingAction extends BaseAction ...@@ -190,7 +194,7 @@ public class PaymentItemPendingAction extends BaseAction
* 入paymentItemPending表同时,入FstzsXm表 * 入paymentItemPending表同时,入FstzsXm表
*/ */
FstzsXm xm = new FstzsXm(); FstzsXm xm = new FstzsXm();
xm.setPaymentItemPending(paymentItemPending); xm.setXmxxb(xmxxbService.getById(paymentItemPending.getXmbzj()));
xm.setDelFlag(0); xm.setDelFlag(0);
xm.setStatus(0); xm.setStatus(0);
...@@ -208,7 +212,7 @@ public class PaymentItemPendingAction extends BaseAction ...@@ -208,7 +212,7 @@ public class PaymentItemPendingAction extends BaseAction
FstzsXm xm = fstzsXmService.getBySlbh(paymentItemPending.getSlbh()); FstzsXm xm = fstzsXmService.getBySlbh(paymentItemPending.getSlbh());
if(xm == null) { if(xm == null) {
xm = new FstzsXm(); xm = new FstzsXm();
xm.setPaymentItemPending(paymentItemPending); xm.setXmxxb(xmxxbService.getById(paymentItemPending.getXmbzj()));
xm.setDelFlag(0); xm.setDelFlag(0);
xm.setStatus(0); xm.setStatus(0);
xm.setJsdwmc(paymentItemPending.getDwmc()); xm.setJsdwmc(paymentItemPending.getDwmc());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment