diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseApplyInfo.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseApplyInfo.java index 127e62dd..c9eb78f1 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseApplyInfo.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseApplyInfo.java @@ -255,4 +255,12 @@ public class LeaseApplyInfo extends BaseEntity{ private String applyCode; private Integer isApp; + + @ApiModelProperty(value = "供应时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date supplierTime; + + @ApiModelProperty(value = "供应地点") + private String supplierPlace; + } diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/LeaseTaskStatusEnum.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/LeaseTaskStatusEnum.java index 3e08e37d..5a51966f 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/LeaseTaskStatusEnum.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/LeaseTaskStatusEnum.java @@ -11,11 +11,11 @@ import lombok.Getter; public enum LeaseTaskStatusEnum { //0-领用申请任务待审核,其余为领料申请流程状态 LEASE_TASK_ZERO(0, "待审核"), + LEASE_TASK_SUBMIT(5, "待提交"), LEASE_TASK_TO_PUBLISHED(1, "待发布"), LEASE_TASK_TO_AUDIT(2, "待审核"), LEASE_TASK_IN_PROGRESS(3, "出库进行中"), LEASE_TASK_FINISHED(4, "出库已完成"); - private final Integer status; private final String statusName; diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/domain/dto/SelectDto.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/domain/dto/SelectDto.java index b1310b48..734cf550 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/domain/dto/SelectDto.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/domain/dto/SelectDto.java @@ -34,4 +34,7 @@ public class SelectDto { /** 标段工程id*/ private int projectId; + /** 计量单位*/ + private String unitName; + } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/domain/vo/SelectVo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/domain/vo/SelectVo.java index c52d8e25..f58af172 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/domain/vo/SelectVo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/domain/vo/SelectVo.java @@ -20,4 +20,6 @@ public class SelectVo { /** 层级*/ private String level; + + private String unitName; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java index 127d4727..b9512a4e 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java @@ -4,21 +4,26 @@ import cn.hutool.core.convert.Convert; import com.bonus.common.biz.config.ListPagingUtil; import com.bonus.common.biz.domain.lease.LeaseApplyInfo; import com.bonus.common.core.utils.ServletUtils; +import com.bonus.common.core.utils.poi.ExcelUtil; import com.bonus.common.core.web.controller.BaseController; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.log.annotation.SysLog; import com.bonus.common.log.enums.OperaType; +import com.bonus.common.security.annotation.RequiresPermissions; import com.bonus.material.common.annotation.PreventRepeatSubmit; import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo; import com.bonus.material.lease.service.ILeaseApplyInfoService; import com.bonus.material.lease.service.ILeaseTaskService; import com.bonus.material.ma.domain.Type; +import com.bonus.material.ma.domain.vo.MaTypeVo; import com.bonus.material.ma.domain.vo.StandardConfigDetailsVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.BooleanUtils; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; import javax.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; @@ -150,4 +155,44 @@ public class LeaseTaskController extends BaseController { } } } + + /** + * 生成采购单号 + */ + @ApiOperation(value = "生成采购单号") + @GetMapping(value = "/getCode") + public AjaxResult getCode() { + return AjaxResult.success(service.getCode()); + } + + + /** + * 导出物资类型管理列表 + */ + @ApiOperation(value = "导出物资类型列表") + @PreventRepeatSubmit + @SysLog(title = "工器具物资类型", businessType = OperaType.EXPORT, module = "->导出物资类型") + @PostMapping("/export") + public void export(HttpServletResponse response) { + List parentIds = service.selectParentId(); + List maTypeVos = new ArrayList<>(); + ExcelUtil util = new ExcelUtil<>(MaTypeVo.class); + + for (Integer parentId : parentIds) { + maTypeVos.addAll(service.getListByParentId(parentId.longValue())); + } + util.exportExcel(response, maTypeVos, "物资类型管理数据"); + + } + + /** + * 查询物资类型3级--前端联动式下拉框 + * 没有4级规格型号 + */ + @ApiOperation(value = "获取物资类型连动式下拉框") + @GetMapping("/equipmentThreeType") + public AjaxResult equipmentThreeType() { + List listByMaType = service.getEquipmentThreeTypes(); + return success(listByMaType); + } } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java index 5483b67c..6344f601 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java @@ -37,6 +37,14 @@ public class LeaseApplyDetails extends BaseEntity { @Excel(name = "类型名称") private String maTypeName; + /** 物资类型ids */ + @ApiModelProperty(value = "物资类型ids") + private int[] maTypeIds; + + private String maTypeIdsStr; + + private int isManual; + /** 规格型号id */ @ApiModelProperty(value = "规格型号id") private Long typeId; diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseApplyRequestVo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseApplyRequestVo.java index 605c0677..5114e773 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseApplyRequestVo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseApplyRequestVo.java @@ -34,4 +34,6 @@ public class LeaseApplyRequestVo extends BaseEntity { private List leaseOutVoList; + private int statusFlag; + } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseDeptInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseDeptInfo.java new file mode 100644 index 00000000..a4a3e3c6 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseDeptInfo.java @@ -0,0 +1,44 @@ +package com.bonus.material.lease.domain.vo; + +import com.bonus.common.core.web.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; + +/** + * + * @author hongchao + * @date 2025-02-28 + */ + + +@Data +@ToString +public class LeaseDeptInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 部门 */ + private Long dept_id; + + /** 父级id */ + @ApiModelProperty(value = "父级id") + private Long parentId; + + /** 部门名称 */ + @ApiModelProperty(value = "部门名称") + private String deptName; + + /** 部门缩写 */ + @ApiModelProperty(value = "部门缩写") + private String companySX; + + /** 父组 */ + @ApiModelProperty(value = "父组") + private String ancestors; + + /** 采购申请编号 */ + @ApiModelProperty(value = "采购申请编号") + private String taskCode; + + +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java index 870c6c7d..44e6d499 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java @@ -3,7 +3,10 @@ package com.bonus.material.lease.mapper; import com.bonus.common.biz.domain.lease.LeaseApplyInfo; import com.bonus.material.lease.domain.LeaseApplyDetails; +import com.bonus.material.lease.domain.vo.LeaseDeptInfo; import com.bonus.material.ma.domain.Type; +import com.bonus.material.ma.domain.vo.MaTypeVo; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -71,4 +74,24 @@ public interface LeaseTaskMapper { List getTypeDataList(Type bean); List selectAuditLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo); + + Long getDeptIdByUserId(Long userId); + + LeaseDeptInfo getDeptIdByParentId(Long deptId); + + + /** + * 查询三级物资类型 + * @return + */ + List selectMaTypeThreeLists(); + + /** + * 根据level层级和typeID 查询父级ID + */ + List selectParentId(); + + List getListByTypeName(@Param("typeId") Long typeId); + + void updateLeaseTaskStatus(@Param("taskId") Long taskId, @Param("taskStatus") int taskStatus); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/ILeaseTaskService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/ILeaseTaskService.java index 854b12d3..b76d4223 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/ILeaseTaskService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/ILeaseTaskService.java @@ -4,7 +4,9 @@ package com.bonus.material.lease.service; import com.bonus.common.biz.domain.lease.LeaseApplyInfo; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo; +import com.bonus.material.lease.domain.vo.LeaseDeptInfo; import com.bonus.material.ma.domain.Type; +import com.bonus.material.ma.domain.vo.MaTypeVo; import java.util.List; @@ -66,5 +68,24 @@ public interface ILeaseTaskService { List getTypeDataList(Type bean); List selectAuditLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo); + + /** + * 生成采购单号 + * + * @return + */ + LeaseDeptInfo getCode(); + + List selectParentId(); + + + /** + * 查询物资类型3级--前端联动式下拉框 + * 没有4级规格型号 + * @return + */ + List getEquipmentThreeTypes(); + + List getListByParentId(Long typeId); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java index f6bf1758..0a90c265 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java @@ -15,11 +15,13 @@ import com.bonus.material.back.domain.vo.MaCodeVo; import com.bonus.material.basic.mapper.BmFileInfoMapper; import com.bonus.material.lease.domain.LeaseApplyDetails; import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo; +import com.bonus.material.lease.domain.vo.LeaseDeptInfo; import com.bonus.material.lease.mapper.LeaseApplyDetailsMapper; import com.bonus.material.lease.mapper.LeaseApplyInfoMapper; import com.bonus.material.lease.mapper.LeaseTaskMapper; import com.bonus.material.lease.service.ILeaseTaskService; import com.bonus.material.ma.domain.Type; +import com.bonus.material.ma.domain.vo.MaTypeVo; import com.bonus.material.task.domain.TmTask; import com.bonus.material.task.domain.TmTaskAgreement; import com.bonus.material.task.mapper.TmTaskAgreementMapper; @@ -37,9 +39,7 @@ import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; -import java.util.Optional; +import java.util.*; import java.util.stream.Collectors; /** @@ -89,18 +89,26 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService { leaseApplyRequestVo.getLeaseApplyInfo().setCreateTime(DateUtils.getNowDate()); leaseApplyRequestVo.getLeaseApplyInfo().setCreateBy(SecurityUtils.getUsername()); try { + Integer statusFlag = leaseApplyRequestVo.getStatusFlag(); + // 根据状态标志选择合适的状态 + Integer taskStatus; + if (statusFlag != null && statusFlag == 0) { + taskStatus = LeaseTaskStatusEnum.LEASE_TASK_ZERO.getStatus(); + } else { + taskStatus = LeaseTaskStatusEnum.LEASE_TASK_SUBMIT.getStatus(); + } int thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId()); - String taskCode = genderTaskCode(thisMonthMaxOrder); + String taskCode = leaseApplyRequestVo.getLeaseApplyInfo().getCode(); TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId(), - LeaseTaskStatusEnum.LEASE_TASK_ZERO.getStatus(), + taskStatus, leaseApplyRequestVo.getLeaseApplyInfo().getCompanyId(),thisMonthMaxOrder + 1, taskCode); tmTask.setCreateTime(DateUtils.getNowDate()); tmTask.setCreateBy(SecurityUtils.getUsername()); tmTaskMapper.insertTmTask(tmTask); - TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), leaseApplyRequestVo.getLeaseApplyInfo().getAgreementId()); - tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); - tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); - tmTaskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); +// TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), leaseApplyRequestVo.getLeaseApplyInfo().getAgreementId()); +// tmTaskAgreement.setCreateTime(DateUtils.getNowDate()); +// tmTaskAgreement.setCreateBy(SecurityUtils.getUsername()); +// tmTaskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); leaseApplyRequestVo.getLeaseApplyInfo().setTaskId(tmTask.getTaskId()); leaseApplyRequestVo.getLeaseApplyInfo().setCode(taskCode); @@ -121,7 +129,9 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService { bmFileInfoMapper.insertBmFileInfo(bmFileInfo); }); } - sysWorkflowRecordService.addSysWorkflowRecord(tmTask.getTaskId().intValue(),taskCode,2); + if(statusFlag!= null && statusFlag == 0){ + sysWorkflowRecordService.addSysWorkflowRecord(tmTask.getTaskId().intValue(),taskCode,2); + } if (count > 0) { return insertPurchaseCheckDetails(leaseApplyRequestVo.getLeaseApplyDetailsList(), leaseApplyRequestVo.getLeaseApplyInfo().getId()); } else { @@ -218,14 +228,63 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService { } } + /** + * 生成采购申请编号 + * + */ + @Override + public LeaseDeptInfo getCode() { + try { + Long userId = SecurityUtils.getUserId(); + Long deptId = mapper.getDeptIdByUserId(userId); + LeaseDeptInfo leaseDeptInfo = new LeaseDeptInfo(); + leaseDeptInfo = mapper.getDeptIdByParentId(deptId); + Long parentIdTemp = leaseDeptInfo.getParentId(); + String deptName = ""; + String taskCode = ""; + while (leaseDeptInfo != null) { + parentIdTemp = leaseDeptInfo.getParentId(); + String ancestors = leaseDeptInfo.getAncestors(); + if (ancestors != null && StringUtils.countMatches(ancestors, ",") < 1) { + break; + } + if (ancestors != null && StringUtils.countMatches(ancestors, ",") == 1) { + deptName = leaseDeptInfo.getDeptName(); + break; + } + leaseDeptInfo = mapper.getDeptIdByParentId(parentIdTemp); + } + if(!deptName.equals("")){ + int thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId()); + taskCode = genderTaskCodeTwo(thisMonthMaxOrder,leaseDeptInfo.getCompanySX()); + leaseDeptInfo.setTaskCode(taskCode); + } + return leaseDeptInfo; + } catch (DataAccessException dae) { + throw new ServiceException("数据访问异常: " + dae.getMessage()); + } + } + @Override public boolean updateLeaseApplyInfo(LeaseApplyRequestVo leaseApplyRequestVo) { try { // 提取到局部变量中,减少重复代码 LeaseApplyInfo leaseApplyInfo = leaseApplyRequestVo.getLeaseApplyInfo(); + // 根据状态标志选择合适的状态 + Integer statusFlag = leaseApplyRequestVo.getStatusFlag(); + Integer taskStatus; + if (statusFlag != null && statusFlag == 0) { + taskStatus = LeaseTaskStatusEnum.LEASE_TASK_ZERO.getStatus(); + } else { + taskStatus = LeaseTaskStatusEnum.LEASE_TASK_SUBMIT.getStatus(); + } + if (leaseApplyInfo != null && leaseApplyInfo.getId() != null) { leaseApplyInfo.setUpdateTime(DateUtils.getNowDate()); leaseApplyInfo.setUpdateBy(SecurityUtils.getUsername()); + //修改任务状态 + mapper.updateLeaseTaskStatus(leaseApplyInfo.getTaskId(),taskStatus); + // 去除创建一个新的数组对象,直接复用 Long[] ids = {leaseApplyInfo.getId()}; @@ -324,6 +383,15 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService { details.setParentId(parentId); details.setCreateTime(DateUtils.getNowDate()); details.setCreateBy(SecurityUtils.getUsername()); + // 将 maTypeIds 数组转换为用逗号分隔的字符串 + if (details.getMaTypeIds() != null && details.getMaTypeIds().length > 0) { + String maType = Arrays.stream(details.getMaTypeIds()) + .mapToObj(String::valueOf) + .collect(Collectors.joining(",")); + details.setMaTypeIdsStr(maType); + } else { + details.setMaTypeIdsStr(""); + } } // 批量插入详情数据 int count = mapper.insertLeaseApplyDetailsList(leaseApplyDetailsList); @@ -347,6 +415,68 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService { Date nowDate = DateUtils.getNowDate(); String format = dateFormat.format(nowDate); String result = format.replace("-", ""); - return MaterialConstants.LEASE_TASK_TYPE_LABEL + result + String.format("-%03d", thisMonthMaxOrder + 1); + return MaterialConstants.LEASE_TASK_TYPE_LABEL + result + String.format("-%05d", thisMonthMaxOrder + 1); + } + private static String genderTaskCodeTwo(Integer thisMonthMaxOrder,String deptName) { + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + Date nowDate = DateUtils.getNowDate(); + String format = dateFormat.format(nowDate); + String result = format.replace("-", ""); + if(deptName!=null && !"".equals(deptName)){ + return deptName + result + String.format("-%05d", thisMonthMaxOrder + 1); + }else{ + return MaterialConstants.LEASE_TASK_TYPE_LABEL + result + String.format("-%05d", thisMonthMaxOrder + 1); + } + } + + @Override + public List getEquipmentThreeTypes() { + List maTypes = mapper.selectMaTypeThreeLists(); + List list = new ArrayList<>(); + for (Type maType : maTypes) { + if (maType.getParentId() == 0) { + list.add(maType); + } + } + //根据父节点获取对应的儿子节点 + for (Type maType : list) { + List child = getChild(maTypes, maType.getTypeId()); + maType.setChildren(child); + } + return list; + } + + /** + * 递归调用获取子级 + * @param list 集合 + * @param parentId 父级id + */ + public List getChild(List list, Long parentId) { + List childList = new ArrayList(); + for (Type maType : list) { + Long typeId = maType.getTypeId(); + Long pid = maType.getParentId(); + if (parentId.equals(pid)) { + List childLists = getChild(list, typeId); + maType.setChildren(childLists); + childList.add(maType); + } + } + return childList; + } + + @Override + public List selectParentId() { + return mapper.selectParentId(); + } + + /** + * 根据组织树parent_id查询结果 + * + * @param typeId 父级id + */ + @Override + public List getListByParentId(Long typeId) { + return mapper.getListByTypeName(typeId); } } diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml index a6466ec7..18784dd1 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml @@ -378,7 +378,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT type_id AS typeId, type_name AS name, parent_id AS parentId, - level AS level + level AS level, + unit_name AS unitName FROM ma_type WHERE del_flag = '0' diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml index 3e7f8ef4..0a07b268 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml @@ -102,6 +102,8 @@ + + select lai.id, lai.code, lai.task_id, lai.lease_person, lai.phone, lai.type, lai.company_audit_by,lai.apply_code, @@ -207,6 +209,10 @@ estimate_lease_time, cost_bearing_party, apply_code, + supplier_time, + supplier_place, + unit_id, + project_id, #{code}, @@ -234,6 +240,10 @@ #{estimateLeaseTime}, #{costBearingParty}, #{applyCode}, + #{supplierTime}, + #{supplierPlace}, + #{unitId}, + #{projectId}, @@ -241,13 +251,14 @@ useGeneratedKeys="true"> insert into lease_apply_details (parent_id, type_id, pre_num, al_num, `status`, create_by, create_time, update_by, - update_time, remark, company_id) + update_time, remark, company_id,ma_type_ids,is_manual) values (#{item.parentId,jdbcType=INTEGER}, #{item.typeId,jdbcType=INTEGER}, #{item.preNum,jdbcType=INTEGER}, #{item.alNum,jdbcType=INTEGER}, #{item.status,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR}, NOW(), #{item.updateBy,jdbcType=VARCHAR}, NOW(), - #{item.remark,jdbcType=VARCHAR}, #{item.companyId,jdbcType=INTEGER}) + #{item.remark,jdbcType=VARCHAR}, #{item.companyId,jdbcType=INTEGER},#{item.maTypeIdsStr,jdbcType=VARCHAR}, + #{item.isManual,jdbcType=INTEGER}) @@ -270,6 +281,8 @@ direct_audit_remark = #{directAuditRemark}, update_by = #{updateBy}, apply_code = #{applyCode}, + supplier_time = #{supplierTime}, + supplier_place = #{supplierPlace}, update_time = now(), remark = #{remark}, company_id = #{companyId}, @@ -283,7 +296,39 @@ @@ -485,4 +562,82 @@ GROUP BY lai.id ORDER BY tt.task_status,tt.create_time desc + + + + + + + + + + + + + update tm_task + + task_status = #{taskStatus}, + + where task_Id = #{taskId} +