This commit is contained in:
张秉卓
2026-01-22 17:27:41 +08:00
14 changed files with 198 additions and 78 deletions

View File

@ -5,6 +5,7 @@ import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pictc.annotations.datalog.JoinCaseType; import com.pictc.annotations.datalog.JoinCaseType;
import com.pictc.annotations.datalog.JoinType; import com.pictc.annotations.datalog.JoinType;
import com.pictc.annotations.datalog.LogField; import com.pictc.annotations.datalog.LogField;
@ -70,6 +71,7 @@ public class UpdateLngPngDemandDto implements Serializable {
*/ */
@LogField(name="计划日期",index=5) @LogField(name="计划日期",index=5)
@ApiModelProperty("计划日期(次日计划为次日;当日计划为当日;同日、同客户、同销售合同交割点、同上载点、同供应商不能重复(仅检查最新版并去掉变更标识为删除的))") @ApiModelProperty("计划日期(次日计划为次日;当日计划为当日;同日、同客户、同销售合同交割点、同上载点、同供应商不能重复(仅检查最新版并去掉变更标识为删除的))")
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDateTime datePlan; private LocalDateTime datePlan;
/** /**
@ -266,16 +268,5 @@ public class UpdateLngPngDemandDto implements Serializable {
caseType = JoinCaseType.FULL, target = UpdateLngPngDemandPurDto.class, type = JoinType.MANY) caseType = JoinCaseType.FULL, target = UpdateLngPngDemandPurDto.class, type = JoinType.MANY)
private List<UpdateLngPngDemandPurDto> lngPngDemandPurList; private List<UpdateLngPngDemandPurDto> lngPngDemandPurList;
/**
* lngPngApproPur
*/
/**
@ApiModelProperty("lngPngAppro子表")
@LogJoin(name = "lngPngAppro子表",
columns = {
@LogJoinColumn(field = "demandId",relatedField = "id", valueDirection = ValueDirectionType.RIGHT)
},
caseType = JoinCaseType.FULL, target = UpdateLngPngApproPurDto.class, type = JoinType.MANY)
private List<UpdateLngPngApproDto> lngPngApproList;
**/
} }

View File

@ -83,6 +83,8 @@ public class LngPngDemandVo extends com.xjrsoft.common.model.base.BaseModel{
@ApiModelProperty("合同-主信息主键(销售)(lng_contract)") @ApiModelProperty("合同-主信息主键(销售)(lng_contract)")
private Long ksId; private Long ksId;
private String kName;
/** /**
* 合同-国内销售-管道气-交割点主键(lng_contract_sales_png_point) * 合同-国内销售-管道气-交割点主键(lng_contract_sales_png_point)
@ -95,7 +97,9 @@ public class LngPngDemandVo extends com.xjrsoft.common.model.base.BaseModel{
* 交割点编码 * 交割点编码
*/ */
@ApiModelProperty("交割点编码") @ApiModelProperty("交割点编码")
@Trans(type = TransType.LNG_STATION, transToFieldName = "pointDelyName")
private String pointDelyCode; private String pointDelyCode;
private String pointDelyName;
/** /**
@ -214,8 +218,9 @@ public class LngPngDemandVo extends com.xjrsoft.common.model.base.BaseModel{
* 审批状态(待提交/审批中/已审批/已驳回) * 审批状态(待提交/审批中/已审批/已驳回)
*/ */
@ApiModelProperty("审批状态(待提交/审批中/已审批/已驳回)") @ApiModelProperty("审批状态(待提交/审批中/已审批/已驳回)")
@Trans(type = TransType.DIC, id = "1990669393069129729", transToFieldName = "approName")
private String approCode; private String approCode;
private String approName;
/** /**
* 提交时间 * 提交时间

View File

@ -23,11 +23,15 @@ import com.alibaba.excel.support.ExcelTypeEnum;
import com.pictc.datalog.DataOperationContent; import com.pictc.datalog.DataOperationContent;
import com.pictc.datalog.DataOperationListener; import com.pictc.datalog.DataOperationListener;
import com.pictc.enums.BusinessCode; import com.pictc.enums.BusinessCode;
import com.pictc.enums.ExceptionCommonCode;
import com.pictc.jdbc.JdbcTools;
import com.pictc.jdbc.model.JdbcParam;
import com.pictc.utils.DataLogTools; import com.pictc.utils.DataLogTools;
import com.xjrsoft.common.exception.BusinessException; import com.xjrsoft.common.exception.BusinessException;
import com.xjrsoft.common.model.result.R; import com.xjrsoft.common.model.result.R;
import com.xjrsoft.common.page.PageOutput; import com.xjrsoft.common.page.PageOutput;
import com.xjrsoft.common.utils.ExcelUtil; import com.xjrsoft.common.utils.ExcelUtil;
import com.xjrsoft.module.common.db.utils.CommonCallUtils;
import com.xjrsoft.module.datalog.service.DatalogService; import com.xjrsoft.module.datalog.service.DatalogService;
import com.xjrsoft.module.datalog.vo.DataChangeLogVo; import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
import com.xjrsoft.module.dayPlan.dto.LngPngDemandPageDto; import com.xjrsoft.module.dayPlan.dto.LngPngDemandPageDto;
@ -38,7 +42,7 @@ import com.xjrsoft.module.dayPlan.service.IDemandService;
import com.xjrsoft.module.dayPlan.vo.LngPngDemandPageVo; import com.xjrsoft.module.dayPlan.vo.LngPngDemandPageVo;
import com.xjrsoft.module.dayPlan.vo.LngPngDemandPurVo; import com.xjrsoft.module.dayPlan.vo.LngPngDemandPurVo;
import com.xjrsoft.module.dayPlan.vo.LngPngDemandVo; import com.xjrsoft.module.dayPlan.vo.LngPngDemandVo;
import com.pictc.utils.StringUtils;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -66,8 +70,8 @@ public class DemandController {
@ApiOperation(value="LngPngDemand列表(分页)") @ApiOperation(value="LngPngDemand列表(分页)")
@SaCheckPermission("demand:list") @SaCheckPermission("demand:list")
public R page(@Valid LngPngDemandPageDto dto){ public R page(@Valid LngPngDemandPageDto dto){
return null;
return R.ok(demandService.queryPage(dto)); //return R.ok(demandService.queryPage(dto));
} }
@GetMapping(value = "/info") @GetMapping(value = "/info")
@ -99,8 +103,19 @@ public class DemandController {
@Override @Override
public UpdateLngPngDemandDto after(DataOperationContent<UpdateLngPngDemandDto> content) { public UpdateLngPngDemandDto after(DataOperationContent<UpdateLngPngDemandDto> content) {
String sql = StringUtils.format("{? = call pc_{0}.f_save(?,?)}",
return null; content.getTableName());
List<JdbcParam> params = Lists.newArrayList();
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
params.add(outParam);
params.add(JdbcParam.ofLong(content.getIdValue()));
params.add(JdbcParam.ofString("I"));
JdbcTools.call(sql,params);
String error = outParam.getStringValue();
if (StringUtils.isNotEmpty(error)) {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
}
return content.getObj();
} }
})); }));
@ -110,6 +125,8 @@ public class DemandController {
@ApiOperation(value = "编辑LngPngDemand") @ApiOperation(value = "编辑LngPngDemand")
@SaCheckPermission("demand:edit") @SaCheckPermission("demand:edit")
public R update(@Valid @RequestBody UpdateLngPngDemandDto dto){ public R update(@Valid @RequestBody UpdateLngPngDemandDto dto){
dto.setOrgId(dto.getId());
return R.ok(dataService.updateById(dto,new DataOperationListener<UpdateLngPngDemandDto>() { return R.ok(dataService.updateById(dto,new DataOperationListener<UpdateLngPngDemandDto>() {
@Override @Override
@ -119,12 +136,31 @@ public class DemandController {
@Override @Override
public UpdateLngPngDemandDto after(DataOperationContent<UpdateLngPngDemandDto> content) { public UpdateLngPngDemandDto after(DataOperationContent<UpdateLngPngDemandDto> content) {
String sql = StringUtils.format("{? = call pc_{0}.f_save(?,?)}",
return null; content.getTableName());
List<JdbcParam> params = Lists.newArrayList();
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
params.add(outParam);
params.add(JdbcParam.ofLong(content.getIdValue()));
params.add(JdbcParam.ofString("U"));
JdbcTools.call(sql,params);
String error = outParam.getStringValue();
if (StringUtils.isNotEmpty(error)) {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
}
return content.getObj();
} }
})); }));
} }
@PostMapping(value="/saveAndSubmit")
@ApiOperation(value = "保存并提交LngPngDemand")
//@SaCheckPermission("demand:edit")
public R saveAndSubmit(@Valid @RequestBody UpdateLngPngDemandDto dto){
demandService.saveAndSubmit(dto);
return R.ok();
}
@PostMapping(value="/toChange") @PostMapping(value="/toChange")
@ApiOperation(value = "变更LngPngDemand") @ApiOperation(value = "变更LngPngDemand")
//@SaCheckPermission("demand:toChange") //@SaCheckPermission("demand:toChange")
@ -230,20 +266,9 @@ public class DemandController {
@PostMapping(value="/submit") @PostMapping(value="/submit")
@ApiOperation(value = "提交LngPngDemand") @ApiOperation(value = "提交LngPngDemand")
//@SaCheckPermission("demand:edit") //@SaCheckPermission("demand:edit")
public R submit(@Valid @RequestBody UpdateLngPngDemandDto dto){ public R submit(@Valid @RequestBody List<Long> ids){
return R.ok(dataService.updateById(dto,new DataOperationListener<UpdateLngPngDemandDto>() { demandService.submit(ids);
return R.ok();
@Override
public UpdateLngPngDemandDto before(DataOperationContent<UpdateLngPngDemandDto> content) {
return null;
}
@Override
public UpdateLngPngDemandDto after(DataOperationContent<UpdateLngPngDemandDto> content) {
return null;
}
}));
} }
@PostMapping("/import") @PostMapping("/import")

View File

@ -1,5 +1,7 @@
package com.xjrsoft.module.dayPlan.mapper; package com.xjrsoft.module.dayPlan.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
@ -11,7 +13,9 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.github.yulichang.base.MPJBaseMapper; import com.github.yulichang.base.MPJBaseMapper;
import com.xjrsoft.module.dayPlan.dto.LngPngDemandPageDto; import com.xjrsoft.module.dayPlan.dto.LngPngDemandPageDto;
import com.xjrsoft.module.dayPlan.entity.LngPngDemand; import com.xjrsoft.module.dayPlan.entity.LngPngDemand;
import com.xjrsoft.module.dayPlan.vo.LngPngApproVo;
import com.xjrsoft.module.dayPlan.vo.LngPngDemandPageVo; import com.xjrsoft.module.dayPlan.vo.LngPngDemandPageVo;
import com.xjrsoft.module.dayPlan.vo.LngPngDemandVo;
/** /**
* @title: mapper * @title: mapper
@ -43,4 +47,11 @@ public interface LngPngDemandMapper extends MPJBaseMapper<LngPngDemand>,BaseMapp
" JOIN lng_png_approval a ON a.appro_id=pa.id " + " JOIN lng_png_approval a ON a.appro_id=pa.id " +
" WHERE d.id = #{id}") " WHERE d.id = #{id}")
Long getApprovedCount(@Param("id") Long id); Long getApprovedCount(@Param("id") Long id);
@Select("SELECT d.*,k.k_name"+
" FROM lng_png_demand d" +
" LEFT JOIN lng_contract k ON k.id=d.ks_id" +
" WHERE d.id = #{id}")
LngPngDemandVo getInfoBygId(@Param("id") Long id);
} }

View File

@ -10,6 +10,7 @@ import com.github.yulichang.extension.mapping.base.MPJRelationService;
import com.xjrsoft.common.model.result.R; import com.xjrsoft.common.model.result.R;
import com.xjrsoft.common.page.PageOutput; import com.xjrsoft.common.page.PageOutput;
import com.xjrsoft.module.dayPlan.dto.LngPngDemandPageDto; import com.xjrsoft.module.dayPlan.dto.LngPngDemandPageDto;
import com.xjrsoft.module.dayPlan.dto.UpdateLngPngDemandDto;
import com.xjrsoft.module.dayPlan.entity.LngPngDemand; import com.xjrsoft.module.dayPlan.entity.LngPngDemand;
import com.xjrsoft.module.dayPlan.vo.LngPngDemandPageVo; import com.xjrsoft.module.dayPlan.vo.LngPngDemandPageVo;
import com.xjrsoft.module.dayPlan.vo.LngPngDemandVo; import com.xjrsoft.module.dayPlan.vo.LngPngDemandVo;
@ -23,7 +24,7 @@ import com.xjrsoft.module.dayPlan.vo.LngPngDemandVo;
public interface IDemandService extends MPJBaseService<LngPngDemand>, MPJDeepService<LngPngDemand>, MPJRelationService<LngPngDemand> { public interface IDemandService extends MPJBaseService<LngPngDemand>, MPJDeepService<LngPngDemand>, MPJRelationService<LngPngDemand> {
PageOutput<LngPngDemandPageVo> queryPage(LngPngDemandPageDto dto); //PageOutput<LngPngDemandPageVo> queryPage(LngPngDemandPageDto dto);
LngPngDemandVo getInfoById(Long id); LngPngDemandVo getInfoById(Long id);
@ -35,5 +36,9 @@ public interface IDemandService extends MPJBaseService<LngPngDemand>, MPJDeepSer
void deleteByIds(@Valid List<Long> ids); void deleteByIds(@Valid List<Long> ids);
void submit(@Valid List<Long> ids);
void saveAndSubmit(@Valid UpdateLngPngDemandDto dto);
} }

View File

@ -2,6 +2,7 @@ package com.xjrsoft.module.dayPlan.service.impl;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
@ -9,22 +10,20 @@ import java.util.stream.Collectors;
import javax.validation.Valid; import javax.validation.Valid;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.yulichang.base.MPJBaseServiceImpl; import com.github.yulichang.base.MPJBaseServiceImpl;
import com.pictc.datalog.DataOperationContent; import com.pictc.datalog.DataOperationContent;
import com.pictc.datalog.DataOperationListener; import com.pictc.datalog.DataOperationListener;
import com.pictc.enums.BusinessCode; import com.pictc.enums.BusinessCode;
import com.pictc.enums.ExceptionCommonCode;
import com.pictc.jdbc.JdbcTools;
import com.pictc.jdbc.model.JdbcParam;
import com.pictc.utils.DataLogTools; import com.pictc.utils.DataLogTools;
import com.pictc.utils.StringUtils;
import com.xjrsoft.common.exception.BusinessException; import com.xjrsoft.common.exception.BusinessException;
import com.xjrsoft.common.page.ConventPage;
import com.xjrsoft.common.page.PageOutput;
import com.xjrsoft.module.datalog.service.DatalogService; import com.xjrsoft.module.datalog.service.DatalogService;
import com.xjrsoft.module.dayPlan.dto.LngPngDemandPageDto;
import com.xjrsoft.module.dayPlan.dto.UpdateLngPngApproDto; import com.xjrsoft.module.dayPlan.dto.UpdateLngPngApproDto;
import com.xjrsoft.module.dayPlan.dto.UpdateLngPngDemandDto; import com.xjrsoft.module.dayPlan.dto.UpdateLngPngDemandDto;
import com.xjrsoft.module.dayPlan.entity.LngPngAppro; import com.xjrsoft.module.dayPlan.entity.LngPngAppro;
@ -35,7 +34,7 @@ import com.xjrsoft.module.dayPlan.mapper.LngPngDemandMapper;
import com.xjrsoft.module.dayPlan.mapper.LngPngDemandPurMapper; import com.xjrsoft.module.dayPlan.mapper.LngPngDemandPurMapper;
import com.xjrsoft.module.dayPlan.service.IDemandService; import com.xjrsoft.module.dayPlan.service.IDemandService;
import com.xjrsoft.module.dayPlan.vo.LngPngDemandChangeDetailVo; import com.xjrsoft.module.dayPlan.vo.LngPngDemandChangeDetailVo;
import com.xjrsoft.module.dayPlan.vo.LngPngDemandPageVo; import com.xjrsoft.module.dayPlan.vo.LngPngDemandPurVo;
import com.xjrsoft.module.dayPlan.vo.LngPngDemandVo; import com.xjrsoft.module.dayPlan.vo.LngPngDemandVo;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
@ -60,29 +59,20 @@ public class DemandServiceImpl extends MPJBaseServiceImpl<LngPngDemandMapper, Ln
private final DatalogService dataService; private final DatalogService dataService;
@Override
public PageOutput<LngPngDemandPageVo> queryPage(LngPngDemandPageDto dto) {
QueryWrapper<LngPngDemand> queryWrapper = new QueryWrapper<>();
queryWrapper
.and(StringUtils.isNotBlank(dto.getKName()), r ->
r.like("k.k_no", dto.getKName())
.or()
.like("k.k_name", dto.getKName())
)
.like(StringUtils.isNotBlank(dto.getPointDelyName()), "sp.full_name", dto.getPointDelyName())
.eq("d.last_ver_sign", "Y");
IPage<LngPngDemandPageVo> page = this.baseMapper.queryPage(ConventPage.getPage(dto), queryWrapper);
PageOutput<LngPngDemandPageVo> pageOutput = ConventPage.getPageOutput(page, LngPngDemandPageVo.class);
return pageOutput;
}
@Override @Override
public LngPngDemandVo getInfoById(Long id) { public LngPngDemandVo getInfoById(Long id) {
LngPngDemand lngPngDemand = this.getByIdDeep(id); LngPngDemandVo lngPngDemandVo = this.baseMapper.getInfoBygId(id);
if (lngPngDemand == null) { if (lngPngDemandVo == null) {
return null; return null;
} }
return BeanUtil.toBean(lngPngDemand, LngPngDemandVo.class); LambdaQueryWrapper<LngPngDemandPur> queryPurWrapper = new LambdaQueryWrapper<>();
queryPurWrapper.eq(LngPngDemandPur::getDemandId,id);
queryPurWrapper.orderByAsc(LngPngDemandPur::getSort);
List<LngPngDemandPur> purList = demandPurMapper.selectList(queryPurWrapper);
lngPngDemandVo.setLngPngDemandPurList(BeanUtil.copyToList(purList, LngPngDemandPurVo.class));
return lngPngDemandVo;
} }
@Override @Override
@ -267,7 +257,7 @@ public class DemandServiceImpl extends MPJBaseServiceImpl<LngPngDemandMapper, Ln
throw new BusinessException(BusinessCode.of(10500,"找不到此数据!")); throw new BusinessException(BusinessCode.of(10500,"找不到此数据!"));
} }
if(!"WTJ".equals(lngPngDemand.getApproCode()) || !"YBH".equals(lngPngDemand.getApproCode()) ) { if(!"WTJ".equals(lngPngDemand.getApproCode()) && !"YBH".equals(lngPngDemand.getApproCode()) ) {
throw new BusinessException(BusinessCode.of(10500,"审批状态变化,不能删除")); throw new BusinessException(BusinessCode.of(10500,"审批状态变化,不能删除"));
} }
LambdaQueryWrapper<LngPngDemand> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<LngPngDemand> queryWrapper = new LambdaQueryWrapper<>();
@ -306,5 +296,98 @@ public class DemandServiceImpl extends MPJBaseServiceImpl<LngPngDemandMapper, Ln
} }
@Override
public void submit(@Valid List<Long> ids) {
List<UpdateLngPngDemandDto> tempList = Lists.newArrayList();
//List<Long> ids = dtoList.stream().map(UpdateLngPngDemandDto::getId).collect(Collectors.toList());
for(Long id:ids) {
LngPngDemand lngPngDemand = this.getByIdDeep(id);
if (lngPngDemand == null) {
throw new BusinessException(BusinessCode.of(10500,"找不到此数据!"));
}
if(!"WTJ".equals(lngPngDemand.getApproCode()) && !"YBH".equals(lngPngDemand.getApproCode()) ) {
throw new BusinessException(BusinessCode.of(10500,"审批状态变化,不能提交"));
}
lngPngDemand.setApproCode("SPZ");
lngPngDemand.setTimeSubmit(LocalDateTime.now());
tempList.add(BeanUtil.copyProperties(lngPngDemand,UpdateLngPngDemandDto.class));
}
dataService.insertBatch(tempList,new DataOperationListener<UpdateLngPngDemandDto>() {
@Override
public UpdateLngPngDemandDto before(DataOperationContent<UpdateLngPngDemandDto> content) {
return null;
}
@Override
public UpdateLngPngDemandDto after(DataOperationContent<UpdateLngPngDemandDto> content) {
String sql = StringUtils.format("{? = call pc_{0}.f_submit(?)}",
content.getTableName());
List<JdbcParam> params = Lists.newArrayList();
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
params.add(outParam);
params.add(JdbcParam.ofLong(content.getIdValue()));
JdbcTools.call(sql,params);
String error = outParam.getStringValue();
if (StringUtils.isNotEmpty(error)) {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
}
return content.getObj();
}
});
}
@Override
public void saveAndSubmit(@Valid UpdateLngPngDemandDto dto) {
dto.setApproCode("SPZ");
dto.setTimeSubmit(LocalDateTime.now());
if(dto.getId() != null) {
LngPngDemand lngPngDemand = this.getById(dto.getId());
if (lngPngDemand == null) {
throw new BusinessException(BusinessCode.of(10500,"找不到此数据!"));
}
if(!"WTJ".equals(lngPngDemand.getApproCode()) && !"YBH".equals(lngPngDemand.getApproCode()) ) {
throw new BusinessException(BusinessCode.of(10500,"审批状态变化,不能提交"));
}
}
dataService.insert(dto,new DataOperationListener<UpdateLngPngDemandDto>() {
@Override
public UpdateLngPngDemandDto before(DataOperationContent<UpdateLngPngDemandDto> content) {
return null;
}
@Override
public UpdateLngPngDemandDto after(DataOperationContent<UpdateLngPngDemandDto> content) {
String sql = StringUtils.format("{? = call pc_{0}.f_save_submit(?,?)}",
content.getTableName());
List<JdbcParam> params = Lists.newArrayList();
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
params.add(outParam);
params.add(JdbcParam.ofLong(content.getIdValue()));
if(dto.getId() != null) {
params.add(JdbcParam.ofString("U"));
}else {
params.add(JdbcParam.ofString("I"));
}
JdbcTools.call(sql,params);
String error = outParam.getStringValue();
if (StringUtils.isNotEmpty(error)) {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
}
return content.getObj();
}
});
}
} }

View File

@ -137,7 +137,7 @@ public class BankController {
} }
codeRuleClient.useEncode(BANK_CODE); codeRuleClient.useEncode(BANK_CODE);
UpdateLngBBankDto obj = content.getObj(); UpdateLngBBankDto obj = content.getObj();
tranProvider.saveData(obj.getCode(), obj.getFullName()); tranProvider.saveData(obj.getCode(),obj);
return obj; return obj;
} }
})); }));
@ -162,7 +162,7 @@ public class BankController {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg)); throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
} }
UpdateLngBBankDto obj =content.getObj(); UpdateLngBBankDto obj =content.getObj();
tranProvider.saveData(obj.getCode(), obj.getFullName()); tranProvider.saveData(obj.getCode(), obj);
return obj; return obj;
} }
})); }));

View File

@ -141,7 +141,7 @@ public class CountryRegionController {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg)); throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
} }
UpdateLngBRegionDto obj = content.getObj(); UpdateLngBRegionDto obj = content.getObj();
tranProvider.saveData(obj.getCode(), obj.getFullName()); tranProvider.saveData(obj.getCode(), obj);
return content.getObj(); return content.getObj();
} }
})); }));
@ -177,7 +177,7 @@ public class CountryRegionController {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg)); throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
} }
UpdateLngBRegionDto obj = content.getObj(); UpdateLngBRegionDto obj = content.getObj();
tranProvider.saveData(obj.getCode(), obj.getFullName()); tranProvider.saveData(obj.getCode(), obj);
return content.getObj(); return content.getObj();
} }
})); }));

View File

@ -48,7 +48,7 @@ public class CurrencyServiceImpl extends ServiceImpl<LngBCurrencyMapper, LngBCur
this.checkParams(dto); this.checkParams(dto);
UpdateLngBCurrencyDto res = DataLogTools.insert(dto); UpdateLngBCurrencyDto res = DataLogTools.insert(dto);
this.addOrUpdateAfter(res.getId()); this.addOrUpdateAfter(res.getId());
tranProvider.saveData(dto.getCode(), dto.getFullName()); tranProvider.saveData(dto.getCode(), dto);
return res.getId(); return res.getId();
} }
@ -92,7 +92,7 @@ public class CurrencyServiceImpl extends ServiceImpl<LngBCurrencyMapper, LngBCur
this.checkParams(dto); this.checkParams(dto);
DataLogTools.update(dto); DataLogTools.update(dto);
this.addOrUpdateAfter(dto.getId()); this.addOrUpdateAfter(dto.getId());
tranProvider.saveData(dto.getCode(), dto.getFullName()); tranProvider.saveData(dto.getCode(), dto);
return true; return true;
} }

View File

@ -52,7 +52,7 @@ public class LNGStationServiceImpl extends ServiceImpl<LngBStationLngMapper, Lng
UpdateLngBStationLngDto res = DataLogTools.insert(dto); UpdateLngBStationLngDto res = DataLogTools.insert(dto);
codeRuleClient.useEncode(STATIONCODE); codeRuleClient.useEncode(STATIONCODE);
this.addOrUpdateAfter(res.getId()); this.addOrUpdateAfter(res.getId());
tranProvider.saveData(dto.getCode(), dto.getFullName()); tranProvider.saveData(dto.getCode(), dto);
return res.getId(); return res.getId();
} }
@ -86,7 +86,7 @@ public class LNGStationServiceImpl extends ServiceImpl<LngBStationLngMapper, Lng
this.checkParams(dto); this.checkParams(dto);
DataLogTools.update(dto); DataLogTools.update(dto);
this.addOrUpdateAfter(dto.getId()); this.addOrUpdateAfter(dto.getId());
tranProvider.saveData(dto.getCode(), dto.getFullName()); tranProvider.saveData(dto.getCode(), dto);
return true; return true;
} }

View File

@ -126,7 +126,7 @@ public class CustomerController {
} }
codeRuleClient.useEncode(CUSTOMER_CODE); codeRuleClient.useEncode(CUSTOMER_CODE);
UpdateLngCustomerDto obj =content.getObj(); UpdateLngCustomerDto obj =content.getObj();
tranProvider.saveData(obj.getCuCode(), obj.getCuName()); tranProvider.saveData(obj.getCuCode(), obj);
return obj; return obj;
} }
})); }));
@ -153,7 +153,7 @@ public class CustomerController {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg)); throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
} }
UpdateLngCustomerDto obj =content.getObj(); UpdateLngCustomerDto obj =content.getObj();
tranProvider.saveData(obj.getCuCode(), obj.getCuName()); tranProvider.saveData(obj.getCuCode(), obj);
return obj; return obj;
} }
})); }));

View File

@ -124,7 +124,7 @@ public class GradeSystemController {
} }
codeRuleClient.useEncode(GS_CODE); codeRuleClient.useEncode(GS_CODE);
UpdateLngGradeSystemDto obj =content.getObj(); UpdateLngGradeSystemDto obj =content.getObj();
tranProvider.saveData(obj.getId().toString(), obj.getGsName()); tranProvider.saveData(obj.getId().toString(), obj);
return obj; return obj;
} }
}); });
@ -152,7 +152,7 @@ public class GradeSystemController {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg)); throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
} }
UpdateLngGradeSystemDto obj =content.getObj(); UpdateLngGradeSystemDto obj =content.getObj();
tranProvider.saveData(obj.getId().toString(), obj.getGsName()); tranProvider.saveData(obj.getId().toString(), obj);
return obj; return obj;
} }
})); }));

View File

@ -123,7 +123,7 @@ public class SupplierController {
} }
codeRuleClient.useEncode(SUPPLIER_CODE); codeRuleClient.useEncode(SUPPLIER_CODE);
UpdateLngSupplierDto obj =content.getObj(); UpdateLngSupplierDto obj =content.getObj();
tranProvider.saveData(obj.getSuCode(), obj.getSuName()); tranProvider.saveData(obj.getSuCode(), obj);
return obj; return obj;
} }
})); }));
@ -149,7 +149,7 @@ public class SupplierController {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg)); throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
} }
UpdateLngSupplierDto obj =content.getObj(); UpdateLngSupplierDto obj =content.getObj();
tranProvider.saveData(obj.getSuCode(), obj.getSuName()); tranProvider.saveData(obj.getSuCode(), obj);
return obj; return obj;
} }
})); }));

View File

@ -7,7 +7,7 @@ spring:
main: main:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
profiles: profiles:
active: local active: dev
cloud: cloud:
nacos: #nacos监控 nacos: #nacos监控
config: config: