Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
30792c9ceb
|
|
@ -5,6 +5,7 @@ import com.bonus.sgzb.app.mapper.PurchaseInputMapper;
|
|||
import com.bonus.sgzb.app.service.PurchaseInputService;
|
||||
import com.bonus.sgzb.base.api.domain.MaMachine;
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -92,6 +93,8 @@ public class PurchaseInputServiceImpl implements PurchaseInputService {
|
|||
TmTask task = new TmTask();
|
||||
task.setTaskId(taskId);
|
||||
task.setTaskStatus(28);
|
||||
task.setUpdateBy(String.valueOf(SecurityUtils.getUserId()));
|
||||
task.setUpdateTime(DateUtils.getNowDate());
|
||||
purchaseInputMapper.updateTmTask(task);
|
||||
}
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
update ma_type set num = #{num} where type_id = #{typeId}
|
||||
</update>
|
||||
<update id="updateByTaskIdTypeId">
|
||||
update purchase_check_details set check_num = #{inputNum},status = #{status} where task_id = #{taskId} and type_id = #{typeId}
|
||||
update purchase_check_details set check_num = #{inputNum},status = #{status},input_num=#{inputNum},input_status='1',input_time=NOW() where task_id = #{taskId} and type_id = #{typeId}
|
||||
</update>
|
||||
<update id="updateMacodeByType">
|
||||
update purchase_macode_info
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
|
@ -38,6 +39,43 @@ public class PurchasePartDetails extends BaseEntity
|
|||
@Excel(name = "采购单号")
|
||||
private String code;
|
||||
|
||||
/** 采购日期 */
|
||||
@ApiModelProperty(value = "采购日期")
|
||||
@Excel(name = "采购日期")
|
||||
private String purchaseTime;
|
||||
|
||||
/** 到货日期 */
|
||||
@ApiModelProperty(value = "到货日期")
|
||||
@Excel(name = "到货日期")
|
||||
private String arrivalTime;
|
||||
|
||||
@ApiModelProperty(value = "机具类型名称")
|
||||
@Excel(name = "配件类型")
|
||||
private String machineTypeName;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String specificationType;
|
||||
|
||||
/** 采购员 */
|
||||
@ApiModelProperty(value = "采购员")
|
||||
@Excel(name = "采购员")
|
||||
private String purchaserName;
|
||||
|
||||
/** 创建者 */
|
||||
@Excel(name = "提交入库人员")
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "提交入库时间" , dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
/** 采购单价 */
|
||||
@ApiModelProperty(value = "采购单价")
|
||||
private String purchasePrice;
|
||||
|
|
@ -48,6 +86,7 @@ public class PurchasePartDetails extends BaseEntity
|
|||
|
||||
/** 验收数量 */
|
||||
@ApiModelProperty(value = "验收数量")
|
||||
@Excel(name = "数量")
|
||||
private BigDecimal checkNum;
|
||||
|
||||
/** 绑定数量 */
|
||||
|
|
@ -72,6 +111,7 @@ public class PurchasePartDetails extends BaseEntity
|
|||
|
||||
/** 状态结果 */
|
||||
@ApiModelProperty(value = "状态结果")
|
||||
@Excel(name = "状态")
|
||||
private String statusResult;
|
||||
|
||||
/** 出厂日期 */
|
||||
|
|
@ -111,28 +151,19 @@ public class PurchasePartDetails extends BaseEntity
|
|||
@ApiModelProperty(value = "数据所属组织")
|
||||
private Long companyId;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
private String specificationType;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "单位")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value = "机具类型名称")
|
||||
private String machineTypeName;
|
||||
|
||||
@ApiModelProperty(value = "管理方式(0编号 1计数)")
|
||||
private String manageType;
|
||||
|
||||
@ApiModelProperty(value = "关键字筛选")
|
||||
private String keyWord;
|
||||
|
||||
public void setTaskId(Long taskId)
|
||||
public void setTaskId(Long taskId)
|
||||
{
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
|
@ -372,6 +403,50 @@ public class PurchasePartDetails extends BaseEntity
|
|||
this.inputBy = inputBy;
|
||||
}
|
||||
|
||||
public String getPurchaseTime() {
|
||||
return purchaseTime;
|
||||
}
|
||||
|
||||
public void setPurchaseTime(String purchaseTime) {
|
||||
this.purchaseTime = purchaseTime;
|
||||
}
|
||||
|
||||
public String getArrivalTime() {
|
||||
return arrivalTime;
|
||||
}
|
||||
|
||||
public void setArrivalTime(String arrivalTime) {
|
||||
this.arrivalTime = arrivalTime;
|
||||
}
|
||||
|
||||
public String getPurchaserName() {
|
||||
return purchaserName;
|
||||
}
|
||||
|
||||
public void setPurchaserName(String purchaserName) {
|
||||
this.purchaserName = purchaserName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
|||
|
|
@ -320,18 +320,16 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
|
|||
purchaseMacodeInfoMapper.updateMacodeByType(purchaseMacodeInfo);
|
||||
// 新增入库记录
|
||||
purchaseMacodeInfoMapper.insertMaInputRecord(maInputRecord);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 当全部为已入库的时候任务改为入库状态
|
||||
Integer count = purchaseMacodeInfoMapper.selectMacodeInfoStatusByTaskId(taskId);
|
||||
if (count <= 0) {
|
||||
TmTask task = new TmTask();
|
||||
task.setTaskId(taskId);
|
||||
task.setTaskStatus(28);
|
||||
task.setUpdateBy(String.valueOf(SecurityUtils.getUserId()));
|
||||
task.setUpdateTime(DateUtils.getNowDate());
|
||||
taskMapper.updateTmTask(task);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -393,5 +393,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="inputExport" resultType="com.bonus.sgzb.material.domain.PurchasePartDetails">
|
||||
|
||||
SELECT
|
||||
tk.task_id as taskId,
|
||||
tk.`code`,
|
||||
pci.purchase_time as purchaseTime, pci.arrival_time as arrivalTime,mpt2.pa_name as machineTypeName,
|
||||
mpt.pa_name as specificationType,su.user_name purchaserName, us.user_name as createBy, pci.create_time as createTime,ppd.check_num as checkNum,
|
||||
CASE
|
||||
WHEN ppd.`status` = 0 THEN '待验收'
|
||||
WHEN ppd.`status` = 1 THEN '待入库'
|
||||
WHEN ppd.`status` = 2 THEN '验收不通过'
|
||||
WHEN ppd.`status` = 3 THEN '已入库'
|
||||
ELSE ''
|
||||
END AS statusResult
|
||||
FROM
|
||||
purchase_part_details ppd
|
||||
LEFT JOIN purchase_part_info pci on pci.task_id=ppd.task_id
|
||||
left join tm_task tk on pci.task_id = tk.task_id
|
||||
left join sys_user su on pci.purchaser = su.user_id
|
||||
left join ma_part_type mpt on ppd.part_id = mpt.pa_id
|
||||
left join ma_part_type mpt2 on mpt.parent_id = mpt2.pa_id
|
||||
LEFT JOIN sys_user us on us.user_id = pci.create_by
|
||||
where task_type = 67 and tk.task_status in (69,70)
|
||||
<if test="keyWord != null and keyWord != ''"> and tk.code like concat('%',#{keyWord},'%')</if>
|
||||
<if test="submitStorageTime != null and submitStorageTime != ''"> and pci.create_time like concat('%',#{submitStorageTime},'%')</if>
|
||||
<if test="partId != null and partId != ''"> and mpt2.pa_id in (#{partId})</if>
|
||||
ORDER BY tk.task_id DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -210,7 +210,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<update id="updateByTaskIdTypeId">
|
||||
update purchase_check_details set check_num = #{inputNum},status = #{status} where task_id = #{taskId} and type_id = #{typeId}
|
||||
update purchase_check_details set check_num = #{inputNum},status = #{status},input_num=#{inputNum},input_status='1',input_time=NOW() where task_id = #{taskId} and type_id = #{typeId}
|
||||
</update>
|
||||
<update id="updateCheckDetails">
|
||||
update purchase_check_details set status = '0' where task_id = #{taskId}
|
||||
|
|
|
|||
|
|
@ -145,11 +145,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectPutInListList" resultMap="PurchaseCheckInfoResult">
|
||||
select pci.id,pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.create_by, pci.create_time, pci.update_by,
|
||||
pci.update_time, pci.remark, pci.company_id ,dict.name purchasingStatus,tk.code,tk.task_status taskStatus,su.user_name purchaserName,
|
||||
tk.create_by
|
||||
tk.create_by,
|
||||
CASE tk.task_status
|
||||
WHEN 28 THEN
|
||||
tk.update_time
|
||||
ELSE
|
||||
''
|
||||
END as inputTime,
|
||||
CASE tk.task_status
|
||||
WHEN 28 THEN
|
||||
us.user_name
|
||||
ELSE
|
||||
''
|
||||
END as inputUser
|
||||
from purchase_check_info pci
|
||||
left join tm_task tk on pci.task_id = tk.task_id
|
||||
left join (select id,name from sys_dic where p_id = 50) dict on tk.task_status = dict.id
|
||||
left join sys_user su on pci.purchaser = su.user_id
|
||||
LEFT JOIN sys_user us on us.user_id = tk.update_by
|
||||
where task_type = 23 and tk.task_status in (26,28)
|
||||
<if test="keyWord != null and keyWord != ''"> and tk.code like concat('%',#{keyWord},'%')</if>
|
||||
<if test="purchaseTime != null and purchaseTime != ''"> and pci.purchase_time = #{purchaseTime}</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue