This commit is contained in:
zzyuan 2024-04-20 17:03:39 +08:00
commit 8c7453aa23
20 changed files with 328 additions and 129 deletions

View File

@ -10,9 +10,11 @@ import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
import com.bonus.sgzb.common.log.annotation.Log;
import com.bonus.sgzb.common.log.enums.BusinessType;
import com.bonus.sgzb.common.security.utils.SecurityUtils;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
@ -36,7 +38,15 @@ public class PurchaseInputController extends BaseController {
@GetMapping("list")
public AjaxResult getbackReceiveList(PurchaseCheckInfo bean) {
try {
List<PurchaseCheckInfo> list =purchaseInputService.getList(bean);
List<PurchaseCheckInfo> list = new ArrayList<>();
//判断该组织是否开启综合服务中心审核
Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
int re = purchaseInputService.selectExamineType(companyId);
if (re>0){
list = purchaseInputService.selectPutInListExamine(bean);
}else {
list =purchaseInputService.getList(bean);
}
return success(list);
} catch (Exception e) {
throw new RuntimeException(e);

View File

@ -94,6 +94,10 @@ public class PurchaseMacodeInfo extends BaseEntity
@ApiModelProperty(value = "固定资产编码")
private String assetsCode;
/** 管理方式 */
@ApiModelProperty(value = "管理方式")
private String manageType;
@ApiModelProperty(value = "采购时间")
private String purchaseTime;
@ -301,6 +305,14 @@ public class PurchaseMacodeInfo extends BaseEntity
this.statusFlag = statusFlag;
}
public String getManageType() {
return manageType;
}
public void setManageType(String manageType) {
this.manageType = manageType;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

View File

@ -25,12 +25,12 @@ public interface PurchaseInputMapper {
List<PurchaseCheckInfo> selectPutInListList(PurchaseCheckInfo bean);
/**
* 查询
* 查询新购入库任务列表
*
* @param taskId 查询条件
* @return 结果
*/
String selectTypeNameByTaskId(Long taskId);
String selectTypeNameByTaskId(@Param("taskId") Long taskId,@Param("type") String type);
/**
* 查询
@ -70,7 +70,7 @@ public interface PurchaseInputMapper {
* @param typeId 查询条件
* @return 结果
*/
BigDecimal selectInputNUmByTypeId(@Param("taskId") Long taskId, @Param("typeId") Long typeId);
BigDecimal selectInputNumByTypeId(@Param("taskId") Long taskId, @Param("typeId") Long typeId);
/**
* 修改
@ -131,4 +131,56 @@ public interface PurchaseInputMapper {
* @return
*/
int selectPurchaseCheckDetailsStatus(Long taskId);
/**
* 删除ma_machine表
* @param maId
* @return 结果
*/
int deleteMaMachineInfoByMaId(Long maId);
/**
* 删除ma_machine_label表
* @param maId
* @return int
*/
int deleteMaMachineLabelByMaId(Long maId);
/**
* 删除ma_label_bind表
* @param maId
* @return int
*/
int deleteMaLabelBindByMaId(Long maId);
/**
* 删除purchase_macode_info表
* @param taskId
* @param typeId
* @param maCode
* @return
*/
int updatetePurchaseMaCodeInfoByMaCodeAndTaskIdAndTypeId(@Param("taskId") Long taskId,@Param("typeId") Long typeId,@Param("maCode") String maCode);
/**
* 修改purchase_check_details表
* @param typeId
* @param taskId
* @return int
*/
int updatePurchaseCheckDetailsByTaskId(@Param("taskId") Long taskId,@Param("typeId") Long typeId);
/**
* 查询组织是否开启审核
* @param companyId
* @return int
*/
int selectExamineType(Long companyId);
/**
* 查询
* @param bean
* @return
*/
List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo bean);
}

View File

@ -35,4 +35,18 @@ public interface PurchaseInputService {
* @return 修改结果
*/
int modifyManageStatus(MaInputVO maInputVO);
/**
* 查询组织是否开启审核
* @param companyId
* @return int
*/
int selectExamineType(Long companyId);
/**
* 查询新购入库任务列表
* @param bean
* @return
*/
List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo bean);
}

View File

@ -29,7 +29,7 @@ public class PurchaseInputServiceImpl implements PurchaseInputService {
public List<PurchaseCheckInfo> getList(PurchaseCheckInfo bean) {
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseInputMapper.selectPutInListList(bean);
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
String typeName = purchaseInputMapper.selectTypeNameByTaskId(checkInfo.getTaskId());
String typeName = purchaseInputMapper.selectTypeNameByTaskId(checkInfo.getTaskId(),"2");
checkInfo.setPurchasingTypeName(typeName);
}
return purchaseCheckInfos;
@ -51,76 +51,91 @@ public class PurchaseInputServiceImpl implements PurchaseInputService {
MaMachine maMachine = new MaMachine();
maMachine.setMaId(maInputRecord.getMaId());
maMachine.setMaCode(maInputRecord.getMaCode());
maMachine.setMaStatus("1".equals(checkResult) ? "15":"14");
purchaseInputMapper.updateMaMachine(maMachine);
//修改编码管理表入库状态
PurchaseMacodeInfo purchaseMacodeInfo = new PurchaseMacodeInfo();
purchaseMacodeInfo.setTaskId(taskId);
purchaseMacodeInfo.setTypeId(typeId);
purchaseMacodeInfo.setMaCode(maInputRecord.getMaCode());
// 修改验收任务详细表入库数量
if ("1".equals(checkResult)) {
//修改机具状态为在库
maMachine.setMaStatus("15");
purchaseInputMapper.updateMaMachine(maMachine);
// 修改编码管理的入库状态
MaType maType = purchaseInputMapper.selectTypeByTypeId(typeId);
// 库存添加
maType.setNum((maInputRecord.getInputNum() == null ? new BigDecimal(0):maInputRecord.getInputNum())
.add(maType.getNum() == null ? new BigDecimal(0):maType.getNum()));
maType.setNum((maInputRecord.getInputNum() == null ? new BigDecimal(0) : maInputRecord.getInputNum())
.add(maType.getNum() == null ? new BigDecimal(0) : maType.getNum()));
purchaseInputMapper.updateTypeByTypeId(maType);
BigDecimal inputNum = purchaseInputMapper.selectInputNUmByTypeId(taskId, typeId);
BigDecimal inputNum = purchaseInputMapper.selectInputNumByTypeId(taskId, typeId);
PurchaseCheckDetails purchaseCheckDetails = new PurchaseCheckDetails();
purchaseCheckDetails.setTaskId(taskId);
purchaseCheckDetails.setTypeId(typeId);
purchaseCheckDetails.setInputNum(inputNum.add(maInputRecord.getInputNum() == null ? new BigDecimal(0):maInputRecord.getInputNum()));
purchaseCheckDetails.setInputNum(inputNum.add(maInputRecord.getInputNum() == null ? new BigDecimal(0) : maInputRecord.getInputNum()));
purchaseCheckDetails.setStatus(4);
purchaseInputMapper.updateByTaskIdTypeId(purchaseCheckDetails);
// 新增入库任务详细表
InputApplyDetails applyDetails = new InputApplyDetails();
applyDetails.setTaskId(taskId);
applyDetails.setTypeId(typeId);
applyDetails.setInputNum(maInputRecord.getInputNum() == null ? new BigDecimal(0):maInputRecord.getInputNum());
applyDetails.setInputNum(maInputRecord.getInputNum() == null ? new BigDecimal(0) : maInputRecord.getInputNum());
applyDetails.setMaId(maInputRecord.getMaId());
applyDetails.setInputType("1");
applyDetails.setCreateTime(new Date());
applyDetails.setCreateBy(SecurityUtils.getUsername());
applyDetails.setCompanyId(maInputRecord.getCompanyId());
purchaseInputMapper.insertInputApplyDetails(applyDetails);
purchaseMacodeInfo.setStatus("1");
purchaseInputMapper.updateMacodeByType(purchaseMacodeInfo);
// 新增入库记录
purchaseInputMapper.insertMaInputRecord(maInputRecord);
} else {
//删除ma_machine表
purchaseInputMapper.deleteMaMachineInfoByMaId(maInputRecord.getMaId());
//删除ma_machine_label表
purchaseInputMapper.deleteMaMachineLabelByMaId(maInputRecord.getMaId());
//删除ma_label_bind表
purchaseInputMapper.deleteMaLabelBindByMaId(maInputRecord.getMaId());
//修改purchase_macode_info表
purchaseInputMapper.updatetePurchaseMaCodeInfoByMaCodeAndTaskIdAndTypeId(taskId, typeId, maInputRecord.getMaCode());
//修改purchase_check_details表
purchaseInputMapper.updatePurchaseCheckDetailsByTaskId(taskId, typeId);
}
// 修改编码管理表入库状态
PurchaseMacodeInfo purchaseMacodeInfo = new PurchaseMacodeInfo();
purchaseMacodeInfo.setTaskId(taskId);
purchaseMacodeInfo.setTypeId(typeId);
purchaseMacodeInfo.setMaCode(maInputRecord.getMaCode());
purchaseMacodeInfo.setStatus("1".equals(checkResult) ? "1" : "0");
purchaseInputMapper.updateMacodeByType(purchaseMacodeInfo);
// 新增入库记录
purchaseInputMapper.insertMaInputRecord(maInputRecord);
}
//判断是否全部已操作通过或不通过
int count=purchaseInputMapper.isOperateAll(taskId);
if (count<=0){
//是否为全部不通过
int count1 = purchaseInputMapper.selectPurchaseCheckDetailsStatus(taskId);
if (count1>0){
TmTask task = new TmTask();
task.setTaskId(taskId);
task.setTaskStatus(28);
task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
task.setUpdateTime(DateUtils.getNowDate());
purchaseInputMapper.updateTmTask(task);
}else {
TmTask task = new TmTask();
task.setTaskId(taskId);
task.setTaskStatus(107);
task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
task.setUpdateTime(DateUtils.getNowDate());
purchaseInputMapper.updateTmTask(task);
}
//全部审核任务状态改为已审核
TmTask task = new TmTask();
task.setTaskId(taskId);
task.setTaskStatus(28);
task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
task.setUpdateTime(DateUtils.getNowDate());
purchaseInputMapper.updateTmTask(task);
}
// // 当全部为已入库的时候任务改为入库状态
// Integer count = purchaseInputMapper.selectMacodeInfoStatusByTaskId(taskId);
// if (count <= 0) {
// TmTask task = new TmTask();
// task.setTaskId(taskId);
// task.setTaskStatus(28);
// task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
// task.setUpdateTime(DateUtils.getNowDate());
// purchaseInputMapper.updateTmTask(task);
// }
return 1;
}
@Override
public int selectExamineType(Long companyId) {
return purchaseInputMapper.selectExamineType(companyId);
}
@Override
public List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo bean) {
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseInputMapper.selectPutInListExamine(bean);
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
String typeName = purchaseInputMapper.selectTypeNameByTaskId(checkInfo.getTaskId(),"3");
checkInfo.setPurchasingTypeName(typeName);
}
return purchaseCheckInfos;
}
}

View File

@ -601,7 +601,7 @@
tt.task_status AS taskStatus,
sd.`name` AS taskName,
tta.agreement_id AS agreementId,
GROUP_CONCAT( DISTINCT bad.type_id ) AS typeId,
GROUP_CONCAT( DISTINCT mt2.type_id ) AS typeId,
GROUP_CONCAT(bad.id) as badId,
GROUP_CONCAT( mt2.type_name, '' ) AS typeName
FROM
@ -648,7 +648,7 @@
bagi.plan_start_time
<if test="typeId != null and typeId != ''">
HAVING
FIND_IN_SET(#{typeId}, GROUP_CONCAT(DISTINCT bad.type_id))
FIND_IN_SET(#{typeId}, GROUP_CONCAT(DISTINCT mt2.type_id))
</if>
ORDER BY
tt.task_status ASC,

View File

@ -111,22 +111,45 @@
</trim>
where task_id = #{taskId}
</update>
<update id="updatetePurchaseMaCodeInfoByMaCodeAndTaskIdAndTypeId">
update
purchase_macode_info
set status='2'
where ma_code = #{maCode}
and task_id = #{taskId}
and type_id = #{typeId}
</update>
<update id="updatePurchaseCheckDetailsByTaskId">
update purchase_check_details set bind_num = bind_num - 1 , status='5' where task_id = #{taskId} and type_id = #{typeId}
</update>
<delete id="deleteMaMachineInfoByMaId">
delete from ma_machine where ma_id = #{maId}
</delete>
<delete id="deleteMaMachineLabelByMaId">
delete from ma_machine_label where ma_id = #{maId}
</delete>
<delete id="deleteMaLabelBindByMaId">
delete from ma_label_bind where ma_id = #{maId}
</delete>
<select id="selectPutInListList" resultType="com.bonus.sgzb.app.domain.PurchaseCheckInfo">
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.nick_name purchaserName,
tk.create_by
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
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>
<if test="arrivalTime != null and arrivalTime != ''"> and pci.arrival_time = #{arrivalTime}</if>
<if test="purchaser != null "> and pci.purchaser = #{purchaser}</if>
<if test="companyId != null "> and pci.company_id = #{companyId}</if>
order by pci.id desc
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.nick_name purchaserName,
tk.create_by
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
where task_type = 23 and tk.task_status in (26,28,107)
<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>
<if test="arrivalTime != null and arrivalTime != ''">and pci.arrival_time = #{arrivalTime}</if>
<if test="purchaser != null ">and pci.purchaser = #{purchaser}</if>
<if test="companyId != null ">and pci.company_id = #{companyId}</if>
order by pci.id desc
</select>
<select id="selectTypeNameByTaskId" resultType="java.lang.String">
@ -136,21 +159,43 @@
left join ma_type mt on pcd.type_id = mt.type_id
left join ma_type mt1 on mt.parent_id = mt1.type_id
where pcd.task_id = #{taskId}
<if test="type == 2">and pcd.`status`!=3</if>
<if test="type == 3">and pcd.`status`!=3 and pcd.`status` !=7</if>
) t
GROUP BY task_id
</select>
<select id="selectPutinDetails" resultType="com.bonus.sgzb.app.domain.PurchaseMacodeInfo">
select pcd.production_time productionTime,mt.type_name specificationType, mt1.type_name typeName, pmi.ma_code maCode,
mm.assets_code assetsCode ,pmi.fix_code fixCode,pcd.type_id typeId,pcd.task_id taskId, mt.code specsCode,mt1.code typeCode,
if(pmi.ma_code is null, if(pcd.status != 4, 0 , 1), pmi.status) status,mm.qr_code qrCode,mm.ma_id maId,
if(pmi.ma_code is not null,1,pcd.check_num) checkNum
from purchase_check_details pcd
left join purchase_macode_info pmi on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id
left join ma_machine mm on pmi.ma_code = mm.ma_code
left join ma_type mt on pcd.type_id = mt.type_id
left join ma_type mt1 on mt.parent_id = mt1.type_id
where pcd.task_id = #{taskId}
order by status
select pcd.production_time productionTime,
mt.type_name specificationType,
mt1.type_name typeName,
mt.manage_type as manageType,
pmi.ma_code maCode,
mm.assets_code assetsCode,
pmi.fix_code fixCode,
pcd.type_id typeId,
pcd.task_id taskId,
mt.code specsCode,
mt1.code typeCode,
CASE
WHEN pmi.ma_code is null THEN
CASE
WHEN pcd.status = 4 THEN 1
WHEN pcd.status = 5 THEN 2
ELSE 0
END
ELSE pmi.status
END AS status,
mm.qr_code qrCode,
mm.ma_id maId,
if(pmi.ma_code is not null, 1, pcd.check_num) checkNum
from purchase_check_details pcd
left join purchase_macode_info pmi on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id
left join ma_machine mm on pmi.ma_code = mm.ma_code
left join ma_type mt on pcd.type_id = mt.type_id
left join ma_type mt1 on mt.parent_id = mt1.type_id
where pcd.task_id = #{taskId}
and pcd.`status`!=3 and pcd.`status`!=7
order by status
</select>
<select id="selectTypeByTypeId" resultType="com.bonus.sgzb.base.api.domain.MaType">
select type_id typeId, type_name, parent_id, status, num, unit_id, manage_type, lease_price, buy_price, pay_price,
@ -158,7 +203,7 @@
create_time, remark, company_id
from ma_type where type_id = #{typeId}
</select>
<select id="selectInputNUmByTypeId" resultType="java.math.BigDecimal">
<select id="selectInputNumByTypeId" resultType="java.math.BigDecimal">
select IFNULL(input_num,0) from purchase_check_details where task_id = #{taskId} and type_id = #{typeId}
</select>
<select id="selectMacodeInfoStatusByTaskId" resultType="java.lang.Integer">
@ -180,4 +225,34 @@
WHERE
task_id = #{taskId} and status =4
</select>
<select id="selectExamineType" resultType="java.lang.Integer">
SELECT
COUNT(*)
FROM
bm_flow_relation bfr
LEFT JOIN bm_flow bf on bfr.flow_id=bf.id
WHERE
bf.task_type='23'
AND bfr.company_id = #{companyId}
and bfr.`status`='1'
and bf.`status`='1'
</select>
<select id="selectPutInListExamine" resultType="com.bonus.sgzb.app.domain.PurchaseCheckInfo">
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.nick_name purchaserName,
tk.create_by
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
where task_type = 23 and tk.task_status in (105,28,107)
<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>
<if test="arrivalTime != null and arrivalTime != ''">and pci.arrival_time = #{arrivalTime}</if>
<if test="purchaser != null ">and pci.purchaser = #{purchaser}</if>
<if test="companyId != null ">and pci.company_id = #{companyId}</if>
order by pci.id desc
</select>
</mapper>

View File

@ -141,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectByName" resultType="com.bonus.sgzb.base.domain.BmProjectInfo">
select * from bm_project_info
where
1 = 1
del_flag = '0' and status = '0'
<if test="proName != null and proName != ''">and pro_name = #{proName}</if>
</select>

View File

@ -89,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectByName" resultType="com.bonus.sgzb.base.domain.BmProjectLot">
select * from bm_project_lot
where
1 = 1
del_flag = '0' and status = '0'
<if test="lotName != null and lotName != ''">and lot_name = #{lotName}</if>
</select>

View File

@ -174,7 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectByName" resultType="com.bonus.sgzb.base.domain.BmUnitInfo">
select * from bm_unit_info
where
1 = 1
del_flag = '0' and status = '0'
<if test="unitName != null and unitName != '' ">and unit_name = #{unitName}</if>
</select>

View File

@ -66,7 +66,7 @@
<select id="selectByName" resultType="com.bonus.sgzb.base.api.domain.SysDic">
select * from sys_dic
where
1 = 1
status != 2
<if test="name != null and name != ''">and name = #{name}</if>
</select>

View File

@ -126,7 +126,7 @@ public class BackApplyInfo extends BaseEntity {
@ApiModelProperty(value = "协议编号")
private String agreementCode;
@Excel(name = "退料状态" , readConverterExp = "37=待退料审核,38=退料已审核,39=退料核查中,40=退料完成")
@Excel(name = "退料状态" , readConverterExp = "37=待退料审核,38=退料已审核,39=退料核查中,40=退料完成,101 = 退料审核驳回")
@ApiModelProperty(value = "任务状态")
private String taskStatus;

View File

@ -649,7 +649,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
tta.agreement_id as agreementId,
GROUP_CONCAT(bai.company_id) as companyId,
GROUP_CONCAT(bad.id) as badId,
GROUP_CONCAT(DISTINCT bad.type_id) as typeId,
GROUP_CONCAT(DISTINCT mt2.type_id) as typeId,
GROUP_CONCAT(mt2.type_name) AS typeName,
GROUP_CONCAT(bad.status) AS status
FROM
@ -692,6 +692,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<![CDATA[AND DATE_FORMAT( bai.back_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
</if>
GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time
<if test="typeId != null and typeId != ''">
HAVING FIND_IN_SET(#{typeId}, typeId) > 0
</if>
ORDER BY bai.create_time desc
</select>

View File

@ -164,32 +164,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<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,
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,
CASE tk.task_status
WHEN 28 THEN
tk.update_time
ELSE
''
END as inputTime,
END as inputTime,
CASE tk.task_status
WHEN 28 THEN
us.user_name
ELSE
''
END as inputUser
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,107)
<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>
<if test="arrivalTime != null and arrivalTime != ''"> and pci.arrival_time = #{arrivalTime}</if>
<if test="purchaser != null "> and pci.purchaser = #{purchaser}</if>
<if test="companyId != null "> and pci.company_id = #{companyId}</if>
<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>
<if test="arrivalTime != null and arrivalTime != ''">and pci.arrival_time = #{arrivalTime}</if>
<if test="purchaser != null ">and pci.purchaser = #{purchaser}</if>
<if test="companyId != null ">and pci.company_id = #{companyId}</if>
<if test="typeId != null">AND #{typeId} IN (SELECT mt2.type_id
FROM purchase_check_details pcd
LEFT JOIN ma_type mt on mt.type_id=pcd.type_id

View File

@ -528,7 +528,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update ma_machine set ma_status = #{maStatus} where ma_id = #{maId}
</update>
<update id="updateMacodeByType">
update purchase_macode_info set status = #{status} where task_id = #{taskId} and type_id = #{typeId}
and ma_code = #{maCode}
update purchase_macode_info
set status = #{status}
where task_id = #{taskId}
and type_id = #{typeId}
and ma_code = #{maCode}
</update>
</mapper>

View File

@ -183,6 +183,7 @@
:options="deptOptions"
placeholder="请选择所属上级"
@select="select"
@input="resetValidation"
/>
</el-form-item>
<el-form-item label="联系人" prop="linkMan">
@ -265,7 +266,7 @@ export default {
{ required: true, message: "单位名称不能为空", trigger: "blur" }
],
typeId: [
{ required: true, message: "单位类型不能为空", trigger: "blur" }
{ required: true, message: "单位类型不能为空", trigger: "change" }
],
deptId: [
{ required: true, message: "所属上级不能为空", trigger: "blur" }
@ -302,6 +303,9 @@ export default {
// console.log(row.label)
this.form.deptName = row.label;
},
resetValidation() {
this.$refs.form.clearValidate('deptId')
},
//
changeStatus(row) {
let param = {

View File

@ -41,18 +41,12 @@
</el-select>
</el-form-item>
<el-form-item label="工机具类型" prop="typeId">
<el-cascader
v-model="queryParams.typeId"
:options="deptOptions"
:props="{
expandTrigger: 'hover',
label: 'label',
value: 'id',
checkStrictly: true,
}"
@change="handleNodeClick"
aria-placeholder="请选择极具类型"
></el-cascader>
<Tree
ref="mychildSon"
:width="240"
:dataList="deptList"
@changeId="selectDrop"
></Tree>
</el-form-item>
<el-form-item label="协议号" prop="agreementCode">
<el-input
@ -434,12 +428,14 @@ import {
import { getInfo, h } from '@/api/login'
import { getUnitData, getProData, getAgreementInfoById } from '@/api/claimAndRefund/receive.js'
import dialogForm from './dialogFormExame.vue'
import { listPartTypeApi } from '@/api/repairTest/repair'
import Tree from './tree.vue'
// 10:42startTime,endTime typeId
// http://localhost/claimAndRefund/return/returnApply
export default {
// name: "ReturnExamine",
dicts: ['sys_normal_disable'],
components: { dialogForm },
components: { dialogForm, Tree },
data() {
return {
checkResultOne: false,
@ -511,7 +507,7 @@ export default {
openTextTwo: '',
openTextThree: '',
companyId: '',
deptOptions: [],
deptList: [],
unitList: [],
proList: [],
taskStatusList: [
@ -546,6 +542,7 @@ export default {
this.initSelectData()
this.InitIGetInfo()
this.getList()
this.getTree()
},
methods: {
// claimAndRefund/return/returnApplyAdd
@ -568,6 +565,11 @@ export default {
this.loading = false
} catch (error) {}
},
getTree() {
listPartTypeApi().then((response) => {
this.deptList = response.data
})
},
//
cancel() {
this.open = false
@ -595,6 +597,7 @@ export default {
this.timeRange = []
// this.resetForm("queryForm");
this.$refs.queryForm.resetFields()
this.$refs.mychildSon.inputValue = ''
this.initSelectData()
this.handleQuery()
},
@ -795,7 +798,9 @@ export default {
this.getList()
})
},
handleNodeClick(ev) {},
selectDrop(value) {
this.queryParams.typeId = value
},
initSelectData() {
this.GetUnitData()
this.GetProData()

View File

@ -62,19 +62,12 @@
/>
</el-form-item>
<el-form-item label="工机具类型" prop="typeId">
<el-cascader
v-model="queryParams.typeId"
:options="deptOptions"
:props="{
expandTrigger: 'hover',
label: 'label',
value: 'id',
checkStrictly: true,
}"
@change="handleNodeClick"
aria-placeholder="请选择极具类型"
>
</el-cascader>
<Tree
ref="mychildSon"
:width="240"
:dataList="deptList"
@changeId="selectDrop"
></Tree>
</el-form-item>
<el-form-item label="退料状态" prop="taskStatus">
@ -205,9 +198,11 @@
import { getInfo } from "@/api/login";
import { getUnitData, getProData, getAgreementInfoById, } from "@/api/claimAndRefund/receive.js"
import dialogForm from "./dialogFormExame.vue";
import { listPartTypeApi } from '@/api/repairTest/repair'
import Tree from './tree.vue'
export default {
// name: "ReturnExamine",
components: { dialogForm, },
components: { dialogForm, Tree },
data() {
return {
type: '',
@ -248,7 +243,7 @@
endTime: ''
},
companyId: '',
deptOptions: [],
deptList: [],
unitList: [],
proList: [],
taskStatusList: [
@ -279,6 +274,7 @@
created() {
this.initSelectData()
this.InitIGetInfo()
this.getTree()
},
methods: {
InitIGetInfo() {
@ -287,9 +283,15 @@
this.getList();
})
},
getTree() {
listPartTypeApi().then((response) => {
console.log('🚀 ~ listPartTypeApi ~ response.data:', response.data);
this.deptList = response.data
})
},
//
handleNodeClick(ev) {
selectDrop(value) {
this.queryParams.typeId = value
},
//
initSelectData() {
@ -367,8 +369,8 @@
resetQuery() {
this.dateRange = [];
// this.resetForm("queryForm");
this.$refs.queryForm.resetFields()
this.$refs.mychildSon.inputValue = ''
this.initSelectData()
this.handleQuery();
},

View File

@ -115,7 +115,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="岗位编号" align="center" prop="postId" />
<el-table-column label="岗位编号" type="index" align="center" width="80" />
<el-table-column label="岗位编码" align="center" prop="postCode" />
<el-table-column label="岗位名称" align="center" prop="postName" />
<!-- <el-table-column label="岗位排序" align="center" prop="postSort" /> -->
@ -209,6 +209,8 @@
v-model="form.remark"
type="textarea"
placeholder="请输入内容"
maxlength="100"
show-word-limit
/>
</el-form-item>
</el-form>

View File

@ -922,7 +922,7 @@
} else {
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
'导入失败' +
'导入失败: ' + response.msg +
'</div>',
'导入结果',
{ dangerouslyUseHTMLString: true },