新购验收部分
This commit is contained in:
parent
8da0ba0275
commit
baa3831c51
|
|
@ -1,6 +1,5 @@
|
|||
package com.bonus.sgzb.base.domain;
|
||||
package com.bonus.sgzb.base.api.domain;
|
||||
|
||||
import com.bonus.sgzb.common.core.annotation.Excel;
|
||||
import com.bonus.sgzb.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
|
@ -39,6 +38,10 @@ public class MaType extends BaseEntity {
|
|||
@ApiModelProperty(value = "计量单位id")
|
||||
private String unitId;
|
||||
|
||||
/** 计量单位 */
|
||||
@ApiModelProperty(value = "计量单位")
|
||||
private String unitName;
|
||||
|
||||
/** 管理方式 */
|
||||
@ApiModelProperty(value = "管理方式")
|
||||
private String manageType;
|
||||
|
|
@ -443,4 +446,12 @@ public class MaType extends BaseEntity {
|
|||
public void setChildren(List<MaType> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public String getUnitName() {
|
||||
return unitName;
|
||||
}
|
||||
|
||||
public void setUnitName(String unitName) {
|
||||
this.unitName = unitName;
|
||||
}
|
||||
}
|
||||
|
|
@ -51,6 +51,12 @@ public interface RemoteUserService
|
|||
@PostMapping("/sms/checkCode")
|
||||
public R<Boolean> checkCode(@RequestParam("phone") String phone, @RequestParam("code") String code);
|
||||
|
||||
/**
|
||||
* 验证码校验
|
||||
*/
|
||||
@PostMapping("/sms/send")
|
||||
public Boolean send(@RequestParam("phone") String phone, @RequestParam("msg") String msg);
|
||||
|
||||
/**
|
||||
* 注册用户信息
|
||||
*
|
||||
|
|
|
|||
|
|
@ -47,6 +47,11 @@ public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserServ
|
|||
return R.fail("校验验证码失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean send(String phone, String msg) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Boolean> registerUserInfo(SysUser sysUser, String source) {
|
||||
return R.fail("注册用户失败:" + throwable.getMessage());
|
||||
|
|
|
|||
|
|
@ -1,22 +1,17 @@
|
|||
package com.bonus.sgzb.base.controller;
|
||||
|
||||
import com.bonus.sgzb.base.domain.MaType;
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.base.service.ITypeService;
|
||||
import com.bonus.sgzb.common.core.constant.HttpStatus;
|
||||
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||
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.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 工机具类型管理控制层
|
||||
|
|
@ -41,31 +36,50 @@ public class MaTypeController extends BaseController {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据左列表类型id查询右表格
|
||||
* @param typeId
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ApiOperation(value = "工器具类型")
|
||||
@GetMapping("/equipmentType")
|
||||
public AjaxResult equipmentType(@RequestParam(required = false) Long typeId,
|
||||
@RequestParam(required = false) String typeName){
|
||||
List<MaType> listByMaType = iTypeService.getEquipmentType(typeId,typeName);
|
||||
return success(listByMaType);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "根据左列表类型id查询右表格")
|
||||
@GetMapping("/getListByMaType")
|
||||
public TableDataInfo getListByMaType(@RequestParam(required = false) Long typeId,
|
||||
@RequestParam(required = false) String typeName,
|
||||
@RequestParam(required = false) Integer pageSize,
|
||||
@RequestParam(required = false) Integer pageNum){
|
||||
if(typeId==null){
|
||||
return null;
|
||||
}
|
||||
List<MaType> listByMaType = iTypeService.getListByMaType(typeId, typeName);
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
rspData.setTotal(listByMaType.size());
|
||||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
listByMaType = listByMaType.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
|
||||
rspData.setRows(listByMaType);
|
||||
rspData.setMsg("查询成功");
|
||||
|
||||
return rspData;
|
||||
public AjaxResult getListByMaType(@RequestParam(required = false) Long typeId,
|
||||
@RequestParam(required = false) String typeName){
|
||||
List<MaType> listByMaType = iTypeService.getListByParentId(typeId,typeName);
|
||||
return success(listByMaType);
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 根据左列表类型id查询右表格
|
||||
// * @param typeId
|
||||
// * @return
|
||||
// */
|
||||
// @ApiOperation(value = "根据左列表类型id查询右表格")
|
||||
// @GetMapping("/getListByMaType")
|
||||
// public TableDataInfo getListByMaType(@RequestParam(required = false) Long typeId,
|
||||
// @RequestParam(required = false) String typeName,
|
||||
// @RequestParam(required = false) Integer pageSize,
|
||||
// @RequestParam(required = false) Integer pageNum){
|
||||
// if(typeId==null){
|
||||
// return null;
|
||||
// }
|
||||
// List<MaType> listByMaType = iTypeService.getListByMaType(typeId, typeName);
|
||||
// TableDataInfo rspData = new TableDataInfo();
|
||||
// rspData.setTotal(listByMaType.size());
|
||||
// rspData.setCode(HttpStatus.SUCCESS);
|
||||
// listByMaType = listByMaType.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
|
||||
// rspData.setRows(listByMaType);
|
||||
// rspData.setMsg("查询成功");
|
||||
//
|
||||
// return rspData;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取机具类型管理ma_type详细信息
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.bonus.sgzb.base.domain.vo;
|
||||
|
||||
import com.bonus.sgzb.base.domain.MaHouse;
|
||||
import com.bonus.sgzb.base.domain.MaType;
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
package com.bonus.sgzb.base.mapper;
|
||||
|
||||
import com.bonus.sgzb.base.domain.MaPropSet;
|
||||
import com.bonus.sgzb.base.domain.MaType;
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.base.domain.MaTypeKeeper;
|
||||
import com.bonus.sgzb.base.domain.MaTypeRepair;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工机具类型管理 数据层
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface MaTypeMapper
|
||||
{
|
||||
public interface MaTypeMapper {
|
||||
|
||||
|
||||
List<MaType> selectMaTypeList(String typeName);
|
||||
|
|
@ -67,4 +67,6 @@ public interface MaTypeMapper
|
|||
|
||||
List<MaType> selectMaTypeTree();
|
||||
|
||||
List<MaType> getListByParentId(@Param("typeId") Long typeId, @Param("typeName") String typeName);
|
||||
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
package com.bonus.sgzb.base.service;
|
||||
|
||||
import com.bonus.sgzb.base.domain.MaHouse;
|
||||
import com.bonus.sgzb.base.domain.MaType;
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.base.domain.vo.TreeSelect;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -65,4 +64,7 @@ public interface ITypeService {
|
|||
*/
|
||||
public List<TreeSelect> buildDeptTreeSelect(List<MaType> maTypeList);
|
||||
|
||||
List<MaType> getListByParentId(Long typeId, String typeName);
|
||||
|
||||
List<MaType> getEquipmentType(Long typeId, String typeName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
package com.bonus.sgzb.base.service.impl;
|
||||
|
||||
import com.bonus.sgzb.base.domain.MaMachine;
|
||||
import com.bonus.sgzb.base.domain.MaType;
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.base.mapper.MaMachineMapper;
|
||||
import com.bonus.sgzb.base.mapper.MaTypeMapper;
|
||||
import com.bonus.sgzb.base.service.MaMachineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.sgzb.base.service.impl;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.base.domain.*;
|
||||
import com.bonus.sgzb.base.domain.vo.TreeSelect;
|
||||
import com.bonus.sgzb.base.mapper.MaTypeFileMapper;
|
||||
|
|
@ -7,7 +8,6 @@ import com.bonus.sgzb.base.mapper.MaTypeMapper;
|
|||
import com.bonus.sgzb.base.service.ITypeService;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -273,6 +273,64 @@ public class MaTypeServiceImpl implements ITypeService {
|
|||
return deptTrees.stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据组织树parent_id查询结果
|
||||
* @param typeId 父级id
|
||||
* @param typeName 名称筛选
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MaType> getListByParentId(Long typeId, String typeName) {
|
||||
return maTypeMapper.getListByParentId(typeId, typeName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工器具类型四级组织树
|
||||
* @param typeId
|
||||
* @param typeName
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MaType> getEquipmentType(Long typeId, String typeName) {
|
||||
List<MaType> maTypes = maTypeMapper.selectMaTypeList("");
|
||||
List<MaType> list = new ArrayList<>();
|
||||
for (MaType maType : maTypes) {
|
||||
if (maType.getParentId() == 0) {
|
||||
list.add(maType);
|
||||
}
|
||||
}
|
||||
List<MaType> tree = new ArrayList<>();
|
||||
//根据父节点获取对应的儿子节点
|
||||
for (MaType maType : list) {
|
||||
List<MaType> child = getChild(maTypes, maType.getTypeId());
|
||||
maType.setChildren(child);
|
||||
tree.add(maType);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Author dingjie
|
||||
* @Date 2023/12/14
|
||||
* @Description 递归调用获取儿子
|
||||
*/
|
||||
public List<MaType> getChild(List<MaType> list, Long parentId) {
|
||||
List<MaType> childList = new ArrayList<MaType>();
|
||||
for (MaType maType : list) {
|
||||
Long typeId = maType.getTypeId();
|
||||
Long pid = maType.getParentId();
|
||||
if (parentId.equals(pid)) {
|
||||
List<MaType> childLists = getChild(list, typeId);
|
||||
maType.setChildren(childLists);
|
||||
childList.add(maType);
|
||||
}
|
||||
}
|
||||
System.out.println(childList);
|
||||
return childList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 递归列表
|
||||
|
|
|
|||
|
|
@ -3,13 +3,14 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.sgzb.base.mapper.MaTypeMapper">
|
||||
<resultMap type="com.bonus.sgzb.base.domain.MaType" id="MaTypeResult">
|
||||
<resultMap type="com.bonus.sgzb.base.api.domain.MaType" id="MaTypeResult">
|
||||
<result property="typeId" column="type_id" />
|
||||
<result property="typeName" column="type_name" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="num" column="num" />
|
||||
<result property="unitId" column="unit_id" />
|
||||
<result property="unitName" column="unit_name" />
|
||||
<result property="manageType" column="manage_type" />
|
||||
<result property="leasePrice" column="lease_price" />
|
||||
<result property="buyPrice" column="buy_price" />
|
||||
|
|
@ -31,11 +32,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectMaTypeVo">
|
||||
select type_id, type_name, parent_id, status, num, unit_id, manage_type, lease_price, buy_price, pay_price, level, rated_load, test_load, holding_time, warn_num, del_flag, create_by, create_time, remark, company_id
|
||||
select type_id, type_name, parent_id, status, num, unit_id, unit_name, manage_type, lease_price, buy_price, pay_price, level, rated_load, test_load, holding_time, warn_num, del_flag, create_by, create_time, remark, company_id
|
||||
from ma_type
|
||||
</sql>
|
||||
|
||||
<insert id="insertType" parameterType="com.bonus.sgzb.base.domain.MaType" useGeneratedKeys="true" keyProperty="typeId">
|
||||
<insert id="insertType" parameterType="com.bonus.sgzb.base.api.domain.MaType" useGeneratedKeys="true" keyProperty="typeId">
|
||||
insert into ma_type
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="typeName != null and typeName != ''">type_name,</if>
|
||||
|
|
@ -43,6 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="status != null">status,</if>
|
||||
<if test="num != null">num,</if>
|
||||
<if test="unitId != null">unit_id,</if>
|
||||
<if test="unitName != null">unit_name,</if>
|
||||
<if test="manageType != null">manage_type,</if>
|
||||
<if test="leasePrice != null">lease_price,</if>
|
||||
<if test="buyPrice != null">buy_price,</if>
|
||||
|
|
@ -68,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="status != null">#{status},</if>
|
||||
<if test="num != null">#{num},</if>
|
||||
<if test="unitId != null">#{unitId},</if>
|
||||
<if test="unitName != null">#{unitName},</if>
|
||||
<if test="manageType != null">#{manageType},</if>
|
||||
<if test="leasePrice != null">#{leasePrice},</if>
|
||||
<if test="buyPrice != null">#{buyPrice},</if>
|
||||
|
|
@ -121,6 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="status != null">status = #{status},</if>
|
||||
<if test="num != null">num = #{num},</if>
|
||||
<if test="unitId != null">unit_id = #{unitId},</if>
|
||||
<if test="unitName != null">unit_name = #{unitName},</if>
|
||||
<if test="manageType != null">manage_type = #{manageType},</if>
|
||||
<if test="leasePrice != null">lease_price = #{leasePrice},</if>
|
||||
<if test="buyPrice != null">buy_price = #{buyPrice},</if>
|
||||
|
|
@ -148,7 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<select id="selectMaTypeList" parameterType="String" resultMap="MaTypeResult">
|
||||
select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.manage_type,
|
||||
select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.unit_name, m.manage_type,
|
||||
m.lease_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
|
||||
m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl,
|
||||
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId,
|
||||
|
|
@ -161,14 +165,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join (select * from ma_type_file where file_type = '2') mtf2 on m.type_id = mtf2.type_id
|
||||
left join ma_type_keeper mtk on mtf.type_id = mtk.type_id
|
||||
left join sys_user su on mtk.user_id = su.user_id
|
||||
<where>
|
||||
<if test="typeName != null and typeName !=''">
|
||||
AND type_name like concat('%',#{typeName},'%')
|
||||
</if>
|
||||
</where>
|
||||
where m.status = '0'
|
||||
<if test="typeName != null and typeName !=''">
|
||||
AND type_name like concat('%',#{typeName},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectTypeList" resultType="com.bonus.sgzb.base.domain.MaType">
|
||||
<select id="selectTypeList" resultType="com.bonus.sgzb.base.api.domain.MaType">
|
||||
<include refid="selectMaTypeVo"/>
|
||||
<where>
|
||||
<if test="typeName != null and typeName != ''">
|
||||
|
|
@ -182,7 +185,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where del_flag = '0' and parent_id = #{typeId} limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkTypeNameUnique" resultType="com.bonus.sgzb.base.domain.MaType">
|
||||
<select id="checkTypeNameUnique" resultType="com.bonus.sgzb.base.api.domain.MaType">
|
||||
<include refid="selectMaTypeVo"/>
|
||||
where type_name = #{typeName} limit 1
|
||||
</select>
|
||||
|
|
@ -248,7 +251,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</insert>
|
||||
|
||||
<select id="selectMaTypeByTypeId" resultMap="MaTypeResult">
|
||||
select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.manage_type,
|
||||
select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.unit_name, m.manage_type,
|
||||
m.lease_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
|
||||
m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl,
|
||||
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId,
|
||||
|
|
@ -261,7 +264,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join (select * from ma_type_file where file_type = '2') mtf2 on m.type_id = mtf2.type_id
|
||||
left join ma_type_keeper mtk on mtf.type_id = mtk.type_id
|
||||
left join sys_user su on mtk.user_id = su.user_id
|
||||
where m.type_id = #{typeId}
|
||||
where m.type_id = #{typeId} and m.status = '0'
|
||||
</select>
|
||||
|
||||
<update id="updateKeeperByTypeId">
|
||||
|
|
@ -287,6 +290,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
m.holding_time, m.warn_num, m.del_flag, m.create_by, m.create_time,
|
||||
m.remark, m.company_id
|
||||
from ma_type m
|
||||
WHERE level != 4
|
||||
WHERE level != 4 and m.status = '0'
|
||||
</select>
|
||||
|
||||
<select id="getListByParentId" resultMap="MaTypeResult">
|
||||
select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.unit_name, m.manage_type,
|
||||
m.lease_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
|
||||
m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl,
|
||||
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId,
|
||||
su.user_name keeperUserName, mpi.prop_name, m.del_flag, m.create_by, m.create_time,
|
||||
m.remark, m.company_id
|
||||
from ma_type m
|
||||
left join ma_prop_set mps on m.type_id = mps.type_id
|
||||
left join ma_prop_info mpi on mps.prop_id = mpi.prop_id
|
||||
left join (select * from ma_type_file where file_type = '1') mtf on m.type_id = mtf.type_id
|
||||
left join (select * from ma_type_file where file_type = '2') mtf2 on m.type_id = mtf2.type_id
|
||||
left join ma_type_keeper mtk on mtf.type_id = mtk.type_id
|
||||
left join sys_user su on mtk.user_id = su.user_id
|
||||
where m.parent_id = #{typeId} and m.status = '0'
|
||||
<if test="typeName != null and typeName !=''">
|
||||
AND type_name like concat('%',#{typeName},'%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -87,18 +87,18 @@ public class PurchaseCheckDetailsController extends BaseController
|
|||
/**
|
||||
* 修改新购验收任务详细
|
||||
*/
|
||||
@RequiresPermissions("domain:details:edit")
|
||||
@ApiOperation(value = "修改新购验收任务详细")
|
||||
@Log(title = "新购验收任务详细", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PurchaseCheckDetails purchaseCheckDetails)
|
||||
public AjaxResult edit(@RequestBody List<PurchaseCheckDetails> purchaseCheckDetailsList)
|
||||
{
|
||||
return toAjax(purchaseCheckDetailsService.updatePurchaseCheckDetails(purchaseCheckDetails));
|
||||
return toAjax(purchaseCheckDetailsService.updatePurchaseCheckDetails(purchaseCheckDetailsList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除新购验收任务详细
|
||||
*/
|
||||
@RequiresPermissions("domain:details:remove")
|
||||
@ApiOperation(value = "删除新购验收任务详细")
|
||||
@Log(title = "新购验收任务详细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{taskIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] taskIds)
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ package com.bonus.sgzb.material.controller;
|
|||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
||||
import com.bonus.sgzb.material.service.IPurchaseCheckInfoService;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -53,7 +55,7 @@ public class PurchaseCheckInfoController extends BaseController
|
|||
/**
|
||||
* 导出新购验收任务列表
|
||||
*/
|
||||
@RequiresPermissions("domain:info:export")
|
||||
@ApiOperation("导出新购验收任务列表")
|
||||
@Log(title = "新购验收任务", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PurchaseCheckInfo purchaseCheckInfo)
|
||||
|
|
@ -66,7 +68,7 @@ public class PurchaseCheckInfoController extends BaseController
|
|||
/**
|
||||
* 获取新购验收任务详细信息
|
||||
*/
|
||||
@RequiresPermissions("domain:info:query")
|
||||
@ApiOperation("获取新购验收任务详细信息")
|
||||
@GetMapping(value = "/{taskId}")
|
||||
public AjaxResult getInfo(@PathVariable("taskId") Long taskId)
|
||||
{
|
||||
|
|
@ -76,7 +78,7 @@ public class PurchaseCheckInfoController extends BaseController
|
|||
/**
|
||||
* 新增新购验收任务
|
||||
*/
|
||||
@RequiresPermissions("domain:info:add")
|
||||
@ApiOperation("新增新购验收任务")
|
||||
@Log(title = "新购验收任务", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PurchaseCheckInfo purchaseCheckInfo)
|
||||
|
|
@ -84,10 +86,20 @@ public class PurchaseCheckInfoController extends BaseController
|
|||
return toAjax(purchaseCheckInfoService.insertPurchaseCheckInfo(purchaseCheckInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 验收通知
|
||||
*/
|
||||
@ApiOperation("验收通知")
|
||||
@Log(title = "验收通知", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/bmNoticeInfo")
|
||||
public AjaxResult bmNoticeInfo(@RequestBody NoticeInfoVO noticeInfoVO) throws Exception {
|
||||
return toAjax(purchaseCheckInfoService.insertBmNoticeInfo(noticeInfoVO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改新购验收任务
|
||||
*/
|
||||
@RequiresPermissions("domain:info:edit")
|
||||
@ApiOperation("修改新购验收任务")
|
||||
@Log(title = "新购验收任务", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PurchaseCheckInfo purchaseCheckInfo)
|
||||
|
|
@ -98,7 +110,7 @@ public class PurchaseCheckInfoController extends BaseController
|
|||
/**
|
||||
* 删除新购验收任务
|
||||
*/
|
||||
@RequiresPermissions("domain:info:remove")
|
||||
@ApiOperation("删除新购验收任务")
|
||||
@Log(title = "新购验收任务", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{taskIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] taskIds)
|
||||
|
|
|
|||
|
|
@ -79,6 +79,19 @@ public class PurchaseMacodeInfoController extends BaseController
|
|||
return toAjax(purchaseMacodeInfoService.insertPurchaseMacodeInfo(purchaseMacodeInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成设备编号
|
||||
*/
|
||||
@ApiOperation(value = "生成设备编号")
|
||||
@PostMapping("equipmentNumber")
|
||||
public AjaxResult generateEquipmentNumber(@RequestBody PurchaseMacodeInfo purchaseMacodeInfo) throws Exception {
|
||||
Long typeId = purchaseMacodeInfo.getTypeId();
|
||||
if (typeId == null) {
|
||||
throw new Exception("类型typeId为空!");
|
||||
}
|
||||
return success(purchaseMacodeInfoService.generateEquipmentNumber(typeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改新购验收编号管理
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,128 @@
|
|||
package com.bonus.sgzb.material.domain;
|
||||
|
||||
import com.bonus.sgzb.common.core.annotation.Excel;
|
||||
import com.bonus.sgzb.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 短信通知对象
|
||||
*
|
||||
* @author bonus
|
||||
* @date 2023-12-14
|
||||
*/
|
||||
public class BmNoticeInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键id */
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/** 任务ID */
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
private Long taskId;
|
||||
|
||||
/** 通知内容 */
|
||||
@ApiModelProperty(value = "通知内容")
|
||||
private String content;
|
||||
|
||||
/** 被通知人 */
|
||||
@ApiModelProperty(value = "被通知人")
|
||||
private Long noticeUser;
|
||||
|
||||
/** 手机号 */
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String phone;
|
||||
|
||||
/** 模块名称 */
|
||||
@ApiModelProperty(value = "模块名称")
|
||||
private String modelName;
|
||||
|
||||
/** 数据所属组织 */
|
||||
@ApiModelProperty(value = "数据所属组织")
|
||||
private Long companyId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTaskId(Long taskId)
|
||||
{
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public Long getTaskId()
|
||||
{
|
||||
return taskId;
|
||||
}
|
||||
public void setContent(String content)
|
||||
{
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getContent()
|
||||
{
|
||||
return content;
|
||||
}
|
||||
public void setNoticeUser(Long noticeUser)
|
||||
{
|
||||
this.noticeUser = noticeUser;
|
||||
}
|
||||
|
||||
public Long getNoticeUser()
|
||||
{
|
||||
return noticeUser;
|
||||
}
|
||||
public void setPhone(String phone)
|
||||
{
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPhone()
|
||||
{
|
||||
return phone;
|
||||
}
|
||||
public void setModelName(String modelName)
|
||||
{
|
||||
this.modelName = modelName;
|
||||
}
|
||||
|
||||
public String getModelName()
|
||||
{
|
||||
return modelName;
|
||||
}
|
||||
public void setCompanyId(Long companyId)
|
||||
{
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public Long getCompanyId()
|
||||
{
|
||||
return companyId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("taskId", getTaskId())
|
||||
.append("content", getContent())
|
||||
.append("noticeUser", getNoticeUser())
|
||||
.append("phone", getPhone())
|
||||
.append("modelName", getModelName())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("companyId", getCompanyId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -38,6 +38,14 @@ public class PurchaseCheckDetails extends BaseEntity
|
|||
@ApiModelProperty(value = "采购数量")
|
||||
private Long purchaseNum;
|
||||
|
||||
/** 验收数量 */
|
||||
@ApiModelProperty(value = "验收数量")
|
||||
private Long checkNum;
|
||||
|
||||
/** 验收结论 */
|
||||
@ApiModelProperty(value = "验收结论")
|
||||
private String checkResult;
|
||||
|
||||
/** 供应商id */
|
||||
@ApiModelProperty(value = "供应商id")
|
||||
private Long supplierId;
|
||||
|
|
@ -46,11 +54,31 @@ public class PurchaseCheckDetails extends BaseEntity
|
|||
@ApiModelProperty(value = "供应商名称")
|
||||
private String supplier;
|
||||
|
||||
/** 验收状态0,未验收 1,已验收 2,待通知 */
|
||||
@ApiModelProperty(value = "验收状态0,未验收 1,已验收 2,待通知")
|
||||
private Integer status;
|
||||
|
||||
/** 出厂日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "出厂日期")
|
||||
private Date productionTime;
|
||||
|
||||
/** 验收图片 */
|
||||
@ApiModelProperty(value = "验收图片")
|
||||
private String checkUrlName;
|
||||
|
||||
/** 验收图片名称 */
|
||||
@ApiModelProperty(value = "验收图片名称")
|
||||
private String checkUrl;
|
||||
|
||||
/** 验收附件名称 */
|
||||
@ApiModelProperty(value = "验收附件名称")
|
||||
private String fileName;
|
||||
|
||||
/** 验收附件 */
|
||||
@ApiModelProperty(value = "验收附件")
|
||||
private String fileUrl;
|
||||
|
||||
/** 数据所属组织 */
|
||||
@ApiModelProperty(value = "数据所属组织")
|
||||
private Long companyId;
|
||||
|
|
@ -160,6 +188,62 @@ public class PurchaseCheckDetails extends BaseEntity
|
|||
this.supplier = supplier;
|
||||
}
|
||||
|
||||
public Long getCheckNum() {
|
||||
return checkNum;
|
||||
}
|
||||
|
||||
public void setCheckNum(Long checkNum) {
|
||||
this.checkNum = checkNum;
|
||||
}
|
||||
|
||||
public String getCheckResult() {
|
||||
return checkResult;
|
||||
}
|
||||
|
||||
public void setCheckResult(String checkResult) {
|
||||
this.checkResult = checkResult;
|
||||
}
|
||||
|
||||
public String getCheckUrlName() {
|
||||
return checkUrlName;
|
||||
}
|
||||
|
||||
public void setCheckUrlName(String checkUrlName) {
|
||||
this.checkUrlName = checkUrlName;
|
||||
}
|
||||
|
||||
public String getCheckUrl() {
|
||||
return checkUrl;
|
||||
}
|
||||
|
||||
public void setCheckUrl(String checkUrl) {
|
||||
this.checkUrl = checkUrl;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public String getFileUrl() {
|
||||
return fileUrl;
|
||||
}
|
||||
|
||||
public void setFileUrl(String fileUrl) {
|
||||
this.fileUrl = fileUrl;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
|||
|
|
@ -61,4 +61,8 @@ public interface PurchaseCheckDetailsMapper {
|
|||
public int deletePurchaseCheckDetailsByTaskIds(Long[] taskIds);
|
||||
|
||||
int insertPurchaseCheckDetailsList(@Param("purchaseCheckDetailsList") List<PurchaseCheckDetails> purchaseCheckDetailsList);
|
||||
|
||||
int updateCheckDetailsByTaskId(Long taskId);
|
||||
|
||||
int selectPurchaseCheckDetailsStatus(Long taskId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.sgzb.material.mapper;
|
||||
|
||||
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -61,4 +62,6 @@ public interface PurchaseCheckInfoMapper
|
|||
public int deletePurchaseCheckInfoByTaskIds(Long[] taskIds);
|
||||
|
||||
String selectTypeNameByTaskId(Long taskId);
|
||||
|
||||
int insertBmNoticeInfo(BmNoticeInfo bmNoticeInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,22 @@
|
|||
package com.bonus.sgzb.material.mapper;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.bonus.sgzb.material.domain.PurchaseMacodeInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 新购验收编号管理purchase_macode_infoMapper接口
|
||||
*
|
||||
*
|
||||
* @author bonus
|
||||
* @date 2023-12-10
|
||||
*/
|
||||
public interface PurchaseMacodeInfoMapper
|
||||
{
|
||||
public interface PurchaseMacodeInfoMapper {
|
||||
/**
|
||||
* 查询新购验收编号管理purchase_macode_info
|
||||
*
|
||||
*
|
||||
* @param taskId 新购验收编号管理purchase_macode_info主键
|
||||
* @return 新购验收编号管理purchase_macode_info
|
||||
*/
|
||||
|
|
@ -22,7 +24,7 @@ public interface PurchaseMacodeInfoMapper
|
|||
|
||||
/**
|
||||
* 查询新购验收编号管理purchase_macode_info列表
|
||||
*
|
||||
*
|
||||
* @param purchaseMacodeInfo 新购验收编号管理purchase_macode_info
|
||||
* @return 新购验收编号管理purchase_macode_info集合
|
||||
*/
|
||||
|
|
@ -30,7 +32,7 @@ public interface PurchaseMacodeInfoMapper
|
|||
|
||||
/**
|
||||
* 新增新购验收编号管理purchase_macode_info
|
||||
*
|
||||
*
|
||||
* @param purchaseMacodeInfo 新购验收编号管理purchase_macode_info
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -38,7 +40,7 @@ public interface PurchaseMacodeInfoMapper
|
|||
|
||||
/**
|
||||
* 修改新购验收编号管理purchase_macode_info
|
||||
*
|
||||
*
|
||||
* @param purchaseMacodeInfo 新购验收编号管理purchase_macode_info
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -46,7 +48,7 @@ public interface PurchaseMacodeInfoMapper
|
|||
|
||||
/**
|
||||
* 删除新购验收编号管理purchase_macode_info
|
||||
*
|
||||
*
|
||||
* @param taskId 新购验收编号管理purchase_macode_info主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -54,9 +56,13 @@ public interface PurchaseMacodeInfoMapper
|
|||
|
||||
/**
|
||||
* 批量删除新购验收编号管理purchase_macode_info
|
||||
*
|
||||
*
|
||||
* @param taskIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePurchaseMacodeInfoByTaskIds(Long[] taskIds);
|
||||
|
||||
JSONObject getTypeByTypeId(long typeId);
|
||||
|
||||
int getSerialNumber(@Param("typeId") long typeId, @Param("nowDate") Date nowDate);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.sgzb.material.mapper;
|
|||
|
||||
import com.bonus.sgzb.base.api.domain.TmTask;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -60,4 +61,6 @@ public interface TaskMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteTmTaskByTaskIds(Long[] taskIds);
|
||||
|
||||
int selectTaskNumByMonth(Date date);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ public interface IPurchaseCheckDetailsService
|
|||
/**
|
||||
* 修改新购验收任务详细purchase_check_details
|
||||
*
|
||||
* @param purchaseCheckDetails 新购验收任务详细purchase_check_details
|
||||
* @param purchaseCheckDetailsList 新购验收任务详细purchase_check_details
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePurchaseCheckDetails(PurchaseCheckDetails purchaseCheckDetails);
|
||||
public int updatePurchaseCheckDetails(List<PurchaseCheckDetails> purchaseCheckDetailsList);
|
||||
|
||||
/**
|
||||
* 批量删除新购验收任务详细purchase_check_details
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.bonus.sgzb.material.service;
|
||||
|
||||
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -59,4 +61,7 @@ public interface IPurchaseCheckInfoService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deletePurchaseCheckInfoByTaskId(Long taskId);
|
||||
|
||||
Boolean insertBmNoticeInfo(NoticeInfoVO noticeInfoVO) throws Exception;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,4 +59,7 @@ public interface IPurchaseMacodeInfoService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deletePurchaseMacodeInfoByTaskId(Long taskId);
|
||||
|
||||
String generateEquipmentNumber(long typeId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,58 +2,65 @@ package com.bonus.sgzb.material.service.impl;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.TmTask;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckDetails;
|
||||
import com.bonus.sgzb.material.domain.PurchaseMacodeInfo;
|
||||
import com.bonus.sgzb.material.mapper.PurchaseCheckDetailsMapper;
|
||||
import com.bonus.sgzb.material.mapper.TaskMapper;
|
||||
import com.bonus.sgzb.material.service.IPurchaseCheckDetailsService;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.material.service.IPurchaseMacodeInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 新购验收任务详细purchase_check_detailsService业务层处理
|
||||
*
|
||||
*
|
||||
* @author bonus
|
||||
* @date 2023-12-10
|
||||
*/
|
||||
@Service
|
||||
public class PurchaseCheckDetailsServiceImpl implements IPurchaseCheckDetailsService
|
||||
{
|
||||
@Autowired
|
||||
public class PurchaseCheckDetailsServiceImpl implements IPurchaseCheckDetailsService {
|
||||
@Resource
|
||||
private PurchaseCheckDetailsMapper purchaseCheckDetailsMapper;
|
||||
|
||||
@Resource
|
||||
private TaskMapper taskMapper;
|
||||
|
||||
@Resource
|
||||
private IPurchaseMacodeInfoService macodeInfoService;
|
||||
/**
|
||||
* 查询新购验收任务详细purchase_check_details
|
||||
*
|
||||
*
|
||||
* @param taskId 新购验收任务详细purchase_check_details主键
|
||||
* @return 新购验收任务详细purchase_check_details
|
||||
*/
|
||||
@Override
|
||||
public PurchaseCheckDetails selectPurchaseCheckDetailsByTaskId(Long taskId)
|
||||
{
|
||||
public PurchaseCheckDetails selectPurchaseCheckDetailsByTaskId(Long taskId) {
|
||||
return purchaseCheckDetailsMapper.selectPurchaseCheckDetailsByTaskId(taskId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询新购验收任务详细purchase_check_details列表
|
||||
*
|
||||
*
|
||||
* @param purchaseCheckDetails 新购验收任务详细purchase_check_details
|
||||
* @return 新购验收任务详细purchase_check_details
|
||||
*/
|
||||
@Override
|
||||
public List<PurchaseCheckDetails> selectPurchaseCheckDetailsList(PurchaseCheckDetails purchaseCheckDetails)
|
||||
{
|
||||
public List<PurchaseCheckDetails> selectPurchaseCheckDetailsList(PurchaseCheckDetails purchaseCheckDetails) {
|
||||
return purchaseCheckDetailsMapper.selectPurchaseCheckDetailsList(purchaseCheckDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增新购验收任务详细purchase_check_details
|
||||
*
|
||||
*
|
||||
* @param purchaseCheckDetailsList 新购验收任务详细purchase_check_details
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPurchaseCheckDetails(List<PurchaseCheckDetails> purchaseCheckDetailsList)
|
||||
{
|
||||
public int insertPurchaseCheckDetails(List<PurchaseCheckDetails> purchaseCheckDetailsList) {
|
||||
// purchaseCheckDetails.setCreateTime(DateUtils.getNowDate());
|
||||
// return purchaseCheckDetailsMapper.insertPurchaseCheckDetails(purchaseCheckDetails);
|
||||
return purchaseCheckDetailsMapper.insertPurchaseCheckDetailsList(purchaseCheckDetailsList);
|
||||
|
|
@ -61,38 +68,60 @@ public class PurchaseCheckDetailsServiceImpl implements IPurchaseCheckDetailsSer
|
|||
|
||||
/**
|
||||
* 修改新购验收任务详细purchase_check_details
|
||||
*
|
||||
* @param purchaseCheckDetails 新购验收任务详细purchase_check_details
|
||||
*
|
||||
* @param purchaseCheckDetailsList 新购验收任务详细purchase_check_details
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePurchaseCheckDetails(PurchaseCheckDetails purchaseCheckDetails)
|
||||
{
|
||||
purchaseCheckDetails.setUpdateTime(DateUtils.getNowDate());
|
||||
return purchaseCheckDetailsMapper.updatePurchaseCheckDetails(purchaseCheckDetails);
|
||||
public int updatePurchaseCheckDetails(List<PurchaseCheckDetails> purchaseCheckDetailsList) {
|
||||
Long taskId = 0L;
|
||||
for (PurchaseCheckDetails purchaseCheckDetails : purchaseCheckDetailsList) {
|
||||
taskId = purchaseCheckDetails.getTaskId();
|
||||
if ("通过".equals(purchaseCheckDetails.getCheckResult())) {
|
||||
purchaseCheckDetails.setStatus(1);
|
||||
// 通过之后往编码管理表里回填数据
|
||||
PurchaseMacodeInfo macodeInfo = new PurchaseMacodeInfo();
|
||||
macodeInfo.setTaskId(purchaseCheckDetails.getTypeId());
|
||||
macodeInfo.setTaskId(taskId);
|
||||
macodeInfoService.insertPurchaseMacodeInfo(macodeInfo);
|
||||
} else if ("不通过".equals(purchaseCheckDetails.getCheckResult())) {
|
||||
purchaseCheckDetails.setStatus(0);
|
||||
} else {
|
||||
purchaseCheckDetails.setStatus(2);
|
||||
}
|
||||
purchaseCheckDetails.setUpdateTime(DateUtils.getNowDate());
|
||||
purchaseCheckDetailsMapper.updatePurchaseCheckDetails(purchaseCheckDetails);
|
||||
}
|
||||
// 当全部为已验收,修改任务验收状态
|
||||
int count = purchaseCheckDetailsMapper.selectPurchaseCheckDetailsStatus(taskId);
|
||||
if (count <= 0) {
|
||||
TmTask task = new TmTask();
|
||||
task.setTaskId(taskId);
|
||||
task.setTaskStatus(26);
|
||||
taskMapper.updateTmTask(task);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除新购验收任务详细purchase_check_details
|
||||
*
|
||||
*
|
||||
* @param taskIds 需要删除的新购验收任务详细purchase_check_details主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePurchaseCheckDetailsByTaskIds(Long[] taskIds)
|
||||
{
|
||||
public int deletePurchaseCheckDetailsByTaskIds(Long[] taskIds) {
|
||||
return purchaseCheckDetailsMapper.deletePurchaseCheckDetailsByTaskIds(taskIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除新购验收任务详细purchase_check_details信息
|
||||
*
|
||||
*
|
||||
* @param taskId 新购验收任务详细purchase_check_details主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePurchaseCheckDetailsByTaskId(Long taskId)
|
||||
{
|
||||
public int deletePurchaseCheckDetailsByTaskId(Long taskId) {
|
||||
return purchaseCheckDetailsMapper.deletePurchaseCheckDetailsByTaskId(taskId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,21 @@
|
|||
package com.bonus.sgzb.material.service.impl;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.TmTask;
|
||||
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckDetails;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||
import com.bonus.sgzb.material.mapper.PurchaseCheckDetailsMapper;
|
||||
import com.bonus.sgzb.material.mapper.PurchaseCheckInfoMapper;
|
||||
import com.bonus.sgzb.material.mapper.TaskMapper;
|
||||
import com.bonus.sgzb.material.service.IPurchaseCheckInfoService;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
||||
import com.bonus.sgzb.system.api.RemoteUserService;
|
||||
import javafx.concurrent.Task;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -28,6 +36,12 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService
|
|||
@Resource
|
||||
private TaskMapper taskMapper;
|
||||
|
||||
@Resource
|
||||
private PurchaseCheckDetailsMapper purchaseCheckDetailsMapper;
|
||||
|
||||
@Resource
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
/**
|
||||
* 查询新购验收任务
|
||||
*
|
||||
|
|
@ -68,16 +82,41 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService
|
|||
public int insertPurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo)
|
||||
{
|
||||
TmTask task = new TmTask();
|
||||
// 暂定的状态字典表
|
||||
task.setTaskType(14);
|
||||
task.setTaskStatus(24);
|
||||
task.setCode(purchaseCheckInfo.getCode());
|
||||
// 采购单号
|
||||
task.setCode(purchaseCodeRule());
|
||||
task.setCreateTime(DateUtils.getNowDate());
|
||||
task.setCompanyId(purchaseCheckInfo.getCompanyId());
|
||||
// 创建任务信息
|
||||
taskMapper.insertTmTask(task);
|
||||
purchaseCheckInfo.setTaskId(task.getTaskId());
|
||||
purchaseCheckInfo.setCreateTime(DateUtils.getNowDate());
|
||||
|
||||
// 批量新增新购任务详情信息
|
||||
List<PurchaseCheckDetails> checkDetailsList = purchaseCheckInfo.getCheckDetailsList();
|
||||
if (checkDetailsList != null) {
|
||||
for (PurchaseCheckDetails purchaseCheckDetails : checkDetailsList) {
|
||||
purchaseCheckDetails.setTaskId(task.getTaskId());
|
||||
purchaseCheckDetails.setStatus(2);
|
||||
}
|
||||
purchaseCheckDetailsMapper.insertPurchaseCheckDetailsList(checkDetailsList);
|
||||
}
|
||||
// 新增任务信息
|
||||
return purchaseCheckInfoMapper.insertPurchaseCheckInfo(purchaseCheckInfo);
|
||||
}
|
||||
|
||||
// 采购单号编码生成规则
|
||||
private String purchaseCodeRule() {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date nowDate = DateUtils.getNowDate();
|
||||
String format = dateFormat.format(nowDate);
|
||||
int taskNum = taskMapper.selectTaskNumByMonth(nowDate) + 1;
|
||||
String code = "XG" + format + "-000" + taskNum;
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改新购验收任务
|
||||
*
|
||||
|
|
@ -114,4 +153,38 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService
|
|||
{
|
||||
return purchaseCheckInfoMapper.deletePurchaseCheckInfoByTaskId(taskId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 验收通知
|
||||
* @param noticeInfoVO 验收通知内容
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertBmNoticeInfo(NoticeInfoVO noticeInfoVO) throws Exception {
|
||||
// 任务状态修改
|
||||
TmTask task = new TmTask();
|
||||
Long taskId = noticeInfoVO.getTaskId();
|
||||
if (taskId == null) {
|
||||
throw new Exception("任务taskId为空");
|
||||
}
|
||||
task.setTaskId(taskId);
|
||||
task.setTaskStatus(25);
|
||||
taskMapper.updateTmTask(task);
|
||||
// 修改任务详情状态
|
||||
purchaseCheckDetailsMapper.updateCheckDetailsByTaskId(taskId);
|
||||
|
||||
String message = noticeInfoVO.getMessage();
|
||||
List<BmNoticeInfo> bmNoticeInfoList = noticeInfoVO.getBmNoticeInfoList();
|
||||
if (bmNoticeInfoList.size() <= 0) {
|
||||
throw new Exception("绑定用户为空");
|
||||
}
|
||||
Boolean send = false;
|
||||
for (BmNoticeInfo bmNoticeInfo : bmNoticeInfoList) {
|
||||
String phone = bmNoticeInfo.getPhone();
|
||||
// 短信通知
|
||||
send = remoteUserService.send(phone, message);
|
||||
purchaseCheckInfoMapper.insertBmNoticeInfo(bmNoticeInfo);
|
||||
}
|
||||
return send;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
package com.bonus.sgzb.material.service.impl;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.bonus.sgzb.material.domain.PurchaseMacodeInfo;
|
||||
import com.bonus.sgzb.material.mapper.PurchaseMacodeInfoMapper;
|
||||
import com.bonus.sgzb.material.service.IPurchaseMacodeInfoService;
|
||||
|
|
@ -59,6 +62,13 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
|
|||
return purchaseMacodeInfoMapper.insertPurchaseMacodeInfo(purchaseMacodeInfo);
|
||||
}
|
||||
|
||||
// 编码规则
|
||||
private String codeRule() {
|
||||
String code = "NXJJ";
|
||||
|
||||
return "1";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改新购验收编号管理
|
||||
*
|
||||
|
|
@ -95,4 +105,26 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
|
|||
{
|
||||
return purchaseMacodeInfoMapper.deletePurchaseMacodeInfoByTaskId(taskId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成设备编号
|
||||
* @param typeId 类型id
|
||||
* @return 编码结果
|
||||
*/
|
||||
@Override
|
||||
public String generateEquipmentNumber(long typeId) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyMM");
|
||||
Date nowDate = DateUtils.getNowDate();
|
||||
String format = sdf.format(nowDate);
|
||||
|
||||
JSONObject jsonObject = purchaseMacodeInfoMapper.getTypeByTypeId(typeId);
|
||||
String typeCode = jsonObject.getString("typeCode");
|
||||
String specsCode = jsonObject.getString("specsCode");
|
||||
//序列号
|
||||
int count = purchaseMacodeInfoMapper.getSerialNumber(typeId,nowDate);
|
||||
// 编码规则
|
||||
String codingRule = "NXJJ" + typeCode + format + specsCode + "000" + count;
|
||||
return codingRule;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
package com.bonus.sgzb.material.vo;
|
||||
|
||||
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class NoticeInfoVO {
|
||||
|
||||
// 任务主键id
|
||||
private Long taskId;
|
||||
|
||||
// 通知内容
|
||||
private String message;
|
||||
|
||||
// 短信通知对象
|
||||
private List<BmNoticeInfo> bmNoticeInfoList;
|
||||
|
||||
public Long getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(Long taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public List<BmNoticeInfo> getBmNoticeInfoList() {
|
||||
return bmNoticeInfoList;
|
||||
}
|
||||
|
||||
public void setBmNoticeInfoList(List<BmNoticeInfo> bmNoticeInfoList) {
|
||||
this.bmNoticeInfoList = bmNoticeInfoList;
|
||||
}
|
||||
}
|
||||
|
|
@ -10,23 +10,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="typeId" column="type_id" />
|
||||
<result property="purchasePrice" column="purchase_price" />
|
||||
<result property="purchaseNum" column="purchase_num" />
|
||||
<result property="checkNum" column="check_num" />
|
||||
<result property="checkResult" column="check_result" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="productionTime" column="production_time" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="checkUrlName" column="check_url_name" />
|
||||
<result property="checkUrl" column="check_url" />
|
||||
<result property="fileName" column="file_name" />
|
||||
<result property="fileUrl" column="file_url" />
|
||||
<result property="companyId" column="company_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPurchaseCheckDetailsVo">
|
||||
select id,task_id, type_id, purchase_price, purchase_num, supplier_id, create_by, production_time, create_time, update_by, update_time, remark, company_id from purchase_check_details
|
||||
select id, task_id, type_id, purchase_price, purchase_num, check_num, check_result, supplier_id, status, create_by, production_time, create_time, update_by, update_time, remark, check_url_name, check_url, file_name, file_url, company_id from purchase_check_details
|
||||
</sql>
|
||||
|
||||
<select id="selectPurchaseCheckDetailsList" parameterType="com.bonus.sgzb.material.domain.PurchaseCheckDetails" resultMap="PurchaseCheckDetailsResult">
|
||||
select pcd.id,pcd.task_id, pcd.type_id, pcd.purchase_price, pcd.purchase_num, pcd.supplier_id, msi.supplier, pcd.create_by, pcd.production_time, pcd.create_time,
|
||||
pcd.update_by, pcd.update_time, pcd.remark, pcd.company_id, mt1.type_name typeName,mt.type_name specificationType
|
||||
select pcd.id,pcd.task_id, pcd.type_id, pcd.purchase_price, pcd.purchase_num, pcd.check_num, pcd.check_result,
|
||||
pcd.supplier_id, pcd.status, msi.supplier, pcd.create_by, pcd.production_time, pcd.create_time, pcd.check_url_name,
|
||||
pcd.check_url, pcd.file_name, pcd.file_url,pcd.update_by, pcd.update_time, pcd.remark, pcd.company_id,
|
||||
mt1.type_name typeName,mt.type_name specificationType
|
||||
from purchase_check_details pcd
|
||||
left join ma_type mt on pcd.type_id = mt.type_id
|
||||
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
|
|
@ -50,31 +59,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<insert id="insertPurchaseCheckDetails" parameterType="com.bonus.sgzb.material.domain.PurchaseCheckDetails" useGeneratedKeys="true" keyProperty="taskId">
|
||||
insert into purchase_check_details
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="taskId != null">task_id,</if>
|
||||
<if test="typeId != null">type_id,</if>
|
||||
<if test="purchasePrice != null">purchase_price,</if>
|
||||
<if test="purchaseNum != null">purchase_num,</if>
|
||||
<if test="checkNum != null">check_num,</if>
|
||||
<if test="checkResult != null">check_result,</if>
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="productionTime != null">production_time,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="checkUrlName != null">check_url_name,</if>
|
||||
<if test="checkUrl != null">check_url,</if>
|
||||
<if test="fileName != null">file_name,</if>
|
||||
<if test="fileUrl != null">file_url,</if>
|
||||
<if test="companyId != null">company_id,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskId != null">#{taskId},</if>
|
||||
<if test="typeId != null">#{typeId},</if>
|
||||
<if test="purchasePrice != null">#{purchasePrice},</if>
|
||||
<if test="purchaseNum != null">#{purchaseNum},</if>
|
||||
<if test="checkNum != null">#{checkNum},</if>
|
||||
<if test="checkResult != null">#{checkResult},</if>
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="productionTime != null">#{productionTime},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="checkUrlName != null">#{checkUrlName},</if>
|
||||
<if test="checkUrl != null">#{checkUrl},</if>
|
||||
<if test="fileName != null">#{fileName},</if>
|
||||
<if test="fileUrl != null">#{fileUrl},</if>
|
||||
<if test="companyId != null">#{companyId},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePurchaseCheckDetails" parameterType="com.bonus.sgzb.material.domain.PurchaseCheckDetails">
|
||||
|
|
@ -84,13 +109,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="typeId != null">type_id = #{typeId},</if>
|
||||
<if test="purchasePrice != null">purchase_price = #{purchasePrice},</if>
|
||||
<if test="purchaseNum != null">purchase_num = #{purchaseNum},</if>
|
||||
<if test="checkNum != null">check_num = #{checkNum},</if>
|
||||
<if test="checkResult != null">check_result = #{checkResult},</if>
|
||||
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="productionTime != null">production_time = #{productionTime},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="checkUrlName != null">check_url_name = #{checkUrlName},</if>
|
||||
<if test="checkUrl != null">check_url = #{checkUrl},</if>
|
||||
<if test="fileName != null">file_name = #{fileName},</if>
|
||||
<if test="fileUrl != null">file_url = #{fileUrl},</if>
|
||||
<if test="companyId != null">company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
|
|
@ -115,13 +147,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="checkDetails.typeId != null">type_id,</if>
|
||||
<if test="checkDetails.purchasePrice != null">purchase_price,</if>
|
||||
<if test="checkDetails.purchaseNum != null">purchase_num,</if>
|
||||
<if test="checkDetails.checkNum != null">check_num,</if>
|
||||
<if test="checkDetails.checkResult != null">check_result,</if>
|
||||
<if test="checkDetails.supplierId != null">supplier_id,</if>
|
||||
<if test="checkDetails.status != null">status,</if>
|
||||
<if test="checkDetails.createBy != null">create_by,</if>
|
||||
<if test="checkDetails.productionTime != null">production_time,</if>
|
||||
<if test="checkDetails.createTime != null">create_time,</if>
|
||||
<if test="checkDetails.updateBy != null">update_by,</if>
|
||||
<if test="checkDetails.updateTime != null">update_time,</if>
|
||||
<if test="checkDetails.remark != null">remark,</if>
|
||||
<if test="checkDetails.checkUrlName != null">check_url_name,</if>
|
||||
<if test="checkDetails.checkUrl != null">check_url,</if>
|
||||
<if test="checkDetails.fileName != null">file_name,</if>
|
||||
<if test="checkDetails.fileUrl != null">file_url,</if>
|
||||
<if test="checkDetails.companyId != null">company_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -129,15 +168,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="checkDetails.typeId != null">#{checkDetails.typeId},</if>
|
||||
<if test="checkDetails.purchasePrice != null">#{checkDetails.purchasePrice},</if>
|
||||
<if test="checkDetails.purchaseNum != null">#{checkDetails.purchaseNum},</if>
|
||||
<if test="checkDetails.checkNum != null">#{checkNum},</if>
|
||||
<if test="checkDetails.checkResult != null">#{checkResult},</if>
|
||||
<if test="checkDetails.supplierId != null">#{checkDetails.supplierId},</if>
|
||||
<if test="checkDetails.status != null">#{checkDetails.status},</if>
|
||||
<if test="checkDetails.createBy != null">#{checkDetails.createBy},</if>
|
||||
<if test="checkDetails.productionTime != null">#{checkDetails.productionTime},</if>
|
||||
<if test="checkDetails.createTime != null">#{checkDetails.createTime},</if>
|
||||
<if test="checkDetails.updateBy != null">#{checkDetails.updateBy},</if>
|
||||
<if test="checkDetails.updateTime != null">#{checkDetails.updateTime},</if>
|
||||
<if test="checkDetails.remark != null">#{checkDetails.remark},</if>
|
||||
<if test="checkDetails.checkUrlName != null">#{checkDetails.checkUrlName},</if>
|
||||
<if test="checkDetails.checkUrl != null">#{checkDetails.checkUrl},</if>
|
||||
<if test="checkDetails.fileName != null">#{checkDetails.fileName},</if>
|
||||
<if test="checkDetails.fileUrl != null">#{checkDetails.fileUrl},</if>
|
||||
<if test="checkDetails.companyId != null">#{checkDetails.companyId},</if>
|
||||
</trim>
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateCheckDetailsByTaskId">
|
||||
update purchase_check_details set status = 0 where task_id = #{taskId}
|
||||
</update>
|
||||
|
||||
<select id="selectPurchaseCheckDetailsStatus" resultType="int">
|
||||
select count(*) from purchase_check_details where task_id = #{taskId} and status != 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -105,4 +105,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
) t
|
||||
GROUP BY task_id
|
||||
</select>
|
||||
|
||||
<insert id="insertBmNoticeInfo" parameterType="com.bonus.sgzb.material.domain.BmNoticeInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bm_notice_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="taskId != null">task_id,</if>
|
||||
<if test="content != null and content != ''">content,</if>
|
||||
<if test="noticeUser != null">notice_user,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="modelName != null">model_name,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="companyId != null">company_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskId != null">#{taskId},</if>
|
||||
<if test="content != null and content != ''">#{content},</if>
|
||||
<if test="noticeUser != null">#{noticeUser},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="modelName != null">#{modelName},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="companyId != null">#{companyId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
</mapper>
|
||||
|
|
@ -98,4 +98,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{taskId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getTypeByTypeId" resultType="com.alibaba.fastjson.JSONObject">
|
||||
select mt.code typeCode,mt1.code specsCode from ma_type mt
|
||||
left join (select type_id,code from ma_type
|
||||
where type_id in (select parent_id from ma_type where type_id = #{typeId})) mt1 on mt.parent_id = mt1.type_id
|
||||
where mt.type_id = #{typeId}
|
||||
</select>
|
||||
|
||||
<select id="getSerialNumber" resultType="int">
|
||||
select count(*) from ma_machine where type_id = #{typeId} and DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{nowDate},'%y%m')
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -88,4 +88,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{taskId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectTaskNumByMonth" resultType="java.lang.Integer">
|
||||
select count(*) from tm_task where DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{date},'%y%m')
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue