bug修改
This commit is contained in:
parent
16b4638316
commit
93eda31ccb
|
|
@ -142,7 +142,7 @@ public class OptionalEbomApi extends BaseApi {
|
|||
@ApiOperation("删除选配数据")
|
||||
public ResultVO<Boolean> deleteOption(@RequestBody List<Long> rowIds) {
|
||||
|
||||
if (! CollectionUtil.isNotEmpty(rowIds)) {
|
||||
if ( CollectionUtil.isEmpty(rowIds)) {
|
||||
return ResultVO.error(STATE.ParamErr, "选择待删除数据");
|
||||
}
|
||||
|
||||
|
|
@ -169,9 +169,16 @@ public class OptionalEbomApi extends BaseApi {
|
|||
if(dto.getPartType() == OptionalBomConstant.PartTypeEnum.PART_TYPE_RADIO.getValue() &&( dto.getParentRowId()==null || dto.getParentRowId()==0)){
|
||||
return ResultVO.error("标配件parentRowId不能为空");
|
||||
}
|
||||
if(dto.getPartType() == OptionalBomConstant.PartTypeEnum.PART_TYPE_CHECBOX.getValue()){
|
||||
dto.setParentRowId(null);
|
||||
}
|
||||
|
||||
if(this.optionalEbomImportChildService.insertOption(dto)){
|
||||
return ResultVO.success(true);
|
||||
}else{
|
||||
return ResultVO.error(STATE.Error,"添加失败");
|
||||
}
|
||||
|
||||
return ResultVO.success(this.optionalEbomImportChildService.insertOption(dto));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -193,16 +200,7 @@ public class OptionalEbomApi extends BaseApi {
|
|||
|
||||
|
||||
|
||||
@PostMapping("submitTmpWork")
|
||||
@ApiOperation("提交生成暂存")
|
||||
public ResultVO<Boolean> submitTmpWork(@RequestBody OptionalEbomConfigDTO dto) {
|
||||
try {
|
||||
return ResultVO.success(optionalEbomConfigService.buildTmpWork(dto));
|
||||
} catch (NflgBusinessException e) {
|
||||
return ResultVO.error(e.getState(), e.getMsg());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -238,10 +236,25 @@ public class OptionalEbomApi extends BaseApi {
|
|||
return ResultVO.success(aggregOptionConfigService.tmpOptionTree(rowId));
|
||||
}
|
||||
|
||||
@PutMapping ("submiTmpOptionTree")
|
||||
@ApiOperation("变更暂存数据")
|
||||
public ResultVO<Boolean> submiTmpOptionTree(OptionalEbomConfigDTO dto) {
|
||||
return ResultVO.success(aggregOptionConfigService.submiTmpOptionTree(dto));
|
||||
@PostMapping ("submitTmpOptionTree")
|
||||
@ApiOperation("提交/变更暂存数据")
|
||||
public ResultVO<Boolean> submitTmpOptionTree(OptionalEbomConfigDTO dto) {
|
||||
|
||||
if(dto.getRowId()==null) {
|
||||
try{
|
||||
return ResultVO.success(optionalEbomConfigService.buildTmpWork(dto));
|
||||
} catch (NflgBusinessException e) {
|
||||
return ResultVO.error(e.getState(), e.getMsg());
|
||||
}
|
||||
|
||||
}else{
|
||||
return ResultVO.success(aggregOptionConfigService.submitTmpOptionTree(dto));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -69,14 +69,16 @@ public class OptionalEbomMainService extends ServiceImpl<OptionalEbomMainMapper,
|
|||
optionalEbomImportChildService.deleteByRootId(dto);
|
||||
|
||||
|
||||
return rows > 0;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public OptionalEbomMainVO getByRowId(Long id) {
|
||||
OptionalEbomMainEntity entity = this.getBaseMapper().selectById(id);
|
||||
OptionalEbomMainVO vo = new OptionalEbomMainVO();
|
||||
if(entity!=null) {
|
||||
BeanUtils.copyProperties(entity, vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public class AggregOptionConfigService {
|
|||
OptionalEbomConfigAggregVO optionalEbomConfigAggregVO = new OptionalEbomConfigAggregVO();
|
||||
optionalEbomConfigAggregVO.setSingleList(listParent);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(mulList)) {
|
||||
if (CollectionUtil.isEmpty(mulList)) {
|
||||
mulList = new ArrayList<OptionalEbomImportChildVO>();
|
||||
}
|
||||
|
||||
|
|
@ -168,6 +168,7 @@ public class AggregOptionConfigService {
|
|||
if(CollectionUtil.isNotEmpty(dto.getOptions())){
|
||||
List<OptionalEbomImportChildEntity> optionalEbomImportChildEntityList = Convert.convert(new TypeReference<List<OptionalEbomImportChildEntity>>() {
|
||||
}, dto.getOptions());
|
||||
|
||||
if (CollectionUtil.isNotEmpty(optionalEbomImportChildEntityList)) {
|
||||
optionalEbomImportChildEntityList.forEach(item -> {
|
||||
item.setUpdatedTime(new Date());
|
||||
|
|
@ -209,7 +210,7 @@ public class AggregOptionConfigService {
|
|||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
public Boolean submiTmpOptionTree(OptionalEbomConfigDTO dto) {
|
||||
public Boolean submitTmpOptionTree(OptionalEbomConfigDTO dto) {
|
||||
|
||||
OptionalEbomConfigEntity entity= optionalEbomConfigService.getById(dto.getRowId());
|
||||
OptionalEbomConfigEntity optionalEbomConfigEntity =new OptionalEbomConfigEntity();
|
||||
|
|
|
|||
|
|
@ -32,19 +32,19 @@
|
|||
from t_optional_ebom_config
|
||||
<where>
|
||||
|
||||
<if test="deviceNo != null and deviceNo != ''">
|
||||
device_no = #{deviceNo}
|
||||
<if test="query.deviceNo != null and query.deviceNo != ''">
|
||||
device_no = #{query.deviceNo}
|
||||
</if>
|
||||
<if test="createdBy != null and createdBy != ''">
|
||||
and created_by = #{createdBy}
|
||||
<if test="query.createdBy != null and query.createdBy != ''">
|
||||
and created_by = #{query.createdBy}
|
||||
</if>
|
||||
|
||||
<if test="editStatus != null">
|
||||
and edit_status = #{editStatus}
|
||||
<if test="query.editStatus != null">
|
||||
and edit_status = #{query.editStatus}
|
||||
</if>
|
||||
|
||||
<if test="startTime!= null and endTime != null">
|
||||
<![CDATA[and created_time >= #{startTime} and created_time < #{endTime} ]]>
|
||||
<if test="query.startTime!= null and query.endTime != null">
|
||||
<![CDATA[and created_time >= #{query.tartTime} and created_time < #{query.endTime} ]]>
|
||||
</if>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue