1.完成添加编辑单据类型接口

master
x_z 2 years ago
parent 9ebf416b75
commit 83ef10e32f

@ -1,5 +1,6 @@
package com.glxp.api;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
@ -9,6 +10,7 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
@SpringBootApplication
@ServletComponentScan
@MapperScan("com.glxp.api.dao")
public class ApiAdminApplication extends SpringBootServletInitializer {

@ -1,5 +1,6 @@
package com.glxp.api.controller.basic;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
@ -8,6 +9,7 @@ import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.req.basic.BussinessTypeSaveRequest;
import com.glxp.api.req.basic.FilterBussinessTypeRequest;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.basic.BasicBussinessTypeResponse;
@ -24,6 +26,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
@ -56,19 +59,21 @@ public class BasicBussinessTypeController {
/**
*
*
* @param bussinessTypeEntity
* @param bussinessTypeSaveRequest
* @param bindingResult
* @return
*/
@PostMapping("/udiwms/bussinessType/insert")
public BaseResponse insertBussinessType(@RequestBody BasicBussinessTypeEntity bussinessTypeEntity, BindingResult bindingResult) {
@PostMapping(value = "/udiwms/bussinessType/insert")
public BaseResponse insertBussinessType(@RequestBody @Valid BussinessTypeSaveRequest bussinessTypeSaveRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (bussinessTypeEntity != null) {
bussinessTypeEntity.setAction("SC" + CustomUtil.getId());
basicBussinessTypeService.insertBussinessType(bussinessTypeEntity);
if (bussinessTypeSaveRequest != null) {
bussinessTypeSaveRequest.setAction("SC" + CustomUtil.getId());
BasicBussinessTypeEntity basicBussinessTypeEntity = new BasicBussinessTypeEntity();
BeanUtil.copyProperties(bussinessTypeSaveRequest, basicBussinessTypeEntity);
basicBussinessTypeService.insertBussinessType(basicBussinessTypeEntity);
} else {
ResultVOUtils.error(999, "参数错误");
}
@ -83,13 +88,15 @@ public class BasicBussinessTypeController {
* @return
*/
@PostMapping("/udiwms/bussinessType/update")
public BaseResponse updateBussinessType(@RequestBody BasicBussinessTypeEntity bussinessTypeEntity,
public BaseResponse updateBussinessType(@RequestBody BussinessTypeSaveRequest bussinessTypeSaveRequest,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (bussinessTypeEntity != null) {
basicBussinessTypeService.updateBussinessType(bussinessTypeEntity);
if (bussinessTypeSaveRequest != null) {
BasicBussinessTypeEntity basicBussinessTypeEntity = new BasicBussinessTypeEntity();
BeanUtil.copyProperties(bussinessTypeSaveRequest, basicBussinessTypeEntity);
basicBussinessTypeService.updateBussinessType(basicBussinessTypeEntity);
} else {
ResultVOUtils.error(999, "参数错误");
}

@ -34,5 +34,5 @@ public interface BasicBussinessTypeDao extends BaseMapper<BasicBussinessTypeEnti
* @param bussinessTypeFilterRequest
* @return
*/
List<BasicBussinessTypeEntity> selectList(FilterBussinessTypeRequest bussinessTypeFilterRequest);
List<BasicBussinessTypeEntity> selectBusList(FilterBussinessTypeRequest bussinessTypeFilterRequest);
}

@ -1,6 +1,7 @@
package com.glxp.api.entity.basic;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -23,265 +24,318 @@ public class BasicBussinessTypeEntity {
/**
*
*/
@TableField(value = "mainAction")
private String mainAction;
/**
*
*/
@TableField(value = "action")
private String action;
/**
*
*/
@TableField(value = "name")
private String name;
/**
* , 0 1
*/
private Boolean enable;
@TableField(value = "enable")
private boolean enable;
/**
*
*/
@TableField(value = "remark")
private String remark;
/**
*
*/
@TableField(value = "thirdSysFk")
private String thirdSysFk;
/**
* 1.2.
*/
private Boolean genUnit;
@TableField(value = "genUnit")
private boolean genUnit;
/**
* 1.0
*/
private Boolean innerOrder;
@TableField(value = "innerOrder")
private boolean innerOrder;
/**
*
*/
private Boolean secCheckEnable;
@TableField(value = "secCheckEnable")
private boolean secCheckEnable;
/**
*
*/
private Boolean checkEnable;
@TableField(value = "checkEnable")
private boolean checkEnable;
/**
* UDIMS
*/
private Boolean checkUdims;
@TableField(value = "checkUdims")
private boolean checkUdims;
/**
* pda
*/
private Boolean checkPdaEd;
@TableField(value = "checkPdaEd")
private boolean checkPdaEd;
/**
* pda
*/
private Boolean checkPdaUn;
@TableField(value = "checkPdaUn")
private boolean checkPdaUn;
/**
* PC
*/
private Boolean checkPc;
@TableField(value = "checkPc")
private boolean checkPc;
/**
* web
*/
private Boolean checkWebNew;
@TableField(value = "checkWebNew")
private boolean checkWebNew;
/**
*
*/
private Boolean checkSp;
@TableField(value = "checkSp")
private boolean checkSp;
/**
*
*/
private Boolean checkChange;
@TableField(value = "checkChange")
private boolean checkChange;
/**
* UDIMS
*/
private Boolean secCheckUdims;
@TableField(value = "secCheckUdims")
private boolean secCheckUdims;
/**
*
*/
private Boolean secCheckPdaEd;
@TableField(value = "secCheckPdaEd")
private boolean secCheckPdaEd;
/**
*
*/
private Boolean secCheckPdaUn;
@TableField(value = "secCheckPdaUn")
private boolean secCheckPdaUn;
/**
* UDI
*/
private Boolean secCheckPc;
@TableField(value = "secCheckPc")
private boolean secCheckPc;
/**
* web
*/
private Boolean secCheckWebNew;
@TableField(value = "secCheckWebNew")
private boolean secCheckWebNew;
/**
*
*/
private Boolean secCheckChange;
@TableField(value = "secCheckChange")
private boolean secCheckChange;
/**
*
*/
private Boolean secCheckSp;
@TableField(value = "secCheckSp")
private boolean secCheckSp;
/**
*
*/
private Boolean corpType;
@TableField(value = "corpType")
private int corpType;
/**
*
*/
@TableField(value = "supplementOrderType")
private String supplementOrderType;
/**
*
*/
private Boolean checkBalance;
@TableField(value = "checkBalance")
private boolean checkBalance;
/**
*
*/
private Boolean secCheckBalance;
@TableField(value = "secCheckBalance")
private boolean secCheckBalance;
/**
* 使
*/
private Boolean useDyCount;
@TableField(value = "useDyCount")
private boolean useDyCount;
/**
*
*/
private Boolean expireTip;
@TableField(value = "expireTip")
private boolean expireTip;
/**
*
*/
@TableField(value = "updateTime")
private Date updateTime;
/**
*
*/
@TableField(value = "defaultUnit")
private String defaultUnit;
/**
*
*/
@TableField(value = "prefix")
private String prefix;
/**
*
*/
private Boolean outToSpms;
@TableField(value = "outToSpms")
private boolean outToSpms;
/**
*
*/
private Boolean ullageFill;
@TableField(value = "ullageFill")
private boolean ullageFill;
/**
*
*/
private Boolean scanPreIn;
@TableField(value = "scanPreIn")
private boolean scanPreIn;
/**
* 访
*/
private Boolean vailInv;
@TableField(value = "vailInv")
private boolean vailInv;
/**
*
*/
private Boolean entrutSpms;
@TableField(value = "entrutSpms")
private boolean entrutSpms;
/**
*
*/
private Boolean codeFillCheck;
@TableField(value = "codeFillCheck")
private boolean codeFillCheck;
/**
*
*/
@TableField(value = "defaultSubInv")
private String defaultSubInv;
/**
*
*/
@TableField(value = "defaultInv")
private String defaultInv;
/**
* 01:
*/
private Boolean orderVisibleType;
@TableField(value = "orderVisibleType")
private boolean orderVisibleType;
/**
*
*/
private Boolean checkCopy;
@TableField(value = "checkCopy")
private boolean checkCopy;
/**
*
*/
private Boolean secCheckCopy;
@TableField(value = "secCheckCopy")
private boolean secCheckCopy;
/**
*
*/
@TableField(value = "originAction")
private String originAction;
/**
*
*/
private Boolean advanceType;
@TableField(value = "advanceType")
private boolean advanceType;
/**
*
*/
private Boolean changeEnable;
@TableField(value = "changeEnable")
private boolean changeEnable;
/**
* 使
*/
private Boolean spUse;
@TableField(value = "spUse")
private boolean spUse;
/**
*
*/
private Boolean preIn;
@TableField(value = "preIn")
private boolean preIn;
/**
*
*/
private Boolean supplementAll;
@TableField(value = "supplementAll")
private boolean supplementAll;
/**
*
*/
@TableField(value = "createUser")
private String createUser;
/**
*
*/
@TableField(value = "updateUser")
private String updateUser;
/**
*
*/
@TableField(value = "createTime")
private Date createTime;
}

@ -0,0 +1,275 @@
package com.glxp.api.req.basic;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
*
*/
@Data
public class BussinessTypeSaveRequest {
/**
* id
*/
private Long id;
/**
*
*/
@NotBlank(message = "请选择出入库类型")
private String mainAction;
/**
*
*/
private String action;
/**
*
*/
@NotBlank(message = "请输入单据类型名称")
private String name;
/**
* , 0 1
*/
private Boolean enable;
/**
*
*/
private String remark;
/**
*
*/
private String thirdSysFk;
/**
* 1.2.
*/
private Boolean genUnit;
/**
* 1.0
*/
private Boolean innerOrder;
/**
*
*/
private Boolean secCheckEnable;
/**
*
*/
private Boolean checkEnable;
/**
* UDIMS
*/
private Boolean checkUdims;
/**
* pda
*/
private Boolean checkPdaEd;
/**
* pda
*/
private Boolean checkPdaUn;
/**
* PC
*/
private Boolean checkPc;
/**
* web
*/
private Boolean checkWebNew;
/**
*
*/
private Boolean checkSp;
/**
*
*/
private Boolean checkChange;
/**
* UDIMS
*/
private Boolean secCheckUdims;
/**
*
*/
private Boolean secCheckPdaEd;
/**
*
*/
private Boolean secCheckPdaUn;
/**
* UDI
*/
private Boolean secCheckPc;
/**
* web
*/
private Boolean secCheckWebNew;
/**
*
*/
private Boolean secCheckChange;
/**
*
*/
private Boolean secCheckSp;
/**
*
*/
@NotNull(message = "请选择往来信息类型")
private Integer corpType;
/**
*
*/
private String supplementOrderType;
/**
*
*/
private Boolean checkBalance;
/**
*
*/
private Boolean secCheckBalance;
/**
* 使
*/
private Boolean useDyCount;
/**
*
*/
private Boolean expireTip;
/**
*
*/
private Date updateTime;
/**
*
*/
private String defaultUnit;
/**
*
*/
private String prefix;
/**
*
*/
private Boolean outToSpms;
/**
*
*/
private Boolean ullageFill;
/**
*
*/
private Boolean scanPreIn;
/**
* 访
*/
private Boolean vailInv;
/**
*
*/
private Boolean entrutSpms;
/**
*
*/
private Boolean codeFillCheck;
/**
*
*/
private String defaultSubInv;
/**
*
*/
private String defaultInv;
/**
* 01:
*/
private Boolean orderVisibleType;
/**
*
*/
private Boolean checkCopy;
/**
*
*/
private Boolean secCheckCopy;
/**
*
*/
private String originAction;
/**
*
*/
private Boolean advanceType;
/**
*
*/
private Boolean changeEnable;
/**
* 使
*/
private Boolean spUse;
/**
*
*/
private Boolean preIn;
/**
*
*/
private Boolean supplementAll;
}

@ -99,7 +99,7 @@ public class BasicBussinessTypeServiceImpl implements IBasicBussinessTypeService
@Override
public List<BasicBussinessTypeEntity> findList(FilterBussinessTypeRequest bussinessTypeFilterRequest) {
//构造查询参数
return basicBussinessTypeDao.selectList(bussinessTypeFilterRequest);
return basicBussinessTypeDao.selectBusList(bussinessTypeFilterRequest);
}
@Override

@ -118,7 +118,7 @@
)
</insert>
<select id="selectList" resultType="com.glxp.api.entity.basic.BasicBussinessTypeEntity">
<select id="selectBusList" resultType="com.glxp.api.entity.basic.BasicBussinessTypeEntity">
select *
from basic_bussiness_type bu
<where>

Loading…
Cancel
Save