Commit ab90cce4 by huluobin

# update

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