TFeeServiceImpl.java 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. package com.ruoyi.finance.service.impl;
  2. import com.alibaba.fastjson.JSONArray;
  3. import com.alibaba.fastjson.JSONObject;
  4. import com.ruoyi.approvalFlow.domain.AuditItems;
  5. import com.ruoyi.approvalFlow.service.impl.AuditItemsServiceImpl;
  6. import com.ruoyi.basicData.domain.TCorps;
  7. import com.ruoyi.basicData.domain.TFees;
  8. import com.ruoyi.basicData.mapper.TCorpsMapper;
  9. import com.ruoyi.basicData.mapper.TFeesMapper;
  10. import com.ruoyi.common.core.domain.AjaxResult;
  11. import com.ruoyi.common.core.domain.model.LoginUser;
  12. import com.ruoyi.common.utils.DateUtils;
  13. import com.ruoyi.common.utils.StringUtils;
  14. import com.ruoyi.finance.domain.TFee;
  15. import com.ruoyi.finance.domain.TFeeDo;
  16. import com.ruoyi.finance.domain.TWareHouseFees;
  17. import com.ruoyi.finance.mapper.TFeeDoMapper;
  18. import com.ruoyi.finance.mapper.TFeeMapper;
  19. import com.ruoyi.finance.service.ITFeeService;
  20. import com.ruoyi.system.domain.SysConfig;
  21. import com.ruoyi.system.mapper.SysConfigMapper;
  22. import com.ruoyi.warehouseBusiness.domain.*;
  23. import com.ruoyi.warehouseBusiness.mapper.BillnoDelMapper;
  24. import com.ruoyi.warehouseBusiness.mapper.TWarehouseBillsMapper;
  25. import com.ruoyi.warehouseBusiness.mapper.TWarehousebillsfeesMapper;
  26. import com.ruoyi.warehouseBusiness.service.impl.BillnoSerialServiceImpl;
  27. import org.springframework.beans.factory.annotation.Autowired;
  28. import org.springframework.stereotype.Service;
  29. import org.springframework.transaction.annotation.Transactional;
  30. import org.springframework.transaction.interceptor.TransactionAspectSupport;
  31. import java.math.BigDecimal;
  32. import java.util.*;
  33. /**
  34. * 财务数据主Service业务层处理
  35. *
  36. * @author ruoyi
  37. * @date 2021-01-18
  38. */
  39. @Service
  40. public class TFeeServiceImpl implements ITFeeService {
  41. @Autowired
  42. private TFeeMapper tFeeMapper;
  43. @Autowired
  44. private TFeeDoMapper tFeeDoMapper;
  45. @Autowired
  46. private BillnoSerialServiceImpl billnoSerialServiceImpl;
  47. @Autowired
  48. private BillnoDelMapper billnoDelMapper;
  49. @Autowired
  50. private TCorpsMapper tCorpsMapper;
  51. @Autowired
  52. private TFeesMapper tFeesMapper;
  53. @Autowired
  54. private TWarehouseBillsMapper tWarehouseBillsMapper;
  55. @Autowired
  56. private TWarehousebillsfeesMapper tWarehousebillsfeesMapper;
  57. @Autowired
  58. private SysConfigMapper sysConfigMapper;
  59. @Autowired
  60. private AuditItemsServiceImpl auditItemsService;
  61. /**
  62. * 查询财务数据主
  63. *
  64. * @param fId 财务数据主ID
  65. * @return 财务数据主
  66. */
  67. @Override
  68. public Map<String, Object> selectTFeeById(Long fId) {
  69. Map<String, Object> map = new HashMap<>();
  70. // 客户表
  71. List<Long> corpsId = new ArrayList<>();
  72. // 费用
  73. List<Long> feesId = new ArrayList<>();
  74. TFee tFee=tFeeMapper.selectTFeeById(fId);
  75. if (StringUtils.isNotNull(tFee.getfCorpid())) {
  76. corpsId.add(tFee.getfCorpid());
  77. }
  78. corpsId.add(tFee.getfCorpid());
  79. // 查询从表数据
  80. TFeeDo tFeeDo = new TFeeDo();
  81. tFeeDo.setfPid(fId);
  82. List<TFeeDo> tFeeDoList= tFeeDoMapper.selectTFeeDoList(tFeeDo);
  83. List<Map<String, Object>> feeDoList=new ArrayList<>();
  84. if (StringUtils.isNotEmpty(tFeeDoList)) {
  85. for (TFeeDo fees : tFeeDoList) {
  86. Map<String, Object> map1 = new HashMap<>();
  87. feesId.add(fees.getfFeeid());
  88. // 查询主表
  89. TWarehouseBills tWarehousebills = tWarehouseBillsMapper.selectTWarehousebillsById(fees.getfSrcpid());
  90. // 费用名称
  91. TFees tFees= tFeesMapper.selectTFeesById(fees.getfFeeid());
  92. // 费用表数据
  93. TWarehousebillsfees tWarehousebillsfees = tWarehousebillsfeesMapper.selectTWarehousebillsfeesById(fees.getfSrcid());
  94. map1.put("fId",fees.getfId());
  95. map1.put("fSrcid",fees.getfSrcid());
  96. map1.put("fSrcpid",fees.getfSrcpid());
  97. map1.put("fMblno",tWarehousebillsfees.getfMblno());
  98. map1.put("fBscorpno",tWarehousebills.getfBscorpno());
  99. map1.put("fProductName",tWarehousebillsfees.getfProductName());
  100. map1.put("fBsdate",tWarehousebillsfees.getfBsdate());
  101. map1.put("fFeeid",fees.getfFeeid());
  102. map1.put("fFeeName",tFees.getfName());
  103. map1.put("fSrcdc",fees.getfSrcdc());
  104. map1.put("fAmt",fees.getfAmt());
  105. map1.put("fAmtdr",fees.getfAmtdr());
  106. map1.put("fRemarks",fees.getfRemarks());
  107. map1.put("srcBillNo",tWarehousebillsfees.getSrcId());
  108. map1.put("fMarks",tWarehousebillsfees.getfMarks());
  109. map1.put("fChargedate",tWarehousebillsfees.getfChargedate());
  110. map1.put("fBillingDeadline",tWarehousebillsfees.getfBillingDeadline());
  111. map1.put("fBillingDays",tWarehousebillsfees.getfBillingDays());
  112. map1.put("fInventoryDays",tWarehousebillsfees.getfInventoryDays());
  113. if(tWarehousebills.getfBilltype().equals("SJRK")){
  114. map1.put("fBilltype","入库");
  115. } else if(tWarehousebills.getfBilltype().equals("SJCK")){
  116. map1.put("fBilltype","出库");
  117. } else if(tWarehousebills.getfBilltype().equals("CKDB")){
  118. map1.put("fBilltype","调拨");
  119. } else if(tWarehousebills.getfBilltype().equals("HQZY")){
  120. map1.put("fBilltype","货权转移");
  121. }
  122. feeDoList.add(map1);
  123. }
  124. }
  125. List<TCorps> corpsList = new ArrayList<>();
  126. List<Long> corpsIdList = StringUtils.integerDeduplication(corpsId);
  127. for (Long corpId : corpsIdList) {
  128. TCorps corps = tCorpsMapper.selectTCorpsById(corpId);
  129. if (StringUtils.isNotNull(corps)) {
  130. corpsList.add(corps);
  131. }
  132. }
  133. List<TFees> feesList = new ArrayList<>();
  134. List<Long> longList = StringUtils.integerDeduplication(feesId);
  135. for (Long fees : longList) {
  136. TFees tFees = tFeesMapper.selectTFeesById(fees);
  137. if (StringUtils.isNotNull(tFees)) {
  138. feesList.add(tFees);
  139. }
  140. }
  141. map.put("tFee",tFee);
  142. map.put("corps",corpsList);
  143. map.put("feesList", feesList);
  144. map.put("feeDoList",feeDoList);
  145. return map;
  146. }
  147. /**
  148. * 查询财务数据主列表
  149. *
  150. * @param tFee 财务数据主
  151. * @return 财务数据主
  152. */
  153. @Override
  154. public List<TFee> selectTFeeList(TFee tFee) {
  155. return tFeeMapper.selectTFeeList(tFee);
  156. }
  157. @Override
  158. public List<Map<String, Object>> selectTFeeList1(TFee tFee) {
  159. return tFeeMapper.selectTFeeList1(tFee);
  160. }
  161. /**
  162. * 新增财务数据主
  163. *
  164. * @param tFee 财务数据主
  165. * @return 结果
  166. */
  167. @Override
  168. public int insertTFee(TFee tFee) {
  169. tFee.setCreateTime(DateUtils.getNowDate());
  170. return tFeeMapper.insertTFee(tFee);
  171. }
  172. /**
  173. * 新增对账 、收费、
  174. * @param tfee
  175. * @param tfeeDo
  176. * @param loginUser
  177. * @param fBilltype
  178. * @return
  179. */
  180. @Override
  181. public AjaxResult insertTFeeTFeeDo(String tfee, String tfeeDo, LoginUser loginUser, String fBilltype) {
  182. Long fPid = null;
  183. Map<String, Object> map = new HashMap<>();
  184. TFee tFee = JSONArray.parseObject(tfee, TFee.class);
  185. if (StringUtils.isNull(tFee.getfId())) {
  186. // 如果是新数据
  187. tFee.setCreateBy(loginUser.getUser().getUserName());
  188. tFee.setfDeptid(loginUser.getUser().getDeptId());
  189. tFee.setfBilltype(fBilltype);
  190. // 业务编码
  191. Date time = new Date();
  192. String billNo = billnoSerialServiceImpl.getBillNo(fBilltype, time);
  193. tFee.setfBillno(billNo);
  194. tFeeMapper.insertTFee(tFee);
  195. fPid = tFee.getfId();
  196. } else {
  197. fPid = tFee.getfId();
  198. tFee.setUpdateBy(loginUser.getUser().getUserName());
  199. tFee.setUpdateTime(new Date());
  200. tFeeMapper.updateTFee(tFee);
  201. // 删除从表
  202. tFeeDoMapper.deleteByFPid(fPid);
  203. }
  204. // 财务从表
  205. if (StringUtils.isNotNull(tfeeDo)) {
  206. JSONArray jsonDrArray = JSONArray.parseArray(tfeeDo);
  207. List<TFeeDo> tFeeDoList = JSONObject.parseArray(jsonDrArray.toJSONString(), TFeeDo.class);
  208. for (TFeeDo tFeeDo : tFeeDoList) {
  209. tFeeDo.setfPid(fPid);
  210. tFeeDo.setCreateBy(loginUser.getUser().getUserName());
  211. tFeeDo.setCreateTime(new Date());
  212. tFeeDoMapper.insertTFeeDo(tFeeDo);
  213. }
  214. }
  215. map.put("tFee", tFee);
  216. return AjaxResult.success("成功", map);
  217. }
  218. /**
  219. * 修改财务数据主
  220. *
  221. * @param tFee 财务数据主
  222. * @return 结果
  223. */
  224. @Override
  225. public int updateTFee(TFee tFee) {
  226. tFee.setUpdateTime(DateUtils.getNowDate());
  227. return tFeeMapper.updateTFee(tFee);
  228. }
  229. /**
  230. * 批量删除财务数据主
  231. *
  232. * @param fIds 需要删除的财务数据主ID
  233. * @return 结果
  234. */
  235. @Override
  236. public int deleteTFeeByIds(Long[] fIds) {
  237. // 取出业务编号、 放入 billno_del
  238. for (Long id : fIds) {
  239. // 1、查询主表信息
  240. TFee tFee = tFeeMapper.selectTFeeById(id);
  241. // 2、业务编号、客存编号 放入 billno_del
  242. BillnoDel billnoDel = new BillnoDel();
  243. billnoDel.setBillType(tFee.getfBilltype());
  244. billnoDel.setBillNo(tFee.getfBillno());
  245. billnoDelMapper.insertBillnoDel(billnoDel);
  246. }
  247. return tFeeMapper.deleteTFeeByIds(fIds);
  248. }
  249. /**
  250. * 删除财务数据主信息
  251. *
  252. * @param fId 财务数据主ID
  253. * @return 结果
  254. */
  255. @Override
  256. public int deleteTFeeById(Long fId) {
  257. return tFeeMapper.deleteTFeeById(fId);
  258. }
  259. @Override
  260. public List<Map<String, Object>> warehouseBillsFeesList(TWareHouseFees tWareHouseFees,String billsType) {
  261. List<Map<String, Object>> maps =new ArrayList<Map<String, Object>>();
  262. Map<String, Object> map = new HashMap<>();
  263. map.put("tWareHouseFees", tWareHouseFees);
  264. List<Map<String, Object>> mapList =new ArrayList<>();
  265. if(billsType.equals("DZ")){
  266. mapList = tFeeMapper.warehouseBillsFeesListAccamount(map);
  267. } else{
  268. if(tWareHouseFees.getfStatementNo()!=null && !tWareHouseFees.getfStatementNo().equals("")){
  269. mapList = tFeeMapper.warehouseBillsFeesListAccamount(map);
  270. }else {
  271. mapList = tFeeMapper.warehouseBillsFeesList(map);
  272. }
  273. }
  274. return mapList;
  275. }
  276. @Override
  277. public List<Map<String, Object>> warehouseBillsFeesList(TWareHouseFees tWareHouseFees) {
  278. return tFeeMapper.warehouseBillsFeesList1(tWareHouseFees);
  279. }
  280. public static BigDecimal calculation1(String fTotalgross, String fGrossweightblc) {
  281. BigDecimal num1 = new BigDecimal(fTotalgross);
  282. BigDecimal num2 = new BigDecimal(fGrossweightblc);
  283. BigDecimal result = num1.subtract(num2);
  284. return result.setScale(2, BigDecimal.ROUND_HALF_UP);
  285. }
  286. @Override
  287. @Transactional
  288. public AjaxResult confirm(String tfee, String tfeeDo, LoginUser loginUser, String fBilltype) {
  289. TFee tFee = JSONArray.parseObject(tfee, TFee.class);
  290. if (StringUtils.isNull(tFee.getfId())) {
  291. // 如果是新数据
  292. tFee.setCreateBy(loginUser.getUser().getUserName());
  293. tFee.setfDeptid(loginUser.getUser().getDeptId());
  294. tFee.setfBilltype(fBilltype);
  295. // 业务编码
  296. Date time = new Date();
  297. String billNo = billnoSerialServiceImpl.getBillNo(fBilltype, time);
  298. tFee.setfBillno(billNo);
  299. tFeeMapper.insertTFee(tFee);
  300. } else {
  301. tFee.setUpdateBy(loginUser.getUser().getUserName());
  302. tFee.setUpdateTime(new Date());
  303. tFeeMapper.updateTFee(tFee);
  304. // 删除从表
  305. tFeeDoMapper.deleteByFPid(tFee.getfId());
  306. }
  307. // 财务从表
  308. if (StringUtils.isNotNull(tfeeDo) && !"[]".equals(tfeeDo)) {
  309. JSONArray jsonDrArray = JSONArray.parseArray(tfeeDo);
  310. List<TFeeDo> tFeeDoList = JSONObject.parseArray(jsonDrArray.toJSONString(), TFeeDo.class);
  311. for (TFeeDo tFeeDo : tFeeDoList) {
  312. tFeeDo.setfPid(tFee.getfId());
  313. tFeeDo.setCreateBy(loginUser.getUser().getUserName());
  314. tFeeDo.setCreateTime(new Date());
  315. tFeeDoMapper.insertTFeeDo(tFeeDo);
  316. }
  317. }
  318. // 这里加个判断取系统参数来确定是否需要启用审批流
  319. String key = "";
  320. boolean isApprove = false;
  321. long actId = 0L;
  322. if ("DZ".equals(fBilltype)) {
  323. actId = 210L;
  324. key = "warehouse.contrast.ApprovalFlow";
  325. } else if ("SF".equals(fBilltype)) {
  326. actId = 220L;
  327. key = "warehouse.charge.ApprovalFlow";
  328. } else if ("FF".equals(fBilltype)) {
  329. actId = 230L;
  330. key = "warehouse.payment.ApprovalFlow";
  331. }
  332. SysConfig sysConfig = sysConfigMapper.checkConfigKeyUnique(key);
  333. if (StringUtils.isNull(sysConfig)) {
  334. TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
  335. return AjaxResult.error("系统参数异常,未找到开启审批流参数");
  336. }
  337. if ("0".equals(sysConfig.getConfigValue())) {
  338. isApprove = true;
  339. }
  340. if (isApprove) {
  341. AuditItems auditItems = new AuditItems();
  342. auditItems.setLevelId(0L);
  343. auditItems.setBillId(tFee.getfId());
  344. auditItems.setActId(actId);
  345. auditItems.setIffinalItem("F");
  346. auditItems.setBillNo(tFee.getfBillno()); // 业务编号
  347. auditItems.setRefno1(String.valueOf(tFee.getfCorpid())); // 货权方
  348. auditItems.setRefno2(tFee.getfBilltype());// 财务类型
  349. auditItems.setRefno3(tFee.gettMblno());// 提单号
  350. auditItems.setSendUserId(loginUser.getUser().getUserId());
  351. auditItems.setSendName(loginUser.getUsername());
  352. auditItems.setSendTime(new Date());
  353. auditItems.setAuditUserId(loginUser.getUser().getUserId());
  354. auditItems.setAuditItem(new Date());
  355. auditItems.setAuditOpTime(new Date());
  356. auditItems.setAuditMsg("提交");
  357. auditItems.setAuditStatus("O");
  358. AjaxResult approvalFlow = auditItemsService.createApprovalFlow(auditItems);
  359. Long code = Long.valueOf(String.valueOf(approvalFlow.get("code"))).longValue();
  360. if (code.equals(500L)) {
  361. TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
  362. }
  363. return approvalFlow;
  364. }else {
  365. if (StringUtils.isNotNull(tfeeDo) && !"[]".equals(tfeeDo)) {
  366. JSONArray jsonDrArray = JSONArray.parseArray(tfeeDo);
  367. List<TFeeDo> tFeeDoList = JSONObject.parseArray(jsonDrArray.toJSONString(), TFeeDo.class);
  368. for (TFeeDo tFeeDo : tFeeDoList) {
  369. // 跟新费用明细
  370. int m = updateBillsFees(tFee.getfId(),tFeeDo,fBilltype);
  371. if (m == 0) {
  372. TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
  373. return AjaxResult.error("更新费用明细失败");
  374. }
  375. }
  376. }
  377. AjaxResult ajaxResult = tfeeFollow(tFee.getfId(), 6L);
  378. Long code = Long.valueOf(String.valueOf(ajaxResult.get("code"))).longValue();
  379. return ajaxResult;
  380. }
  381. }
  382. /**
  383. * 根据财务主表id 更新对应明细表状态
  384. *
  385. * @param fPid 财务主表id
  386. * @return 结果
  387. */
  388. @Transactional
  389. public AjaxResult tfeeFollow(Long fPid, long fettle) {
  390. if (StringUtils.isNull(fPid)) {
  391. return AjaxResult.error("财务更新状态未找到主表信息,请与管理员联系");
  392. }
  393. TFee tFee = new TFee();
  394. tFee.setfId(fPid);
  395. tFee.setfBillstatus(String.valueOf(fettle));
  396. int tFeeUpdateResult = tFeeMapper.updateTFee(tFee);
  397. if (tFeeUpdateResult <= 0) {
  398. TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
  399. return AjaxResult.error("更新财务明细状态失败,请联系管理员");
  400. }
  401. try{
  402. int itemUpdateResult = tFeeDoMapper.tfeeDoFollowUpdate(fPid,fettle);
  403. } catch (Exception exception){
  404. return AjaxResult.error("更新财务明细状态失败,请联系管理员");
  405. }
  406. return AjaxResult.success();
  407. }
  408. @Transactional
  409. public AjaxResult billsfeesFollow(Long fPid) {
  410. if (StringUtils.isNull(fPid)) {
  411. return AjaxResult.error("费用明细更新状态未找到主表信息,请与管理员联系");
  412. }
  413. TFee tFee=tFeeMapper.selectTFeeById(fPid);
  414. // 查询从表数据
  415. TFeeDo tFeeDo = new TFeeDo();
  416. tFeeDo.setfPid(fPid);
  417. List<TFeeDo> tFeeDoList= tFeeDoMapper.selectTFeeDoList(tFeeDo);
  418. for (TFeeDo tFeeDo1 : tFeeDoList) {
  419. // 跟新费用明细
  420. int m = updateBillsFees(fPid,tFeeDo1,tFee.getfBilltype());
  421. if (m == 0) {
  422. TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
  423. return AjaxResult.error("更新费用明细失败");
  424. }
  425. }
  426. return AjaxResult.success();
  427. }
  428. @Override
  429. @Transactional
  430. public AjaxResult revoke(String tfee, String tfeeDo, LoginUser loginUser, String fBilltype) {
  431. // 更新 主表、从表
  432. TFee tFee = JSONArray.parseObject(tfee, TFee.class);
  433. tFee.setUpdateBy(loginUser.getUser().getUserName());
  434. tFee.setUpdateTime(new Date());
  435. tFeeMapper.updateTFee(tFee);
  436. // 删除从表
  437. tFeeDoMapper.deleteByFPid(tFee.getfId());
  438. // 财务从表
  439. if (StringUtils.isNotNull(tfeeDo)) {
  440. JSONArray jsonDrArray = JSONArray.parseArray(tfeeDo);
  441. List<TFeeDo> tFeeDoList = JSONObject.parseArray(jsonDrArray.toJSONString(), TFeeDo.class);
  442. for (TFeeDo tFeeDo : tFeeDoList) {
  443. tFeeDo.setfPid(tFee.getfId());
  444. tFeeDo.setCreateBy(loginUser.getUser().getUserName());
  445. tFeeDo.setCreateTime(new Date());
  446. tFeeDoMapper.insertTFeeDo(tFeeDo);
  447. // 跟新费用明细
  448. int m = updateBillsFees(tFee.getfId(),tFeeDo,fBilltype);
  449. if (m == 0) {
  450. TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
  451. return AjaxResult.error("更新费用明细失败");
  452. }
  453. }
  454. }
  455. return AjaxResult.success();
  456. }
  457. @Override
  458. public AjaxResult queryRemove(Long fId) {
  459. TFee tFee=tFeeMapper.selectTFeeById(fId);
  460. TFeeDo tFeeDo = new TFeeDo();
  461. tFeeDo.setfPid(tFee.getfId());
  462. List<TFeeDo> tFeeDoList= tFeeDoMapper.selectTFeeDoList(tFeeDo);
  463. if( StringUtils.isNull(tFee)){
  464. return AjaxResult.success("0");
  465. } else if(StringUtils.isNotNull(tFee) && StringUtils.isEmpty(tFeeDoList) ){
  466. return AjaxResult.success("1");
  467. } else {
  468. return AjaxResult.success("2");
  469. }
  470. }
  471. @Override
  472. public List<TWareHouseExcelItem> selectTWarehousebillsItemsList(Long fId) {
  473. return tFeeMapper.selectTWarehousebillsItemsList(fId);
  474. }
  475. /**
  476. * 更新费用明细
  477. * @param fid
  478. * @param tFeeDo
  479. * @param billsType
  480. * @return
  481. */
  482. @Transactional
  483. public int updateBillsFees(Long fid,TFeeDo tFeeDo,String billsType){
  484. // 查询从表数据
  485. TFee tFee=tFeeMapper.selectTFeeById(fid);
  486. if(billsType.equals("SF") || billsType.equals("FF")){
  487. billsType="DC";
  488. }
  489. Map<String, Object> map = new HashMap<>();
  490. map.put("tFee", tFee);
  491. map.put("billType", billsType);
  492. map.put("tFeeDo", tFeeDo);
  493. return tWarehousebillsfeesMapper.updateTWarehousebillsfee(map);
  494. }
  495. }