提交 957f6f8f 作者: zhangqiliang

发货管理的新增,查询,确认发货接口;收货管理的查询,确认收货接口;

父级 b3c0e926
...@@ -35,6 +35,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -35,6 +35,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
/** /**
...@@ -89,8 +90,10 @@ public class DeliveryController { ...@@ -89,8 +90,10 @@ public class DeliveryController {
} }
@PostMapping("/query") @PostMapping("/query")
@ApiOperation(value = "发货列表查询") @ApiOperation(value = "发货列表查询")
public BaseResponse<List<Delivery>> queryDelivery(Delivery Delivery){ public BaseResponse<List<Delivery>> queryDelivery(Delivery delivery){
return new BaseResponse(this.deliveryMapper.selectDeliveryList(Delivery)); List<String> list= Arrays.asList("已发货");
delivery.setStatusList(list);
return new BaseResponse(this.deliveryMapper.selectDeliveryList(delivery));
} }
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperation(value = "发货详情") @ApiOperation(value = "发货详情")
......
...@@ -3,8 +3,11 @@ package com.starcharge.wios.controller; ...@@ -3,8 +3,11 @@ package com.starcharge.wios.controller;
import com.ihidea.component.api.v2.BaseResponse; import com.ihidea.component.api.v2.BaseResponse;
import com.starcharge.wios.auth.service.TokenService; import com.starcharge.wios.auth.service.TokenService;
import com.starcharge.wios.convert.ReceivednoteConvert; import com.starcharge.wios.convert.ReceivednoteConvert;
import com.starcharge.wios.dao.entity.Delivery;
import com.starcharge.wios.dao.entity.Receivednote; import com.starcharge.wios.dao.entity.Receivednote;
import com.starcharge.wios.dao.mappers.DeliveryMapper;
import com.starcharge.wios.dao.mappers.ReceivednoteMapper; import com.starcharge.wios.dao.mappers.ReceivednoteMapper;
import com.starcharge.wios.dto.DeliveryUpdateDTO;
import com.starcharge.wios.service.CommonUpdateService; import com.starcharge.wios.service.CommonUpdateService;
import com.starcharge.wios.service.SnowFlakeService; import com.starcharge.wios.service.SnowFlakeService;
import com.starcharge.wios.utils.ExcelUtils; import com.starcharge.wios.utils.ExcelUtils;
...@@ -22,6 +25,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -22,6 +25,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays;
import java.util.List; import java.util.List;
/** /**
...@@ -43,8 +47,10 @@ public class ReceivedNoteController { ...@@ -43,8 +47,10 @@ public class ReceivedNoteController {
private CommonUpdateService commonUpdateService; private CommonUpdateService commonUpdateService;
@Autowired @Autowired
private SnowFlakeService snowFlakeService; private SnowFlakeService snowFlakeService;
@Autowired
private DeliveryMapper deliveryMapper;
@PostMapping("/add") /* @PostMapping("/add")
@ApiOperation(value = "新增收货",notes = "新增收货,返回成功条数") @ApiOperation(value = "新增收货",notes = "新增收货,返回成功条数")
@ParamsValidate @ParamsValidate
public BaseResponse<Integer> AddReceivednote(@RequestBody @Validated(CreateEntityGroup.class) ReceivednoteAddVo receivednoteAddVo, BindingResult bindingResult){ public BaseResponse<Integer> AddReceivednote(@RequestBody @Validated(CreateEntityGroup.class) ReceivednoteAddVo receivednoteAddVo, BindingResult bindingResult){
...@@ -57,28 +63,34 @@ public class ReceivedNoteController { ...@@ -57,28 +63,34 @@ public class ReceivedNoteController {
this.commonUpdateService.UpdateColumns(receivednote,true); this.commonUpdateService.UpdateColumns(receivednote,true);
return this.receivednoteMapper.insertSelective(receivednote); return this.receivednoteMapper.insertSelective(receivednote);
}).reduce(0,Integer::sum)); }).reduce(0,Integer::sum));
} }*/
@PostMapping("/query") @PostMapping("/query")
@ApiOperation(value = "收货列表查询") @ApiOperation(value = "收货列表查询")
public BaseResponse<List<Receivednote>> queryReceivednote(Receivednote receivednote){ public BaseResponse<List<Delivery>> queryReceivednote(Delivery delivery){
return new BaseResponse<>(this.receivednoteMapper.selectReceivedNoteList(receivednote)); //return new BaseResponse<>(this.receivednoteMapper.selectReceivedNoteList(receivednote));
List<String> list= Arrays.asList("已发货","已收货");
delivery.setStatusList(list);
return new BaseResponse(this.deliveryMapper.selectDeliveryList(delivery));
} }
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperation(value = "收货详情") @ApiOperation(value = "收货详情")
public BaseResponse<Receivednote> getdetail(@RequestParam int id){ public BaseResponse<Delivery> getdetail(@RequestParam int id){
return new BaseResponse<>(this.receivednoteMapper.selectByPrimaryKey(id)); //return new BaseResponse<>(this.receivednoteMapper.selectByPrimaryKey(id));
return new BaseResponse(this.deliveryMapper.selectByPrimaryKey(id));
} }
@GetMapping("/delete") /*@GetMapping("/delete")
@ApiOperation(value = "删除收货信息") @ApiOperation(value = "删除收货信息")
public BaseResponse<Integer> delete(@RequestParam int id){ public BaseResponse<Integer> delete(@RequestParam int id){
return new BaseResponse(this.receivednoteMapper.deleteByPrimaryKey(id)); return new BaseResponse(this.receivednoteMapper.deleteByPrimaryKey(id));
} }*/
@PostMapping("/update") @PostMapping("/update")
@ApiOperation("更新收货单信息") @ApiOperation("更新收货单信息")
@ParamsValidate @ParamsValidate
public BaseResponse<Receivednote> update(@RequestBody @Validated(UpdateEntityGroup.class) Receivednote receivednote, BindingResult bindingResult){ public BaseResponse<DeliveryUpdateDTO> update(@RequestBody @Validated(UpdateEntityGroup.class) DeliveryUpdateDTO deliveryUpdateDTO, BindingResult bindingResult){
this.commonUpdateService.UpdateColumns(receivednote,false); /*this.commonUpdateService.UpdateColumns(receivednote,false);
return new BaseResponse(this.receivednoteMapper.updateByPrimaryKeySelective(receivednote)); return new BaseResponse(this.receivednoteMapper.updateByPrimaryKeySelective(receivednote));*/
this.commonUpdateService.UpdateColumns(deliveryUpdateDTO,false);
return new BaseResponse(this.deliveryMapper.updateByPrimaryKeySelective(deliveryUpdateDTO));
} }
@PostMapping("/export") @PostMapping("/export")
......
...@@ -264,6 +264,35 @@ public class Delivery extends PageVo implements Serializable { ...@@ -264,6 +264,35 @@ public class Delivery extends PageVo implements Serializable {
*/ */
@ApiModelProperty(value = "退货的物流单号") @ApiModelProperty(value = "退货的物流单号")
private String rejectLogisticOrder; private String rejectLogisticOrder;
/**
* 到货数量
*
* @mbg.generated
*/
@ApiModelProperty(value = "到货数量")
private Integer arrivalQuantity;
/**
* 辅料申请单号
*
* @mbg.generated
*/
@ApiModelProperty(value = "辅料申请单号")
private Integer auxiliaryId;
/**
* 文件地址
*
* @mbg.generated
*/
@ApiModelProperty(value = "文件地址")
private String fileUrl;
/**
* 物料的SN号
*
* @mbg.generated
*/
@ApiModelProperty(value = "物料的SN号")
private String materialSn;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -33,6 +33,10 @@ ...@@ -33,6 +33,10 @@
<result column="check_suggestion" jdbcType="VARCHAR" property="checkSuggestion" /> <result column="check_suggestion" jdbcType="VARCHAR" property="checkSuggestion" />
<result column="out_order_id" jdbcType="VARCHAR" property="outOrderId" /> <result column="out_order_id" jdbcType="VARCHAR" property="outOrderId" />
<result column="reject_logistic_order" jdbcType="VARCHAR" property="rejectLogisticOrder" /> <result column="reject_logistic_order" jdbcType="VARCHAR" property="rejectLogisticOrder" />
<result column="arrival_quantity" jdbcType="VARCHAR" property="arrivalQuantity" />
<result column="auxiliary_id" jdbcType="VARCHAR" property="auxiliaryId" />
<result column="file_url" jdbcType="VARCHAR" property="fileUrl" />
<result column="material_sn" jdbcType="VARCHAR" property="materialSn" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
...@@ -96,7 +100,8 @@ ...@@ -96,7 +100,8 @@
id, delivery_order, install_order, product_batch, quantity, material_category, material_code, id, delivery_order, install_order, product_batch, quantity, material_category, material_code,
material_name, material_company, logistic_order, logistic_company, logistic_status, material_name, material_company, logistic_order, logistic_company, logistic_status,
team, isproduct, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, arrival_warehouse, team, isproduct, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, arrival_warehouse,
arrival_warehouse_id, receiver,remarks,reject_material,reason,status,check_time,check_user,check_user_name,check_suggestion,reject_logistic_order arrival_warehouse_id, receiver,remarks,reject_material,reason,status,check_time,check_user,check_user_name,check_suggestion,reject_logistic_order,
arrival_quantity,auxiliary_id,file_url,material_sn
</sql> </sql>
<select id="selectDeliveryList" parameterType="com.starcharge.wios.dao.entity.Delivery" resultMap="BaseResultMap"> <select id="selectDeliveryList" parameterType="com.starcharge.wios.dao.entity.Delivery" resultMap="BaseResultMap">
...@@ -116,7 +121,7 @@ ...@@ -116,7 +121,7 @@
<if test="logisticCompany != null and logisticCompany != ''"> and logistic_company = #{logisticCompany}</if> <if test="logisticCompany != null and logisticCompany != ''"> and logistic_company = #{logisticCompany}</if>
<if test="logisticStatus != null and logisticStatus != ''"> and logistic_status = #{logisticStatus}</if> <if test="logisticStatus != null and logisticStatus != ''"> and logistic_status = #{logisticStatus}</if>
<if test="team != null and team != ''"> and team like concat('%', #{team}, '%')</if> <if test="team != null and team != ''"> and team like concat('%', #{team}, '%')</if>
<if test="isproduct != null "> and isproduct = #{isproduct}</if> <if test="isproduct != null and isproduct != ''"> and isproduct = #{isproduct}</if>
<if test="createdBy != null and createdBy != ''"> and CREATED_BY = #{createdBy}</if> <if test="createdBy != null and createdBy != ''"> and CREATED_BY = #{createdBy}</if>
<if test="createdTime != null "> and CREATED_TIME = #{createdTime}</if> <if test="createdTime != null "> and CREATED_TIME = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and UPDATED_BY = #{updatedBy}</if> <if test="updatedBy != null and updatedBy != ''"> and UPDATED_BY = #{updatedBy}</if>
...@@ -155,7 +160,7 @@ ...@@ -155,7 +160,7 @@
t.material_name, t.material_company, t.logistic_order, t.logistic_company, t.logistic_status, t.material_name, t.material_company, t.logistic_order, t.logistic_company, t.logistic_status,
t.team, t.isproduct, t.CREATED_BY, t.CREATED_TIME, t.UPDATED_BY, t.UPDATED_TIME, t.arrival_warehouse, t.team, t.isproduct, t.CREATED_BY, t.CREATED_TIME, t.UPDATED_BY, t.UPDATED_TIME, t.arrival_warehouse,
t.arrival_warehouse_id, t.receiver,t.remarks,t.reject_material,t.reason,t.status,t.check_time,t.check_user,t.check_user_name,t.check_suggestion, t.arrival_warehouse_id, t.receiver,t.remarks,t.reject_material,t.reason,t.status,t.check_time,t.check_user,t.check_user_name,t.check_suggestion,
e.out_order_id,t.reject_logistic_order e.out_order_id,t.reject_logistic_order,t.arrival_quantity,t.auxiliary_id,t.file_url,t.material_sn
from t_delivery t from t_delivery t
left join t_order e on e.id = t.install_order left join t_order e on e.id = t.install_order
where t.id = #{id,jdbcType=INTEGER} where t.id = #{id,jdbcType=INTEGER}
...@@ -255,6 +260,9 @@ ...@@ -255,6 +260,9 @@
<if test="receiver != null"> <if test="receiver != null">
receiver, receiver,
</if> </if>
<if test="materialSn != null">
material_sn,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deliveryOrder != null"> <if test="deliveryOrder != null">
...@@ -317,6 +325,9 @@ ...@@ -317,6 +325,9 @@
<if test="receiver != null"> <if test="receiver != null">
#{receiver,jdbcType=VARCHAR}, #{receiver,jdbcType=VARCHAR},
</if> </if>
<if test="materialSn != null">
#{materialSn,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.starcharge.wios.dao.entity.DeliveryCriteria" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.starcharge.wios.dao.entity.DeliveryCriteria" resultType="java.lang.Long">
...@@ -513,6 +524,15 @@ ...@@ -513,6 +524,15 @@
<if test="rejectLogisticOrder != null"> <if test="rejectLogisticOrder != null">
reject_logistic_order = #{rejectLogisticOrder,jdbcType=VARCHAR}, reject_logistic_order = #{rejectLogisticOrder,jdbcType=VARCHAR},
</if> </if>
<if test="arrivalQuantity != null">
arrival_quantity = #{arrivalQuantity,jdbcType=VARCHAR},
</if>
<if test="auxiliaryId != null">
auxiliary_id = #{auxiliaryId,jdbcType=VARCHAR},
</if>
<if test="fileUrl != null">
file_url = #{fileUrl,jdbcType=VARCHAR},
</if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
......
...@@ -256,6 +256,28 @@ public class DeliveryUpdateDTO{ ...@@ -256,6 +256,28 @@ public class DeliveryUpdateDTO{
*/ */
@ApiModelProperty(value = "退货的物流单号") @ApiModelProperty(value = "退货的物流单号")
private String rejectLogisticOrder; private String rejectLogisticOrder;
/**
* 到货数量
*
* @mbg.generated
*/
@ApiModelProperty(value = "到货数量")
private Integer arrivalQuantity;
/**
* 辅料申请单号
*
* @mbg.generated
*/
@ApiModelProperty(value = "辅料申请单号")
private Integer auxiliaryId;
/**
* 文件地址
*
* @mbg.generated
*/
@ApiModelProperty(value = "文件地址")
private String fileUrl;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -166,4 +166,11 @@ public class DeliveryAddVo { ...@@ -166,4 +166,11 @@ public class DeliveryAddVo {
*/ */
@ApiModelProperty(value = "收货人") @ApiModelProperty(value = "收货人")
private String receiver; private String receiver;
/**
* 物料的SN号
*
* @mbg.generated
*/
@ApiModelProperty(value = "物料的SN号")
private String materialSn;
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论