Commit ab90cce4 by huluobin

# update

parent fc7610c1
...@@ -43,20 +43,24 @@ public class CostPlanDomain implements Serializable { ...@@ -43,20 +43,24 @@ public class CostPlanDomain implements Serializable {
@ApiModelProperty("类型编号") @ApiModelProperty("类型编号")
private Integer typeId; private Integer typeId;
@TableField(exist = false) @TableField(exist = false)
@Deprecated
@ApiModelProperty("类型编号") @ApiModelProperty("类型编号")
private String typeNo; private String typeNo;
@TableField(exist = false) // @TableField(exist = false)
@ApiModelProperty("类型标题") @ApiModelProperty("类型标题")
private String typeName; private String typeName;
@TableField(exist = false) // @TableField(exist = false)
private Integer accountingSubjectId; private Integer accountingSubjectId;
@Deprecated
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty("会计一级科目") @ApiModelProperty("会计一级科目")
private String accountingSubjectNo; private String accountingSubjectNo;
@TableField(exist = false) // @TableField(exist = false)
@ApiModelProperty("会计一级科目") @ApiModelProperty("会计一级科目")
private String accountingSubjectName; private String accountingSubjectName;
...@@ -65,7 +69,6 @@ public class CostPlanDomain implements Serializable { ...@@ -65,7 +69,6 @@ public class CostPlanDomain implements Serializable {
private Integer createUserid; private Integer createUserid;
@ApiModelProperty("创建人编号") @ApiModelProperty("创建人编号")
private String createUsercode; private String createUsercode;
@ApiModelProperty("创建人名称") @ApiModelProperty("创建人名称")
private String createUsername; private String createUsername;
......
...@@ -40,19 +40,18 @@ public class CostPlanTempDomain { ...@@ -40,19 +40,18 @@ public class CostPlanTempDomain {
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty("类型编号") @ApiModelProperty("类型编号")
private String typeNo; private String typeNo;
@TableField(exist = false) // @TableField(exist = false)
@ApiModelProperty("类型标题") @ApiModelProperty("类型标题")
private String typeName; private String typeName;
// @TableField(exist = false)
// private CostTypeDomain costType;
@TableField(exist = false)
// @TableField(exist = false)
private Integer accountingSubjectId; private Integer accountingSubjectId;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty("会计一级科目") @ApiModelProperty("会计一级科目")
private String accountingSubjectNo; private String accountingSubjectNo;
@TableField(exist = false) // @TableField(exist = false)
@ApiModelProperty("会计一级科目") @ApiModelProperty("会计一级科目")
private String accountingSubjectName; private String accountingSubjectName;
......
...@@ -40,7 +40,6 @@ public class AccountingSubjectController { ...@@ -40,7 +40,6 @@ public class AccountingSubjectController {
return CostResult.success(); return CostResult.success();
} }
@ApiOperation("更新会计一级科目") @ApiOperation("更新会计一级科目")
@PostMapping("/modify") @PostMapping("/modify")
public CostResult<Void> modify(@RequestBody AccountingSubjectModifyReq req) { public CostResult<Void> modify(@RequestBody AccountingSubjectModifyReq req) {
......
...@@ -26,13 +26,10 @@ import java.util.stream.Collectors; ...@@ -26,13 +26,10 @@ import java.util.stream.Collectors;
@RestController @RestController
@RequestMapping("/cost/api") @RequestMapping("/cost/api")
public class CostApiController implements CostApi { public class CostApiController implements CostApi {
@Resource @Resource
private CostApiService costApiService; private CostApiService costApiService;
private static Logger logger = LoggerFactory.getLogger(CostApiController.class); private static Logger logger = LoggerFactory.getLogger(CostApiController.class);
@LoginIgnore @LoginIgnore
@Override @Override
@ApiOperation("接受工资单,自动生成付款费用单到财务审核") @ApiOperation("接受工资单,自动生成付款费用单到财务审核")
......
...@@ -103,7 +103,6 @@ public class CostController { ...@@ -103,7 +103,6 @@ public class CostController {
return resp; return resp;
} }
@ApiOperation("修改费用单信息") @ApiOperation("修改费用单信息")
@PostMapping({"reset/resetFile", "reset/resetNoFile"}) @PostMapping({"reset/resetFile", "reset/resetNoFile"})
public UpdateCostResp resetFile(@RequestBody CostDomain costDomain) { public UpdateCostResp resetFile(@RequestBody CostDomain costDomain) {
...@@ -114,7 +113,6 @@ public class CostController { ...@@ -114,7 +113,6 @@ public class CostController {
return resp; return resp;
} }
@ApiOperation("提交费用单") @ApiOperation("提交费用单")
@PostMapping("submitAudit") @PostMapping("submitAudit")
public UpdateCostResp submitAudit(@RequestParam String costNo) { public UpdateCostResp submitAudit(@RequestParam String costNo) {
...@@ -135,7 +133,6 @@ public class CostController { ...@@ -135,7 +133,6 @@ public class CostController {
return resp; return resp;
} }
@ApiOperation("根据费用计划查询") @ApiOperation("根据费用计划查询")
@PostMapping("/getCostByCostPlanNo") @PostMapping("/getCostByCostPlanNo")
public GetCostByCostPlanNoResp getCostByCostPlanNo(@RequestParam String costPlanNo) { public GetCostByCostPlanNoResp getCostByCostPlanNo(@RequestParam String costPlanNo) {
...@@ -342,7 +339,6 @@ public class CostController { ...@@ -342,7 +339,6 @@ public class CostController {
return CostResult.success(); return CostResult.success();
} }
@ApiOperation("mock财务付款回调拒绝") @ApiOperation("mock财务付款回调拒绝")
@GetMapping(value = {"check/cashierCallbackReject/{costNo}"}) @GetMapping(value = {"check/cashierCallbackReject/{costNo}"})
public CostResult<Void> cashierCallbackReject(@PathVariable String costNo) { public CostResult<Void> cashierCallbackReject(@PathVariable String costNo) {
...@@ -383,7 +379,6 @@ public class CostController { ...@@ -383,7 +379,6 @@ public class CostController {
return CostResult.success(); return CostResult.success();
} }
@ApiOperation("修改发票") @ApiOperation("修改发票")
@PostMapping(value = "/check/lend/invoice") @PostMapping(value = "/check/lend/invoice")
public UpdateCostResp invoice(@RequestParam String costNo, public UpdateCostResp invoice(@RequestParam String costNo,
......
...@@ -28,19 +28,19 @@ public class CostDetailDomain { ...@@ -28,19 +28,19 @@ public class CostDetailDomain {
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty("类型编号") @ApiModelProperty("类型编号")
private String typeNo; private String typeNo;
@TableField(exist = false) // @TableField(exist = false)
@ApiModelProperty("类型标题") @ApiModelProperty("类型标题")
private String typeName; private String typeName;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty("描述") @ApiModelProperty("描述")
private String description; private String description;
@TableField(exist = false) // @TableField(exist = false)
private Integer accountingSubjectId; private Integer accountingSubjectId;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty("会计一级科目") @ApiModelProperty("会计一级科目")
private String accountingSubjectNo; private String accountingSubjectNo;
@TableField(exist = false) // @TableField(exist = false)
@ApiModelProperty("会计一级科目") @ApiModelProperty("会计一级科目")
private String accountingSubjectName; private String accountingSubjectName;
......
...@@ -85,18 +85,17 @@ public class CostDomain implements Serializable { ...@@ -85,18 +85,17 @@ public class CostDomain implements Serializable {
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty("描述") @ApiModelProperty("描述")
private String description; private String description;
// @TableField(exist = false)
@TableField(exist = false)
@ApiModelProperty("类型标题") @ApiModelProperty("类型标题")
private String typeName; private String typeName;
@TableField(exist = false) // @TableField(exist = false)
private Integer accountingSubjectId; private Integer accountingSubjectId;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty("会计一级科目") @ApiModelProperty("会计一级科目")
private String accountingSubjectNo; private String accountingSubjectNo;
@TableField(exist = false) // @TableField(exist = false)
@ApiModelProperty("会计一级科目") @ApiModelProperty("会计一级科目")
private String accountingSubjectName; private String accountingSubjectName;
......
...@@ -10,6 +10,7 @@ import com.blt.other.module.cost.dao.*; ...@@ -10,6 +10,7 @@ import com.blt.other.module.cost.dao.*;
import com.blt.other.module.cost.dto.request.GetAllCostPlanReq; import com.blt.other.module.cost.dto.request.GetAllCostPlanReq;
import com.blt.other.module.cost.dto.response.GetAllCostPlanResp; import com.blt.other.module.cost.dto.response.GetAllCostPlanResp;
import com.blt.other.module.cost.dto.response.GetCostPlanResp; import com.blt.other.module.cost.dto.response.GetCostPlanResp;
import com.blt.other.module.cost.model.AccountingSubject;
import com.blt.other.module.cost.model.CostDetailDomain; import com.blt.other.module.cost.model.CostDetailDomain;
import com.blt.other.module.cost.model.CostDomain; import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.model.CostTemplateBaseCol; import com.blt.other.module.cost.model.CostTemplateBaseCol;
...@@ -64,6 +65,8 @@ public abstract class AbstractCostPlanService implements CostPlanService { ...@@ -64,6 +65,8 @@ public abstract class AbstractCostPlanService implements CostPlanService {
CostDetailDao costDetailDao; CostDetailDao costDetailDao;
@Resource @Resource
CostService costService; CostService costService;
@Resource
AccountingSubjectMapper accountingSubjectMapper;
void check(CostPlanDomain planDomain) { void check(CostPlanDomain planDomain) {
...@@ -119,11 +122,17 @@ public abstract class AbstractCostPlanService implements CostPlanService { ...@@ -119,11 +122,17 @@ public abstract class AbstractCostPlanService implements CostPlanService {
if (StringUtils.isNotEmpty(costPlanDomain.getTypeNo())) { if (StringUtils.isNotEmpty(costPlanDomain.getTypeNo())) {
CostTypeDomain costTypeDomain = costTypeDao.selectByNo(costPlanDomain.getTypeNo()); CostTypeDomain costTypeDomain = costTypeDao.selectByNo(costPlanDomain.getTypeNo());
costPlanDomain.setAccountingSubjectId(costTypeDomain.getAccountingSubjectId()); AccountingSubject accountingSubject = accountingSubjectMapper.selectById(costTypeDomain.getAccountingSubjectId());
costPlanDomain.setTypeId(costTypeDomain.getId());
costPlanDomain.setTypeName(costTypeDomain.getTypeName());
costPlanDomain.setAccountingSubjectId(accountingSubject.getId());
costPlanDomain.setAccountingSubjectName(accountingSubject.getName());
} }
} }
@Override @Override
public String createNo() { public String createNo() {
......
...@@ -38,12 +38,7 @@ public class CostPlanNewLend1ServiceImpl extends AbstractCostPlanService impleme ...@@ -38,12 +38,7 @@ public class CostPlanNewLend1ServiceImpl extends AbstractCostPlanService impleme
//init 借还单余额 //init 借还单余额
planDomain.setLendBalance(BigDecimal.ZERO); planDomain.setLendBalance(BigDecimal.ZERO);
CostTypeDomain costTypeDomain = costTypeDao.selectByNo(planDomain.getTypeNo());
planDomain.setTypeId(costTypeDomain.getId());
planDomain.setTypeNo(costTypeDomain.getTypeNo());
this.check(planDomain); this.check(planDomain);
costPlanDao.insert(planDomain); costPlanDao.insert(planDomain);
} }
...@@ -54,7 +49,6 @@ public class CostPlanNewLend1ServiceImpl extends AbstractCostPlanService impleme ...@@ -54,7 +49,6 @@ public class CostPlanNewLend1ServiceImpl extends AbstractCostPlanService impleme
CostTypeDomain costTypeDomain = costTypeDao.selectByNo(planDomain.getTypeNo()); CostTypeDomain costTypeDomain = costTypeDao.selectByNo(planDomain.getTypeNo());
planDomain.setTypeId(costTypeDomain.getId()); planDomain.setTypeId(costTypeDomain.getId());
planDomain.setTypeNo(costTypeDomain.getTypeNo());
costPlanDao.update(planDomain, new LambdaQueryWrapper<CostPlanDomain>() costPlanDao.update(planDomain, new LambdaQueryWrapper<CostPlanDomain>()
.eq(CostPlanDomain::getCostPlanNo, planDomain.getCostPlanNo())); .eq(CostPlanDomain::getCostPlanNo, planDomain.getCostPlanNo()));
......
...@@ -5,6 +5,7 @@ import com.blt.other.common.exception.BizRuntimeException; ...@@ -5,6 +5,7 @@ import com.blt.other.common.exception.BizRuntimeException;
import com.blt.other.common.util.CurUtils; import com.blt.other.common.util.CurUtils;
import com.blt.other.database.model.CostPlanDomain; import com.blt.other.database.model.CostPlanDomain;
import com.blt.other.database.model.CostTypeDomain; import com.blt.other.database.model.CostTypeDomain;
import com.blt.other.module.cost.model.AccountingSubject;
import com.blt.other.module.cost.model.CostDomain; import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.service.CostPlanService; import com.blt.other.module.cost.service.CostPlanService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -41,11 +42,16 @@ public class CostPlanNewReceiptServiceImpl extends AbstractCostPlanService imple ...@@ -41,11 +42,16 @@ public class CostPlanNewReceiptServiceImpl extends AbstractCostPlanService imple
@Override @Override
public void update(CostPlanDomain planDomain) { public void update(CostPlanDomain planDomain) {
this.doSaveFinanceRecord(planDomain); this.doSaveFinanceRecord(planDomain);
this.completedCostPlan(planDomain); this.completedCostPlan(planDomain);
CostTypeDomain costTypeDomain = costTypeDao.selectByNo(planDomain.getTypeNo()); CostTypeDomain costTypeDomain = costTypeDao.selectByNo(planDomain.getTypeNo());
AccountingSubject accountingSubject = accountingSubjectMapper.selectById(costTypeDomain.getAccountingSubjectId());
planDomain.setTypeId(costTypeDomain.getId()); planDomain.setTypeId(costTypeDomain.getId());
planDomain.setTypeName(costTypeDomain.getTypeName());
planDomain.setAccountingSubjectId(accountingSubject.getId());
planDomain.setAccountingSubjectName(accountingSubject.getName());
costPlanDao.update(planDomain, new LambdaQueryWrapper<CostPlanDomain>() costPlanDao.update(planDomain, new LambdaQueryWrapper<CostPlanDomain>()
.eq(CostPlanDomain::getCostPlanNo, planDomain.getCostPlanNo())); .eq(CostPlanDomain::getCostPlanNo, planDomain.getCostPlanNo()));
......
...@@ -2,7 +2,7 @@ spring: ...@@ -2,7 +2,7 @@ spring:
# 数据源配置 # 数据源配置
datasource: datasource:
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://cdb-aanqm573.gz.tencentcdb.com:10120/bailun_other?useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true url: jdbc:mysql://cdb-aanqm573.gz.tencentcdb.com:10120/bailun_other_pre?useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true
username: root username: root
password: 'Aarob2020#' password: 'Aarob2020#'
hikari: hikari:
......
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