|
@@ -16,14 +16,12 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
|
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
+import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
import com.ruoyi.finance.domain.TFee;
|
|
|
import com.ruoyi.finance.domain.TFeeDo;
|
|
|
import com.ruoyi.finance.domain.TWareHouseFees;
|
|
|
-import com.ruoyi.finance.excel.Charge;
|
|
|
-import com.ruoyi.finance.excel.Contrast;
|
|
|
-import com.ruoyi.finance.excel.Detailed;
|
|
|
-import com.ruoyi.finance.excel.Payment;
|
|
|
+import com.ruoyi.finance.excel.*;
|
|
|
import com.ruoyi.finance.mapper.TFeeDoMapper;
|
|
|
import com.ruoyi.finance.mapper.TFeeMapper;
|
|
|
import com.ruoyi.finance.service.ITFeeService;
|
|
@@ -48,7 +46,6 @@ import com.ruoyi.warehouseBusiness.mapper.TWarehouseBillsMapper;
|
|
|
import com.ruoyi.warehouseBusiness.mapper.TWarehousebillsfeesMapper;
|
|
|
import com.ruoyi.warehouseBusiness.service.impl.BillnoSerialServiceImpl;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
@@ -56,10 +53,8 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
-import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
-import java.time.temporal.TemporalAccessor;
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
@@ -70,6 +65,7 @@ import java.util.*;
|
|
|
*/
|
|
|
@Service
|
|
|
public class TFeeServiceImpl implements ITFeeService {
|
|
|
+
|
|
|
@Autowired
|
|
|
private TFeeMapper tFeeMapper;
|
|
|
|
|
@@ -121,10 +117,19 @@ public class TFeeServiceImpl implements ITFeeService {
|
|
|
String feeName = null;
|
|
|
|
|
|
TFee tFee = tFeeMapper.selectTFeeById(fId);
|
|
|
- if (StringUtils.isNotNull(tFee.getfCorpid())) {
|
|
|
+
|
|
|
+ if (tFee != null) {
|
|
|
+ String fCtrlcorpid = tFee.getfCtrlcorpid();
|
|
|
+ if (fCtrlcorpid != null && !"".equals(fCtrlcorpid)) {
|
|
|
+ Long aLong = Long.valueOf(fCtrlcorpid);
|
|
|
+ tFee.setfCtrlcorpidLong(aLong);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotNull(tFee.getfCorpid())) {
|
|
|
+ corpsId.add(tFee.getfCorpid());
|
|
|
+ }
|
|
|
corpsId.add(tFee.getfCorpid());
|
|
|
}
|
|
|
- corpsId.add(tFee.getfCorpid());
|
|
|
|
|
|
// 查询从表数据
|
|
|
TFeeDo tFeeDo = new TFeeDo();
|
|
@@ -142,76 +147,40 @@ public class TFeeServiceImpl implements ITFeeService {
|
|
|
if (tFees != null){
|
|
|
feeName = tFees.getfName();
|
|
|
}
|
|
|
- // 费用表数据
|
|
|
- TWarehousebillsfees tWarehousebillsfees = tWarehousebillsfeesMapper.selectTWarehousebillsfeesById(fees.getfSrcid());
|
|
|
- if (tWarehousebillsfees == null) {
|
|
|
- return AjaxResult.error("费用数据为空,请确认");
|
|
|
- }
|
|
|
// 字典宝
|
|
|
SysDictData sysDictData = new SysDictData();
|
|
|
sysDictData.setDictType("data_unitfees");
|
|
|
- sysDictData.setDictValue(String.valueOf(tWarehousebillsfees.getfFeeunitid()));
|
|
|
sysDictData.setStatus("0");
|
|
|
List<SysDictData> sysDictDataList = iSysDictDataService.selectDictDataList(sysDictData);
|
|
|
|
|
|
- List<SysDictData> sysDictDataListIn = new ArrayList<>();
|
|
|
- SysDictData sysDictDataIn = new SysDictData();
|
|
|
- if (tWarehousebillsfees.getfBilltype().equals("SJRK")) {
|
|
|
- sysDictData.setDictType("st_in_type");
|
|
|
- sysDictData.setDictValue(String.valueOf(tWarehousebillsfees.getfBusinessType()));
|
|
|
- sysDictData.setStatus("0");
|
|
|
- sysDictDataListIn = iSysDictDataService.selectDictDataList(sysDictData);
|
|
|
- } else if (tWarehousebillsfees.getfBilltype().equals("SJCK")) {
|
|
|
- sysDictData.setDictType("st_out_type");
|
|
|
- sysDictData.setDictValue(String.valueOf(tWarehousebillsfees.getfBusinessType()));
|
|
|
- sysDictData.setStatus("0");
|
|
|
- sysDictDataListIn = iSysDictDataService.selectDictDataList(sysDictData);
|
|
|
- } else if (tWarehousebillsfees.getfBilltype().equals("CKDB") | tWarehousebillsfees.getfBilltype().equals("HWTG")) {
|
|
|
- sysDictData.setDictType("st_trans_type");
|
|
|
- sysDictData.setDictValue(String.valueOf(tWarehousebillsfees.getfBusinessType()));
|
|
|
- sysDictData.setStatus("0");
|
|
|
- sysDictDataListIn = iSysDictDataService.selectDictDataList(sysDictData);
|
|
|
- }
|
|
|
map1.put("fId", fees.getfId());
|
|
|
+ map1.put("fPId", fees.getfPid());
|
|
|
map1.put("fSrcid", fees.getfSrcid());
|
|
|
map1.put("fSrcpid", fees.getfSrcpid());
|
|
|
- map1.put("fMblno", tWarehousebillsfees.getfMblno());
|
|
|
map1.put("fBscorpno", tWarehousebills.getfBscorpno());
|
|
|
- map1.put("fProductName", tWarehousebillsfees.getfProductName());
|
|
|
- map1.put("fBsdate", tWarehousebillsfees.getfBsdate());
|
|
|
+ Date fBsdate = tWarehousebills.getfBsdate();
|
|
|
+ SimpleDateFormat dataf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+
|
|
|
+ map1.put("fBsdate",dataf.format(fBsdate));
|
|
|
+// map1.put("fBsdate",tWarehousebillsfees.getfBsdate());
|
|
|
map1.put("fFeeid", fees.getfFeeid());
|
|
|
map1.put("fFeeName", feeName);
|
|
|
map1.put("fSrcdc", fees.getfSrcdc());
|
|
|
map1.put("fAmt", fees.getfAmt());
|
|
|
map1.put("fAmtdr", fees.getfAmtdr());
|
|
|
- map1.put("fRemarks", fees.getfRemarks());
|
|
|
- map1.put("srcBillNo", tWarehousebillsfees.getSrcId());
|
|
|
- map1.put("fMarks", tWarehousebillsfees.getfMarks());
|
|
|
- map1.put("fChargedate", tWarehousebillsfees.getfChargedate());
|
|
|
- map1.put("fBillingDeadline", tWarehousebillsfees.getfBillingDeadline());
|
|
|
- map1.put("fBillingDays", tWarehousebillsfees.getfBillingDays());
|
|
|
- map1.put("fInventoryDays", tWarehousebillsfees.getfInventoryDays());
|
|
|
+// map1.put("fRemarks", fees.getfRemarks());
|
|
|
+ map1.put("remark", fees.getfRemarks());
|
|
|
map1.put("fFeeunitid", sysDictDataList.get(0).getDictLabel());
|
|
|
- map1.put("fQty", tWarehousebillsfees.getfQty());
|
|
|
- map1.put("fUnitprice", tWarehousebillsfees.getfUnitprice());
|
|
|
- if (tWarehousebillsfees.getfBilltype().equals("KHDD")) {
|
|
|
- map1.put("fBusinessType", "船运订单");
|
|
|
- } else {
|
|
|
- map1.put("fBusinessType", sysDictDataListIn.get(0).getDictLabel());
|
|
|
- }
|
|
|
- if (tWarehousebills.getfBilltype().equals("SJRK")) {
|
|
|
- map1.put("fBilltype", "入库");
|
|
|
- } else if (tWarehousebills.getfBilltype().equals("SJCK")) {
|
|
|
- map1.put("fBilltype", "出库");
|
|
|
- } else if (tWarehousebills.getfBilltype().equals("CKDB")) {
|
|
|
- map1.put("fBilltype", "调拨");
|
|
|
- } else if (tWarehousebills.getfBilltype().equals("HWTG")) {
|
|
|
- map1.put("fBilltype", "货物通关");
|
|
|
- } else if (tWarehousebills.getfBilltype().equals("HQZY")) {
|
|
|
- map1.put("fBilltype", "货权转移");
|
|
|
- } else if (tWarehousebills.getfBilltype().equals("KHDD")) {
|
|
|
- map1.put("fBilltype", "船运订单");
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+ map1.put("fBillno", tWarehousebills.getfBillno());
|
|
|
+ map1.put("fName", tWarehousebills.getCorpName());
|
|
|
+ map1.put("fSbuName", tWarehousebills.getFsbuName());
|
|
|
+ map1.put("fMoney", fees.getfMoney());
|
|
|
+ map1.put("fStlamount", fees.getfStlamount());
|
|
|
+ map1.put("fAmtBlc", fees.getfAmtBlc());
|
|
|
+ map1.put("isAudit", fees.getIsAudit());
|
|
|
+
|
|
|
feeDoList.add(map1);
|
|
|
}
|
|
|
}
|
|
@@ -337,8 +306,12 @@ public class TFeeServiceImpl implements ITFeeService {
|
|
|
@Transactional
|
|
|
public AjaxResult insertTFeeTFeeDo(String tfee, String tfeeDo, LoginUser loginUser, String fBilltype) {
|
|
|
Long fPid = null;
|
|
|
+ // 导入数据记录来源单号
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
TFee tFee = JSONArray.parseObject(tfee, TFee.class);
|
|
|
+
|
|
|
+ tFee.setfCtrlcorpid(tFee.getfCtrlcorpidLong().toString());
|
|
|
+
|
|
|
if (StringUtils.isNull(tFee.getfId())) {
|
|
|
// 如果是新数据
|
|
|
tFee.setCreateBy(loginUser.getUser().getUserName());
|
|
@@ -358,13 +331,15 @@ public class TFeeServiceImpl implements ITFeeService {
|
|
|
tFee.setUpdateTime(new Date());
|
|
|
tFeeMapper.updateTFee(tFee);
|
|
|
// 删除从表
|
|
|
- tFeeDoMapper.deleteByFPid(fPid);
|
|
|
+// tFeeDoMapper.deleteByFPid(fPid);
|
|
|
+ tFeeDoMapper.tombstones(fPid);
|
|
|
}
|
|
|
// 财务从表
|
|
|
if (StringUtils.isNotNull(tfeeDo)) {
|
|
|
JSONArray jsonDrArray = JSONArray.parseArray(tfeeDo);
|
|
|
List<TFeeDo> tFeeDoList = JSONObject.parseArray(jsonDrArray.toJSONString(), TFeeDo.class);
|
|
|
for (TFeeDo tFeeDo : tFeeDoList) {
|
|
|
+ tFeeDo.setfRemarks(tFeeDo.getRemark());
|
|
|
tFeeDo.setfPid(fPid);
|
|
|
tFeeDo.setCreateBy(loginUser.getUser().getUserName());
|
|
|
tFeeDo.setCreateTime(new Date());
|
|
@@ -571,6 +546,7 @@ public class TFeeServiceImpl implements ITFeeService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional
|
|
|
public int deleteTFeeByIds(Long[] fIds) {
|
|
|
// 取出业务编号、 放入 billno_del
|
|
|
for (Long id : fIds) {
|
|
@@ -586,8 +562,24 @@ public class TFeeServiceImpl implements ITFeeService {
|
|
|
fee.setfMake(0);
|
|
|
int updateTFee = tFeeMapper.updateTFee(fee);
|
|
|
}
|
|
|
+
|
|
|
+ int i = tFeeMapper.tFeeUpdateDelFlag(id);
|
|
|
+ if (i != 1) {
|
|
|
+ return i;
|
|
|
+ }
|
|
|
+ List<TFeeDo> tFeeDoList = tFeeDoMapper.selectTFeeDoByfPid(id);
|
|
|
+
|
|
|
+ for (TFeeDo tFeeDo : tFeeDoList) {
|
|
|
+ int y = tFeeDoMapper.deleteByTFeeId(tFeeDo.getfId());
|
|
|
+
|
|
|
+ if (y != 1) {
|
|
|
+ return i;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
- return tFeeMapper.deleteTFeeByIds(fIds);
|
|
|
+// return tFeeMapper.deleteTFeeByIds(fIds);
|
|
|
+ return 1;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -610,9 +602,25 @@ public class TFeeServiceImpl implements ITFeeService {
|
|
|
|
|
|
@Override
|
|
|
public List<Map<String, Object>> warehouseBillsFeesList(TWareHouseFees tWareHouseFees, String billsType) {
|
|
|
+
|
|
|
+ // 服务日期起
|
|
|
+ String dateStart = tWareHouseFees.getfBsdateStart();
|
|
|
+ // 服务日期止
|
|
|
+ String dateEnd = tWareHouseFees.getfBsdateEnd();
|
|
|
+
|
|
|
+ if (dateStart != null && !"".equals(dateStart)) {
|
|
|
+ dateStart += " 00:00:00";
|
|
|
+ }
|
|
|
+
|
|
|
+ if (dateEnd != null && !"".equals(dateEnd)) {
|
|
|
+ dateEnd += " 23:59:59";
|
|
|
+ }
|
|
|
+
|
|
|
List<Map<String, Object>> maps = new ArrayList<Map<String, Object>>();
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("tWareHouseFees", tWareHouseFees);
|
|
|
+ map.put("fBsdateStart", dateStart);
|
|
|
+ map.put("fBsdateEnd", dateEnd);
|
|
|
List<Map<String, Object>> mapList = new ArrayList<>();
|
|
|
if (billsType.equals("DZ")
|
|
|
|| billsType.equals("SF")
|
|
@@ -633,6 +641,12 @@ public class TFeeServiceImpl implements ITFeeService {
|
|
|
|
|
|
}*/
|
|
|
}
|
|
|
+ if (mapList != null) {
|
|
|
+ for (Map<String, Object> objectMap : mapList) {
|
|
|
+ objectMap.put("fStlamount", objectMap.get("fMoney"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return mapList;
|
|
|
}
|
|
|
|
|
@@ -748,7 +762,6 @@ public class TFeeServiceImpl implements ITFeeService {
|
|
|
tFeeDo.setCreateBy(loginUser.getUser().getUserName());
|
|
|
tFeeDo.setCreateTime(new Date());
|
|
|
tFeeDo.setfStatus(billstatus);
|
|
|
- tFeeDoMapper.insertTFeeDo(tFeeDo);
|
|
|
}
|
|
|
}
|
|
|
// 这里加个判断取系统参数来确定是否需要启用审批流
|
|
@@ -1285,9 +1298,11 @@ public class TFeeServiceImpl implements ITFeeService {
|
|
|
|
|
|
@Override
|
|
|
public List<Payment> paymentExport(TFee tFee) throws Exception {
|
|
|
- List<Map<String, Object>> list = tFeeMapper.selectFeeList(tFee);
|
|
|
- List<Payment> list1 = ListMapToBeanUtils.castMapToBean(list, Payment.class);
|
|
|
- return list1;
|
|
|
+// List<Map<String, Object>> list = tFeeMapper.selectFeeList(tFee);
|
|
|
+// List<Payment> list1 = ListMapToBeanUtils.castMapToBean(list, Payment.class);
|
|
|
+// List<TFee> tFees = tFeeMapper.selectTFeeList(tFee);
|
|
|
+
|
|
|
+ return tFeeMapper.paymentExport(tFee);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -1661,6 +1676,176 @@ public class TFeeServiceImpl implements ITFeeService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public List<TFee> selectChargeList(TFee tFee) {
|
|
|
+
|
|
|
+// return tFeeMapper.selectChargeList(tFee);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<Map<String, Object>> payDataList(TWareHouseFees tWareHouseFees) {
|
|
|
+ // 服务日期起
|
|
|
+ String dateStart = tWareHouseFees.getfBsdateStart();
|
|
|
+ // 服务日期止
|
|
|
+ String dateEnd = tWareHouseFees.getfBsdateEnd();
|
|
|
+
|
|
|
+ if (dateStart != null && !"".equals(dateStart)) {
|
|
|
+ dateStart += " 00:00:00";
|
|
|
+ }
|
|
|
+
|
|
|
+ if (dateEnd != null && !"".equals(dateEnd)) {
|
|
|
+ dateEnd += " 23:59:59";
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Map<String, Object>> maps = new ArrayList<Map<String, Object>>();
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("tWareHouseFees", tWareHouseFees);
|
|
|
+ map.put("fBsdateStart", dateStart);
|
|
|
+ map.put("fBsdateEnd", dateEnd);
|
|
|
+ List<Map<String, Object>> mapList = new ArrayList<>();
|
|
|
+
|
|
|
+ mapList = tFeeMapper.payDataList(map);
|
|
|
+
|
|
|
+ if (mapList != null) {
|
|
|
+ for (Map<String, Object> objectMap : mapList) {
|
|
|
+// objectMap.put("fStlamount", objectMap.get("fMoney"));
|
|
|
+//
|
|
|
+ String fMoney = objectMap.get("fMoney").toString();
|
|
|
+ String fStlamount = objectMap.get("fStlamount").toString();
|
|
|
+ BigDecimal fMoneyB = new BigDecimal(fMoney);
|
|
|
+ BigDecimal fStlamountB = new BigDecimal(fStlamount);
|
|
|
+ BigDecimal subtract = fMoneyB.subtract(fStlamountB);
|
|
|
+ objectMap.put("fMoney", subtract);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return mapList;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 付费详情导出
|
|
|
+ * @param fId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<CargoDetailsExcel> exportItems(Long fId) {
|
|
|
+
|
|
|
+ List<CargoDetailsExcel> cargoDetailsExcels = new ArrayList<>();
|
|
|
+
|
|
|
+ // 费用
|
|
|
+ List<Long> feesId = new ArrayList<>();
|
|
|
+ //费用名称
|
|
|
+ String feeName = null;
|
|
|
+
|
|
|
+ // 查询从表数据
|
|
|
+ TFeeDo tFeeDo = new TFeeDo();
|
|
|
+ tFeeDo.setfPid(fId);
|
|
|
+ List<TFeeDo> tFeeDoList = tFeeDoMapper.selectTFeeDoList(tFeeDo);
|
|
|
+ if (StringUtils.isNotEmpty(tFeeDoList)) {
|
|
|
+ for (TFeeDo fees : tFeeDoList) {
|
|
|
+ CargoDetailsExcel excel = new CargoDetailsExcel();
|
|
|
+ feesId.add(fees.getfFeeid());
|
|
|
+ // 查询主表
|
|
|
+ TWarehouseBills tWarehousebills = tWarehouseBillsMapper.selectTWarehousebillsById(fees.getfSrcpid());
|
|
|
+ // 费用名称
|
|
|
+ TFees tFees = tFeesMapper.selectTFeesById(fees.getfFeeid());
|
|
|
+ if (tFees != null){
|
|
|
+ feeName = tFees.getfName();
|
|
|
+ }
|
|
|
+ // 字典宝
|
|
|
+ SysDictData sysDictData = new SysDictData();
|
|
|
+ sysDictData.setDictType("data_unitfees");
|
|
|
+ sysDictData.setStatus("0");
|
|
|
+
|
|
|
+ excel.setfBillno(tWarehousebills.getfBillno());
|
|
|
+ excel.setfBsdate(tWarehousebills.getfBsdate());
|
|
|
+ excel.setfName(tWarehousebills.getCorpName());
|
|
|
+ excel.setfSbuName(tWarehousebills.getFsbuName());
|
|
|
+ excel.setfMoney(fees.getfAmtBlc());
|
|
|
+ excel.setfAmt(fees.getfAmt());
|
|
|
+ excel.setRemark(fees.getfRemarks());
|
|
|
+
|
|
|
+ cargoDetailsExcels.add(excel);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return cargoDetailsExcels;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 确认付费
|
|
|
+ *
|
|
|
+ * @param tFee
|
|
|
+ * @param tFeeDoList
|
|
|
+ * @param loginUser
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ @Transactional
|
|
|
+ public AjaxResult confirmPayment(TFee tFee, List<TFeeDo> tFeeDoList, LoginUser loginUser) {
|
|
|
+
|
|
|
+ for (TFeeDo tFeeDo : tFeeDoList) {
|
|
|
+
|
|
|
+ if (tFeeDo.getfPid() == null) {
|
|
|
+ return AjaxResult.error("请先保存数据");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 提交审批流
|
|
|
+ AuditItems auditItems = new AuditItems();
|
|
|
+ auditItems.setLevelId(0L);
|
|
|
+ // 业务id
|
|
|
+ auditItems.setBillId(tFee.getfId());
|
|
|
+ // 活动号
|
|
|
+ auditItems.setActId(570L);
|
|
|
+ auditItems.setIffinalItem("F");
|
|
|
+ // 业务编号
|
|
|
+ auditItems.setBillNo(tFee.getfBillno());
|
|
|
+ // 存储委托方(货权方)
|
|
|
+ auditItems.setRefno1(tFee.getfCorpid() + "");
|
|
|
+ // 存储业务类型(业务类型)
|
|
|
+ auditItems.setRefno2(tFee.getfBilltype());
|
|
|
+ // 存储提单号(提单号)
|
|
|
+ auditItems.setRefno3(tFee.getfBillno());
|
|
|
+ auditItems.setSendUserId(loginUser.getUser().getUserId());
|
|
|
+ auditItems.setSendName(SecurityUtils.getUsername());
|
|
|
+ auditItems.setSendTime(new Date());
|
|
|
+ auditItems.setAuditUserId(loginUser.getUser().getUserId());
|
|
|
+ auditItems.setAuditItem(new Date());
|
|
|
+ auditItems.setAuditOpTime(new Date());
|
|
|
+ auditItems.setAuditMsg("提交");
|
|
|
+ auditItems.setAuditStatus("O");
|
|
|
+ AjaxResult approvalFlow = auditItemsService.createApprovalFlow(auditItems);
|
|
|
+ String code = approvalFlow.get("code").toString();
|
|
|
+ if ("500".equals(code)) {
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ }
|
|
|
+
|
|
|
+ // fee表中审核状态改为审核中
|
|
|
+ int i = tFeeMapper.setFAuditType(tFee.getfId(), 1);
|
|
|
+ if (i != 1) {
|
|
|
+ return AjaxResult.error();
|
|
|
+ }
|
|
|
+
|
|
|
+ for (TFeeDo tFeeDo : tFeeDoList) {
|
|
|
+// int i = tWarehouseBillsMapper.confirmPayment(tFeeDo);
|
|
|
+ // 算费金额存储到临时字段并且修改为审核中1
|
|
|
+ int y = tFeeMapper.reviewTheAmountAssignment(tFeeDo);
|
|
|
+ if (y != 1) {
|
|
|
+ return AjaxResult.error();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String getNameByFId(Long fId) {
|
|
|
+ return tFeeMapper.getNameByFId(fId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
@Transactional
|
|
|
public AjaxResult webVersionApplyFP(TFee tFee, LoginUser loginUser, String fBilltype, TFeeInvoice tFeeInvoice) {
|
|
|
Long fPid = null;
|