Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
570c59d441
@ -27,10 +27,10 @@ public class PageParam implements Serializable {
|
||||
@Min(value = 1, message = "页码最小值为 1")
|
||||
private Integer pageNo = PAGE_NO;
|
||||
|
||||
@Schema(description = "每页条数,最大值为 100", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@Schema(description = "每页条数,最大值为 999", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@NotNull(message = "每页条数不能为空")
|
||||
@Min(value = 1, message = "每页条数最小值为 1")
|
||||
@Max(value = 100, message = "每页条数最大值为 100")
|
||||
@Max(value = 999, message = "每页条数最大值为 999")
|
||||
private Integer pageSize = PAGE_SIZE;
|
||||
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ public enum BusinesTypeEnum {
|
||||
FINANCE_RECEIVE_INVOICE("发票接收"),
|
||||
FINANCE_INVOICE("财务发票"),
|
||||
MATERIAL("物料"),
|
||||
QUOTATION_RECORD("报价记录"),
|
||||
;
|
||||
|
||||
private String description;
|
||||
|
@ -106,6 +106,7 @@ public interface ErrorCodeConstants {
|
||||
|
||||
ErrorCode TASK_DISPATCH_TASK_NOT_EXISTS = new ErrorCode(1_009_004, "任务不存在或已完成");
|
||||
ErrorCode TASK_DISPATCH_TASK_NO_PERMISSION_FOR_OPERATE = new ErrorCode(1_009_005, "任务不满足操作条件");
|
||||
ErrorCode TASK_DISPATCH_TASK_IS_OVER = new ErrorCode(1_009_007, "报工数量已完成");
|
||||
ErrorCode TASK_DISPATCH_TASK_REPORT_AMOUNT_EXCESS = new ErrorCode(1_009_006, "无法超额报工");
|
||||
/*************质量管理***********/
|
||||
ErrorCode UNQUALIFIED_NOTIFICATION_NOT_EXISTS = new ErrorCode(1_010_001, "品质异常通知单审核不存在");
|
||||
|
@ -150,6 +150,7 @@ public class bdgzsomthingController {
|
||||
public void init() {
|
||||
selectHasPrice();
|
||||
}
|
||||
@Scheduled(cron = "0 0 2 * * ?") //每天十天执行一次
|
||||
public void selectHasPrice(){
|
||||
bdgzsomthingService.selectHasPrice();
|
||||
}
|
||||
|
@ -1,95 +1,95 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.master;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.master.MasterDO;
|
||||
import com.chanko.yunxi.mes.module.heli.service.master.MasterService;
|
||||
|
||||
@Tag(name = "管理后台 - 借用主")
|
||||
@RestController
|
||||
@RequestMapping("/heli/master")
|
||||
@Validated
|
||||
public class MasterController {
|
||||
|
||||
@Resource
|
||||
private MasterService masterService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建借用主")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:create')")
|
||||
public CommonResult<Integer> createMaster(@Valid @RequestBody MasterSaveReqVO createReqVO) {
|
||||
return success(masterService.createMaster(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新借用主")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:update')")
|
||||
public CommonResult<Boolean> updateMaster(@Valid @RequestBody MasterSaveReqVO updateReqVO) {
|
||||
masterService.updateMaster(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除借用主")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:delete')")
|
||||
public CommonResult<Boolean> deleteMaster(@RequestParam("id") Integer id) {
|
||||
masterService.deleteMaster(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得借用主")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:query')")
|
||||
public CommonResult<MasterRespVO> getMaster(@RequestParam("id") Integer id) {
|
||||
MasterDO master = masterService.getMaster(id);
|
||||
return success(BeanUtils.toBean(master, MasterRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得借用主分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:query')")
|
||||
public CommonResult<PageResult<MasterRespVO>> getMasterPage(@Valid MasterPageReqVO pageReqVO) {
|
||||
PageResult<MasterDO> pageResult = masterService.getMasterPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MasterRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出借用主 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportMasterExcel(@Valid MasterPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<MasterDO> list = masterService.getMasterPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "借用主.xls", "数据", MasterRespVO.class,
|
||||
BeanUtils.toBean(list, MasterRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.master;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.master.MasterDO;
|
||||
import com.chanko.yunxi.mes.module.heli.service.master.MasterService;
|
||||
|
||||
@Tag(name = "管理后台 - 借用主")
|
||||
@RestController
|
||||
@RequestMapping("/heli/master")
|
||||
@Validated
|
||||
public class MasterController {
|
||||
|
||||
@Resource
|
||||
private MasterService masterService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建借用主")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:create')")
|
||||
public CommonResult<Integer> createMaster(@Valid @RequestBody MasterSaveReqVO createReqVO) {
|
||||
return success(masterService.createMaster(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新借用主")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:update')")
|
||||
public CommonResult<Boolean> updateMaster(@Valid @RequestBody MasterSaveReqVO updateReqVO) {
|
||||
masterService.updateMaster(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除借用主")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:delete')")
|
||||
public CommonResult<Boolean> deleteMaster(@RequestParam("id") Integer id) {
|
||||
masterService.deleteMaster(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得借用主")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:query')")
|
||||
public CommonResult<MasterRespVO> getMaster(@RequestParam("id") Integer id) {
|
||||
MasterDO master = masterService.getMaster(id);
|
||||
return success(BeanUtils.toBean(master, MasterRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得借用主分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:query')")
|
||||
public CommonResult<PageResult<MasterRespVO>> getMasterPage(@Valid MasterPageReqVO pageReqVO) {
|
||||
PageResult<MasterDO> pageResult = masterService.getMasterPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MasterRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出借用主 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportMasterExcel(@Valid MasterPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<MasterDO> list = masterService.getMasterPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "借用主.xls", "数据", MasterRespVO.class,
|
||||
BeanUtils.toBean(list, MasterRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -20,12 +20,6 @@ public class MasterPageReqVO extends PageParam {
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "借用人")
|
||||
private Long jyUser;
|
||||
|
||||
@Schema(description = "1借出2归还", example = "2")
|
||||
private Integer jyType;
|
||||
|
||||
@Schema(description = "借用部门")
|
||||
private String jyBm;
|
||||
|
||||
@ -38,21 +32,13 @@ public class MasterPageReqVO extends PageParam {
|
||||
@Schema(description = "借用物料名称")
|
||||
private String jyMaster;
|
||||
|
||||
@Schema(description = "借用数量")
|
||||
private BigDecimal jyNum;
|
||||
@Schema(description = "借用人")
|
||||
private String jyUser;
|
||||
|
||||
@Schema(description = "归还数量")
|
||||
private BigDecimal ghNum;
|
||||
@Schema(description = "借用类型", example = "1")
|
||||
private Integer jyType;
|
||||
|
||||
@Schema(description = "借用时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] jyTime;
|
||||
|
||||
@Schema(description = "归还时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] ghTime;
|
||||
|
||||
@Schema(description = "是否归还完成1否 2 是", example = "1")
|
||||
private Integer ghType;
|
||||
@Schema(description = "数量")
|
||||
private BigDecimal num;
|
||||
|
||||
}
|
@ -22,17 +22,9 @@ public class MasterRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "借用人")
|
||||
@ExcelProperty("借用人")
|
||||
private Long jyUser;
|
||||
|
||||
@Schema(description = "1借出2归还", example = "2")
|
||||
@ExcelProperty("1借出2归还")
|
||||
private Integer jyType;
|
||||
|
||||
@Schema(description = "借用部门")
|
||||
@ExcelProperty("借用部门")
|
||||
private String jyBm;
|
||||
private Integer jyBm;
|
||||
|
||||
@Schema(description = "借用用途")
|
||||
@ExcelProperty("借用用途")
|
||||
@ -44,26 +36,30 @@ public class MasterRespVO {
|
||||
|
||||
@Schema(description = "借用物料名称")
|
||||
@ExcelProperty("借用物料名称")
|
||||
private String jyMaster;
|
||||
private Integer jyMaster;
|
||||
|
||||
@Schema(description = "借用数量")
|
||||
@ExcelProperty("借用数量")
|
||||
private BigDecimal jyNum;
|
||||
@Schema(description = "借用人")
|
||||
@ExcelProperty("借用人")
|
||||
private Long jyUser;
|
||||
|
||||
@Schema(description = "归还数量")
|
||||
@ExcelProperty("归还数量")
|
||||
private BigDecimal ghNum;
|
||||
@Schema(description = "借用类型", example = "1")
|
||||
@ExcelProperty("借用类型")
|
||||
private String jyType;
|
||||
|
||||
@Schema(description = "借用时间")
|
||||
@ExcelProperty("借用时间")
|
||||
private LocalDateTime jyTime;
|
||||
|
||||
@Schema(description = "归还时间")
|
||||
@ExcelProperty("归还时间")
|
||||
private LocalDateTime ghTime;
|
||||
|
||||
@Schema(description = "是否归还完成1否 2 是", example = "1")
|
||||
@ExcelProperty("是否归还完成1否 2 是")
|
||||
private Integer ghType;
|
||||
@Schema(description = "数量")
|
||||
@ExcelProperty("数量")
|
||||
private BigDecimal num;
|
||||
@Schema(description = "借用日期")
|
||||
@ExcelProperty("借用日期")
|
||||
private LocalDateTime jyDate;
|
||||
|
||||
@Schema(description = "借用人")
|
||||
@ExcelProperty("借用人")
|
||||
private String jyUsers;
|
||||
@Schema(description = "借用部门")
|
||||
@ExcelProperty("借用部门")
|
||||
private String jyBms;
|
||||
@Schema(description = "借用物料名称")
|
||||
@ExcelProperty("借用物料名称")
|
||||
private String jyMasters;
|
||||
}
|
@ -2,12 +2,12 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.master.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 借用主新增/修改 Request VO")
|
||||
@Data
|
||||
@ -16,14 +16,8 @@ public class MasterSaveReqVO {
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31322")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "借用人")
|
||||
private Long jyUser;
|
||||
|
||||
@Schema(description = "1借出2归还", example = "2")
|
||||
private Integer jyType;
|
||||
|
||||
@Schema(description = "借用部门")
|
||||
private String jyBm;
|
||||
private Integer jyBm;
|
||||
|
||||
@Schema(description = "借用用途")
|
||||
private String jyYt;
|
||||
@ -32,25 +26,18 @@ public class MasterSaveReqVO {
|
||||
private String rem;
|
||||
|
||||
@Schema(description = "借用物料名称")
|
||||
private String jyMaster;
|
||||
private Integer jyMaster;
|
||||
|
||||
@Schema(description = "借用数量")
|
||||
private BigDecimal jyNum;
|
||||
@Schema(description = "借用人")
|
||||
private Long jyUser;
|
||||
|
||||
@Schema(description = "归还数量")
|
||||
private BigDecimal ghNum;
|
||||
@Schema(description = "借用类型")
|
||||
private String jyType;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private BigDecimal num;
|
||||
@Schema(description = "借用时间")
|
||||
private LocalDateTime jyTime;
|
||||
|
||||
@Schema(description = "归还时间")
|
||||
private LocalDateTime ghTime;
|
||||
|
||||
@Schema(description = "是否归还完成1否 2 是", example = "1")
|
||||
private Integer ghType;
|
||||
|
||||
@Schema(description = "是否归还完成1否 2 是", example = "1")
|
||||
private int gh;
|
||||
private LocalDateTime jyDate;
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,5 +1,8 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.pricequoterecord;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
|
||||
import com.chanko.yunxi.mes.framework.operatelog.core.service.OperateLogFrameworkService;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -8,9 +11,9 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
@ -37,19 +40,38 @@ public class PricequoterecordController {
|
||||
|
||||
@Resource
|
||||
private PricequoterecordService pricequoterecordService;
|
||||
@Resource
|
||||
private HttpServletRequest request;
|
||||
@Resource
|
||||
private OperateLogFrameworkService operateLogFrameworkService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建基础信息-报价记录")
|
||||
@PreAuthorize("@ss.hasPermission('heli:pricequoterecord:create')")
|
||||
public CommonResult<Integer> createPricequoterecord(@Valid @RequestBody PricequoterecordSaveReqVO createReqVO) {
|
||||
return success(pricequoterecordService.createPricequoterecord(createReqVO));
|
||||
LocalDateTime startTime = LocalDateTime.now();
|
||||
Integer pricequoterecord = pricequoterecordService.createPricequoterecord(createReqVO);
|
||||
operateLogFrameworkService.createOperateLog(request,
|
||||
startTime,
|
||||
BusinesTypeEnum.QUOTATION_RECORD.name(),
|
||||
Long.valueOf(pricequoterecord),
|
||||
OperateTypeEnum.valueOf("SAVE").getType(),
|
||||
createReqVO.getActiveOpinion());
|
||||
return success(pricequoterecord);
|
||||
}
|
||||
//测试
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新基础信息-报价记录")
|
||||
@PreAuthorize("@ss.hasPermission('heli:pricequoterecord:update')")
|
||||
public CommonResult<Boolean> updatePricequoterecord(@Valid @RequestBody PricequoterecordSaveReqVO updateReqVO) {
|
||||
LocalDateTime startTime = LocalDateTime.now();
|
||||
pricequoterecordService.updatePricequoterecord(updateReqVO);
|
||||
operateLogFrameworkService.createOperateLog(request,
|
||||
startTime,
|
||||
BusinesTypeEnum.QUOTATION_RECORD.name(),
|
||||
Long.valueOf(updateReqVO.getId()),
|
||||
OperateTypeEnum.valueOf("UPDATE").getType(),
|
||||
updateReqVO.getActiveOpinion());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
@ -2,10 +2,7 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.pricequoterecord.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 基础信息-报价记录新增/修改 Request VO")
|
||||
@ -30,9 +27,6 @@ public class PricequoterecordSaveReqVO {
|
||||
@Schema(description = "客户现状(0:潜在客户 1:已有客户)")
|
||||
private Integer clientActuality;
|
||||
|
||||
@Schema(description = "确定中标时间")
|
||||
private LocalDateTime winTheBiddingTime;
|
||||
|
||||
@Schema(description = "中标结果(0:中标 1:落标 2流标)")
|
||||
private Integer winTheResult;
|
||||
|
||||
@ -42,8 +36,16 @@ public class PricequoterecordSaveReqVO {
|
||||
@Schema(description = "报价次数")
|
||||
private Integer baojiacishu;
|
||||
|
||||
@Schema(description = "操作意见")
|
||||
private String activeOpinion;
|
||||
|
||||
@Schema(description = "精整对手")
|
||||
private String jingzhengduishou;
|
||||
@Schema(description = "是否生成启动单(0:生成 1:不生成)")
|
||||
private Integer flag;
|
||||
|
||||
@Schema(description = "确定中标时间")
|
||||
private LocalDateTime winTheBiddingTime;
|
||||
|
||||
|
||||
}
|
||||
|
@ -48,8 +48,8 @@ public class ProcessDesignController {
|
||||
@Operation(summary = "报工")
|
||||
@PreAuthorize("@ss.hasPermission('heli:process-design:create')")
|
||||
public CommonResult<Long> updateBaoGong(@Valid @RequestBody ProcessDesignSaveReqSubVO processDesignSaveReqSubVO) {
|
||||
|
||||
return success(processDesignService.updateBaoGong(processDesignSaveReqSubVO.getZid(),processDesignSaveReqSubVO.getProgress(),processDesignSaveReqSubVO.getImageLink()));
|
||||
return success(processDesignService.updateBaoGong(processDesignSaveReqSubVO));
|
||||
// return success(processDesignService.updateBaoGong(processDesignSaveReqSubVO.getZid(),processDesignSaveReqSubVO.getProgress(),processDesignSaveReqSubVO.getImageLink(),processDesignSaveReqSubVO.getRemark()));
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
|
@ -89,7 +89,8 @@ public class ProcessDesignRespVO {
|
||||
|
||||
@Schema(description = "毛坯结束日期")
|
||||
private LocalDateTime blankDate;
|
||||
|
||||
@Schema(description = "毛坯开始日期")
|
||||
private LocalDateTime startBlankDate;
|
||||
@Schema(description = "毛坯负责人名称")
|
||||
private String blankOwnerName;
|
||||
|
||||
@ -98,7 +99,8 @@ public class ProcessDesignRespVO {
|
||||
|
||||
@Schema(description = "2D结束日期")
|
||||
private LocalDateTime twoDimDate;
|
||||
|
||||
@Schema(description = "2D开始日期")
|
||||
private LocalDateTime startTwoDimDate;
|
||||
@Schema(description = "2D负责人名称")
|
||||
private String twoDimOwnerName;
|
||||
|
||||
@ -107,7 +109,8 @@ public class ProcessDesignRespVO {
|
||||
|
||||
@Schema(description = "3D结束日期")
|
||||
private LocalDateTime threeDimDate;
|
||||
|
||||
@Schema(description = "3D结束日期")
|
||||
private LocalDateTime startThreeDimDate;
|
||||
@Schema(description = "3D负责人名称")
|
||||
private String threeDimOwnerName;
|
||||
|
||||
|
@ -22,7 +22,8 @@ public class ProcessDesignSaveReqSubVO {
|
||||
|
||||
@Schema(description = "图纸链接", example = "随便")
|
||||
private String imageLink;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
|
@ -150,6 +150,13 @@ public class ProjectOrderController {
|
||||
PageResult<ProjectOrderDO> pageResult = projectOrderService.getProjectOrderPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ProjectOrderRespVO.class));
|
||||
}
|
||||
@GetMapping("/pageWX")
|
||||
@Operation(summary = "获得项目订单分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:project-order:query')")
|
||||
public CommonResult<PageResult<ProjectOrderRespVO>> getProjectOrderPageWX(@Valid ProjectOrderPageReqVO pageReqVO) {
|
||||
PageResult<ProjectOrderDO> pageResult = projectOrderService.getProjectOrderPageWx(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ProjectOrderRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出项目订单 Excel")
|
||||
|
@ -40,6 +40,8 @@ public class TaskPlanJDBaoBiaoPageReqVO extends PageParam {
|
||||
@Schema(description = "工序名称")
|
||||
private String procdureName;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private String type;
|
||||
@Schema(description = "总预计工时")
|
||||
private BigDecimal workTime;
|
||||
|
||||
|
@ -5,9 +5,6 @@ import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
@ -31,18 +28,10 @@ public class MasterDO extends BaseDO {
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 借用人
|
||||
*/
|
||||
private Long jyUser;
|
||||
/**
|
||||
* 1借出2归还
|
||||
*/
|
||||
private Integer jyType;
|
||||
/**
|
||||
* 借用部门
|
||||
*/
|
||||
private String jyBm;
|
||||
private Integer jyBm;
|
||||
/**
|
||||
* 借用用途
|
||||
*/
|
||||
@ -54,26 +43,28 @@ public class MasterDO extends BaseDO {
|
||||
/**
|
||||
* 借用物料名称
|
||||
*/
|
||||
private String jyMaster;
|
||||
private Integer jyMaster;
|
||||
/**
|
||||
* 借用数量
|
||||
* 借用人
|
||||
*/
|
||||
private BigDecimal jyNum;
|
||||
private Long jyUser;
|
||||
/**
|
||||
* 归还数量
|
||||
* 借用类型
|
||||
*/
|
||||
private BigDecimal ghNum;
|
||||
private String jyType;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal num;
|
||||
/**
|
||||
* 借用时间
|
||||
*/
|
||||
private LocalDateTime jyTime;
|
||||
/**
|
||||
* 归还时间
|
||||
*/
|
||||
private LocalDateTime ghTime;
|
||||
/**
|
||||
* 是否归还完成1否 2 是
|
||||
*/
|
||||
private Integer ghType;
|
||||
private LocalDateTime jyDate;
|
||||
@TableField(exist = false)
|
||||
private String jyUsers;
|
||||
@TableField(exist = false)
|
||||
private String jyBms;
|
||||
@TableField(exist = false)
|
||||
private String jyMasters;
|
||||
|
||||
}
|
@ -75,4 +75,6 @@ public class MaterialPlanDetailDO extends BaseDO {
|
||||
@TableField(exist = false)
|
||||
private String named;
|
||||
|
||||
private String creator;
|
||||
|
||||
}
|
@ -156,4 +156,6 @@ public class PgMasterLineDO extends BaseDO {
|
||||
@TableField(exist = false)
|
||||
private String nickName;
|
||||
|
||||
private String creator;
|
||||
|
||||
}
|
@ -200,6 +200,8 @@ public class PlanDO extends BaseDO {
|
||||
@TableField(exist = false)
|
||||
private String processDesignType;
|
||||
|
||||
private String creator;
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -31,42 +31,58 @@ public class PricequoterecordDO extends BaseDO {
|
||||
/**
|
||||
* 客户全称
|
||||
*/
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
private String clientName;
|
||||
/**
|
||||
* 客户简称
|
||||
*/
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
|
||||
private String clientNameJc;
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
|
||||
private String projectName;
|
||||
/**
|
||||
* 业务员
|
||||
*/
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
|
||||
private Long salesman;
|
||||
/**
|
||||
* 客户现状(0:潜在客户 1:已有客户)
|
||||
*/
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
|
||||
private Integer clientActuality;
|
||||
/**
|
||||
* 确定中标时间
|
||||
*/
|
||||
private LocalDateTime winTheBiddingTime;
|
||||
/**
|
||||
* 中标结果(0:中标 1:落标 2流标)
|
||||
*/
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
|
||||
private Integer winTheResult;
|
||||
/**
|
||||
* 把握(0-4 :二成-四成-六成-八成-十成)
|
||||
*/
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
|
||||
private Integer winTheGrasp;
|
||||
/**
|
||||
* 报价次数
|
||||
*/
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
private Integer baojiacishu;
|
||||
/**
|
||||
* 精整对手
|
||||
*/
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
private String jingzhengduishou;
|
||||
/**
|
||||
* 确定中标时间
|
||||
*/
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
private LocalDateTime winTheBiddingTime;
|
||||
|
||||
}
|
@ -95,7 +95,8 @@ public class ProcessDesignDO extends BaseDO {
|
||||
|
||||
@TableField(exist = false)
|
||||
private LocalDateTime blankDate;
|
||||
|
||||
@TableField(exist = false)
|
||||
private LocalDateTime startBlankDate;
|
||||
@TableField(exist = false)
|
||||
private String blankOwnerName;
|
||||
|
||||
@ -104,7 +105,8 @@ public class ProcessDesignDO extends BaseDO {
|
||||
|
||||
@TableField(exist = false)
|
||||
private LocalDateTime twoDimDate;
|
||||
|
||||
@TableField(exist = false)
|
||||
private LocalDateTime startTwoDimDate;
|
||||
@TableField(exist = false)
|
||||
private String twoDimOwnerName;
|
||||
|
||||
@ -113,7 +115,8 @@ public class ProcessDesignDO extends BaseDO {
|
||||
|
||||
@TableField(exist = false)
|
||||
private LocalDateTime threeDimDate;
|
||||
|
||||
@TableField(exist = false)
|
||||
private LocalDateTime startThreeDimDate;
|
||||
@TableField(exist = false)
|
||||
private String threeDimOwnerName;
|
||||
|
||||
|
@ -269,7 +269,8 @@ public class ProjectOrderDO extends BaseDO {
|
||||
@TableField(exist = false)
|
||||
private String projectSubName;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String unitName;
|
||||
/**
|
||||
* 变更的字段列表
|
||||
* */
|
||||
|
@ -50,7 +50,7 @@ public class StorageLogNowDO extends BaseDO {
|
||||
|
||||
private Long pnId;
|
||||
private String pnName;
|
||||
private Long sumKcMoney;
|
||||
private BigDecimal sumKcMoney;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@ -58,4 +58,6 @@ public class StorageLogNowDO extends BaseDO {
|
||||
|
||||
@TableField(exist = false)
|
||||
private Long matUnitId;
|
||||
|
||||
private String creator;
|
||||
}
|
||||
|
@ -134,6 +134,8 @@ public class TaskDispatchDO extends BaseDO {
|
||||
@TableField(exist = false)
|
||||
private Long requiredEndDate;
|
||||
|
||||
private String creator;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String craftContent;
|
||||
@TableField(exist = false)
|
||||
|
@ -51,7 +51,6 @@ public class TaskDispatchDetailDO extends BaseDO {
|
||||
/**
|
||||
* 派工数量
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer beforeAmount;
|
||||
/**
|
||||
* 工序要点
|
||||
@ -126,7 +125,8 @@ public class TaskDispatchDetailDO extends BaseDO {
|
||||
private String planCode;
|
||||
@TableField(exist = false)
|
||||
private String procdureName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String type;
|
||||
/**
|
||||
* 预计工时
|
||||
*/
|
||||
|
@ -131,6 +131,9 @@ public class ZjPgMasterLineDO extends BaseDO {
|
||||
@TableField(exist = false)
|
||||
private String nickName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String creator;
|
||||
|
||||
|
||||
|
||||
}
|
@ -71,4 +71,5 @@ public interface AttentiontodoMapper extends BaseMapperX<AttentiontodoDO> {
|
||||
|
||||
int deleteall(AttentiontodoSaveReqVO createReqVO);
|
||||
List<AttentiontodoDO> selectByIdlist(Integer id);
|
||||
List<AttentiontodoDO> getAttentiontodolistdaiban(Integer id);
|
||||
}
|
@ -64,6 +64,7 @@ public interface DeliverOrderMapper extends BaseMapperX<DeliverOrderDO> {
|
||||
|
||||
|
||||
List<DeliverOrderDO> selectPagemyn(Long id);
|
||||
List<DeliverOrderDO> selectPagemyn1();
|
||||
void showendmoney(Long id);
|
||||
|
||||
}
|
||||
|
@ -2,12 +2,19 @@ package com.chanko.yunxi.mes.module.heli.dal.mysql.master;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.master.MasterDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.DeptDO;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.*;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* 借用主 Mapper
|
||||
@ -18,21 +25,18 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.*;
|
||||
public interface MasterMapper extends BaseMapperX<MasterDO> {
|
||||
|
||||
default PageResult<MasterDO> selectPage(MasterPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<MasterDO>()
|
||||
.betweenIfPresent(MasterDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(MasterDO::getJyUser, reqVO.getJyUser())
|
||||
.eqIfPresent(MasterDO::getJyType, reqVO.getJyType())
|
||||
.eqIfPresent(MasterDO::getJyBm, reqVO.getJyBm())
|
||||
.eqIfPresent(MasterDO::getJyYt, reqVO.getJyYt())
|
||||
.eqIfPresent(MasterDO::getRem, reqVO.getRem())
|
||||
.eqIfPresent(MasterDO::getJyMaster, reqVO.getJyMaster())
|
||||
.eqIfPresent(MasterDO::getJyNum, reqVO.getJyNum())
|
||||
.eqIfPresent(MasterDO::getGhNum, reqVO.getGhNum())
|
||||
.betweenIfPresent(MasterDO::getJyTime, reqVO.getJyTime())
|
||||
.betweenIfPresent(MasterDO::getGhTime, reqVO.getGhTime())
|
||||
.eqIfPresent(MasterDO::getGhType, reqVO.getGhType())
|
||||
.orderByDesc(MasterDO::getId));
|
||||
MPJLambdaWrapper<MasterDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(MasterDO.class)
|
||||
.select("b.nickname as jyUsers,c.name as jyBms,d.name as jyMasters")
|
||||
.leftJoin(AdminUserDO.class,"b",AdminUserDO::getId,MasterDO::getJyUser)
|
||||
.leftJoin(DeptDO.class,"c",DeptDO::getId,MasterDO::getJyBm)
|
||||
.leftJoin(MaterialDO.class,"d",MaterialDO::getId,MasterDO::getJyMaster);
|
||||
query.eq(!ObjectUtil.isEmpty(reqVO.getJyYt()), MasterDO::getJyYt, reqVO.getJyYt())
|
||||
.eq(!ObjectUtil.isEmpty(reqVO.getJyType()), MasterDO::getJyType, reqVO.getJyType())
|
||||
.like(!ObjectUtil.isEmpty(reqVO.getJyBm()), DeptDO::getName, reqVO.getJyBm())
|
||||
.like(!ObjectUtil.isEmpty(reqVO.getJyMaster()), MaterialDO::getName, reqVO.getJyMaster())
|
||||
.like(!ObjectUtil.isEmpty(reqVO.getJyUser()), AdminUserDO::getNickname, reqVO.getJyUser());
|
||||
return selectPage(reqVO,query);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -79,5 +79,6 @@ public interface MaterialPlanDetailMapper extends BaseMapperX<MaterialPlanDetail
|
||||
// }
|
||||
|
||||
List<MaterialPlanDetailDO> selectafterten(Long id);
|
||||
List<MaterialPlanDetailDO> selectafterten1();
|
||||
|
||||
}
|
@ -80,10 +80,15 @@ public interface PgMasterLineMapper extends BaseMapperX<PgMasterLineDO> {
|
||||
.leftJoin("(select SUM(c.amount) as amounts ,SUM(c.work_time) as workTime,c.zj_mx_id from quality_bg_master_line c group by c.zj_mx_id) d on d.zj_mx_id = t.id")
|
||||
.leftJoin(ProjectOrderSubDO.class,"pos",ProjectOrderSubDO::getId,PgMasterLineDO::getProjectSubId)
|
||||
.leftJoin(PlanDO.class,"pl",PlanDO::getProjectId,ProjectOrderSubDO::getProjectOrderId)
|
||||
.eq(PlanDO::getStatus,2)
|
||||
.orderByDesc(PlanDO::getId)
|
||||
.disableSubLogicDel();
|
||||
|
||||
.eq(PlanDO::getStatus,2)
|
||||
.disableSubLogicDel();
|
||||
if (reqVO.getPgType() == 1){
|
||||
query.orderByDesc(PgMasterLineDO::getPgNumber);
|
||||
}else{
|
||||
query.orderByAsc(PgMasterLineDO::getPgNumber);
|
||||
// query.orderByDesc(PlanDO::getId);
|
||||
}
|
||||
query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, PgMasterLineDO::getDetilUser, reqVO.getDetilUser())
|
||||
.eq(reqVO.getPgType() != null, PgMasterLineDO::getPgType, reqVO.getPgType())
|
||||
.eq(reqVO.getDispatchStatus() != null, PgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus())
|
||||
|
@ -74,5 +74,7 @@ public interface PgMasterMapper extends BaseMapperX<PgMasterDO> {
|
||||
}
|
||||
|
||||
List<PgMasterLineDO> selectgcjinsert(Long id);
|
||||
List<PgMasterLineDO> selectgcjinsert1();
|
||||
List<ZjPgMasterLineDO> selectgcjinsertzj(Long id);
|
||||
List<ZjPgMasterLineDO> selectgcjinsertzj1();
|
||||
}
|
||||
|
@ -122,5 +122,6 @@ public interface PlanMapper extends BaseMapperX<PlanDO> {
|
||||
// .orderByDesc(PlanDO::getId));
|
||||
// }
|
||||
List<PlanDO> selectfhtj(Long txrid);
|
||||
List<PlanDO> selectfhtj1();
|
||||
|
||||
}
|
@ -30,7 +30,7 @@ public interface ProcessDesignMapper extends BaseMapperX<ProcessDesignDO> {
|
||||
.select("a.plan_no as planCode","a.has_craft as hasCraft", "a.craft_start_date as craftStartDate", "a.craft_end_date as craftEndDate", "e.name as customerName")
|
||||
.select("d.code as projectCode", "d.project_name as projectName", "d.business_line as businessLine", "d.property","d.is_urgency as isUrgency")
|
||||
.select("u1.nickname as projectOwnerName", "u2.nickname as craftOwnerName")
|
||||
.select("b.blank_date as blankDate", "b.two_dim_date as twoDimDate", "b.three_dim_date as threeDimDate")
|
||||
.select("b.blank_date as blankDate","b.start_blank_date as startBlankDate", "b.two_dim_date as twoDimDate","b.start_two_dim_date as startTwoDimDate", "b.three_dim_date as threeDimDate", "b.start_three_dim_date as startThreeDimDate")
|
||||
.select("u3.nickname as blankOwnerName", "u4.nickname as twoDimOwnerName", "u5.nickname as threeDimOwnerName")
|
||||
.select("c.name as projectSubName", "b.project_sub_code as projectSubCode")
|
||||
.select("z.progress,z.blueprint_link as blueprintLink ")
|
||||
|
@ -6,6 +6,7 @@ import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderCostPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderSubDO;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.DeptDO;
|
||||
@ -79,7 +80,34 @@ public interface ProjectOrderMapper extends BaseMapperX<ProjectOrderDO> {
|
||||
;
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
|
||||
default PageResult<ProjectOrderDO> selectPageWx(ProjectOrderPageReqVO reqVO) {
|
||||
MPJLambdaWrapper<ProjectOrderDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(ProjectOrderDO.class)
|
||||
.select("u.nickname as businessManName", "d.name as businessDeptName", "e.name as customerName")
|
||||
.leftJoin(AdminUserDO.class, "u", AdminUserDO::getId, ProjectOrderDO::getBusinessMan)
|
||||
.leftJoin(DeptDO.class, "d", DeptDO::getId, ProjectOrderDO::getBusinessDeptId)
|
||||
.leftJoin(CustomerDO.class, "e", CustomerDO::getId, ProjectOrderDO::getCustomerId)
|
||||
.leftJoin(PlanDO.class,"p",PlanDO::getProjectId,ProjectOrderDO::getId)
|
||||
.eq(PlanDO::getStatus,2)
|
||||
.disableSubLogicDel()
|
||||
.orderByDesc(ProjectOrderDO::getId);
|
||||
query.like(!StringUtils.isEmpty(reqVO.getCode()), ProjectOrderDO::getCode, reqVO.getCode())
|
||||
.like(!StringUtils.isEmpty(reqVO.getCustomerName()), "e.name", reqVO.getCustomerName())
|
||||
.like(!StringUtils.isEmpty(reqVO.getBusinessManName()), "u.nickname", reqVO.getBusinessManName())
|
||||
.like(!StringUtils.isEmpty(reqVO.getProjectName()), ProjectOrderDO::getProjectName, reqVO.getProjectName())
|
||||
.like(!StringUtils.isEmpty(reqVO.getContractNo()), ProjectOrderDO::getContractNo, reqVO.getContractNo())
|
||||
.eq(reqVO.getHasPrice() != null, ProjectOrderDO::getHasPrice, reqVO.getHasPrice())
|
||||
.eq(reqVO.getOrderStatus() != null, ProjectOrderDO::getOrderStatus, reqVO.getOrderStatus())
|
||||
.eq(reqVO.getDeliveryStatus() != null, ProjectOrderDO::getDeliveryStatus, reqVO.getDeliveryStatus())
|
||||
.in(reqVO.getOrderStatusList() != null && !reqVO.getOrderStatusList().isEmpty(), ProjectOrderDO::getOrderStatus, reqVO.getOrderStatusList())
|
||||
.in(reqVO.getDeliveryStatusList() != null && !reqVO.getDeliveryStatusList().isEmpty(), ProjectOrderDO::getDeliveryStatus, reqVO.getDeliveryStatusList())
|
||||
.eq(reqVO.getIsSnapshot() != null, ProjectOrderDO::getIsSnapshot, reqVO.getIsSnapshot())
|
||||
.eq(reqVO.getHasAlter() != null, ProjectOrderDO::getHasAlter, reqVO.getHasAlter())
|
||||
.like(!StringUtils.isEmpty(reqVO.getSnapshotCode()), ProjectOrderDO::getSnapshotCode, reqVO.getSnapshotCode())
|
||||
.in(CollUtil.isNotEmpty(reqVO.getIdList()), ProjectOrderDO::getId, reqVO.getIdList())
|
||||
;
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
default ProjectOrderDO selectById(Long id) {
|
||||
MPJLambdaWrapper<ProjectOrderDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(ProjectOrderDO.class)
|
||||
|
@ -27,6 +27,7 @@ import java.util.List;
|
||||
public interface StorageLogNowMapper extends BaseMapperX<StorageLogNowDO> {
|
||||
|
||||
List<StorageLogNowDO> selectPagesmall(Long id);
|
||||
List<StorageLogNowDO> selectPagesmall1();
|
||||
List<StorageLogNowDO> selectPagesmallbyid(String id);
|
||||
default PageResult<StorageLogNowDO> selectPage(StorageLogPageReqVO reqVO) {
|
||||
MPJLambdaWrapper<StorageLogNowDO> query = new MPJLambdaWrapper<>();
|
||||
|
@ -6,7 +6,6 @@ import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailTotalVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskPlanJDBaoBiaoPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plantask.PlanTaskDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
||||
@ -37,34 +36,36 @@ import java.util.Set;
|
||||
public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetailDO> {
|
||||
|
||||
public int updateOwnerAndPostIdById(@Param("id") Long id,@Param("type") Integer type);
|
||||
default PageResult<TaskDispatchDetailDO> planBbPage(TaskPlanJDBaoBiaoPageReqVO reqVO) {
|
||||
MPJLambdaWrapper<TaskDispatchDetailDO> query = new MPJLambdaWrapper<>();
|
||||
query.select("MAX(d.code)as projectCode,MAX(d.project_name)as projectName,MAX(g.task_no) as taskNo,0 as planType," +
|
||||
" MAX(e.name) as projectSubName, MAX(c.material_name) as materialName , MAX(f.name) as procdureName ,t.work_time as workTime,t.owner," +
|
||||
"t.amount as amount ,SUM(h.work_time) as bgWorkTime,SUM(h.amount) as bgAmount, t.procedure_status as wgType ,t.end_time as endTime")
|
||||
.leftJoin(TaskDispatchDO.class,"b",TaskDispatchDO::getId,TaskDispatchDetailDO::getDispatchId)
|
||||
.leftJoin(ProcessBomDetailDO.class,"c",ProcessBomDetailDO::getId,TaskDispatchDO::getBomDetailId)
|
||||
.leftJoin(ProjectOrderDO.class,"d",ProjectOrderDO::getId,TaskDispatchDO::getProjectId)
|
||||
.leftJoin(ProjectOrderSubDO.class,"e",ProjectOrderSubDO::getId,TaskDispatchDO::getProjectSubId)
|
||||
.leftJoin(ProcedureDO.class,"f",ProcedureDO::getId,TaskDispatchDetailDO::getProcedureId)
|
||||
.leftJoin(PlanTaskDO.class,"g",PlanTaskDO::getId,TaskDispatchDO::getTaskId)
|
||||
.leftJoin(TaskReportDO.class,"h",TaskReportDO::getDispatchDetailId,TaskDispatchDetailDO::getId)
|
||||
|
||||
.groupBy("b.project_id,b.project_sub_id,b.bom_detail_id,t.procedure_id,t.owner")
|
||||
;
|
||||
query.eq(TaskDispatchDO::getDispatchType,"PRODUCTION")
|
||||
.eq(reqVO.getProjectCode() !=null,ProjectOrderDO::getCode,reqVO.getProjectCode())
|
||||
.eq(reqVO.getProjectName() !=null,ProjectOrderDO::getProjectName,reqVO.getProjectName())
|
||||
.eq(reqVO.getTaskNo()!=null,PlanTaskDO::getTaskNo,reqVO.getTaskNo())
|
||||
.eq(reqVO.getProjectSubName()!=null,ProjectOrderSubDO::getName, reqVO.getProjectSubName())
|
||||
.eq(reqVO.getMaterialName()!=null,ProcessBomDetailDO::getMaterialName, reqVO.getMaterialName())
|
||||
.eq(reqVO.getOwner()!=null,TaskDispatchDetailDO::getOwner,reqVO.getOwner())
|
||||
;
|
||||
|
||||
|
||||
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
List<TaskDispatchDetailDO> planBbPage(@Param("reqVO")TaskPlanJDBaoBiaoPageReqVO reqVO);
|
||||
List<TaskDispatchDetailDO> planBb(@Param("reqVO")TaskPlanJDBaoBiaoPageReqVO reqVO);
|
||||
// default PageResult<TaskDispatchDetailDO> planBbPage(TaskPlanJDBaoBiaoPageReqVO reqVO) {
|
||||
// MPJLambdaWrapper<TaskDispatchDetailDO> query = new MPJLambdaWrapper<>();
|
||||
// query.select("MAX(d.code)as projectCode,MAX(d.project_name)as projectName,MAX(g.task_no) as taskNo,0 as planType," +
|
||||
// " MAX(e.name) as projectSubName, MAX(c.material_name) as materialName , MAX(f.name) as procdureName ,t.work_time as workTime,t.owner," +
|
||||
// "t.amount as amount ,COALESCE(SUM(h.work_time), 0) as bgWorkTime,COALESCE(SUM(h.amount), 0) as bgAmount, t.procedure_status as wgType ,t.end_time as endTime")
|
||||
// .leftJoin(TaskDispatchDO.class,"b",TaskDispatchDO::getId,TaskDispatchDetailDO::getDispatchId)
|
||||
// .leftJoin(ProcessBomDetailDO.class,"c",ProcessBomDetailDO::getId,TaskDispatchDO::getBomDetailId)
|
||||
// .leftJoin(ProjectOrderDO.class,"d",ProjectOrderDO::getId,TaskDispatchDO::getProjectId)
|
||||
// .leftJoin(ProjectOrderSubDO.class,"e",ProjectOrderSubDO::getId,TaskDispatchDO::getProjectSubId)
|
||||
// .leftJoin(ProcedureDO.class,"f",ProcedureDO::getId,TaskDispatchDetailDO::getProcedureId)
|
||||
// .leftJoin(PlanTaskDO.class,"g",PlanTaskDO::getId,TaskDispatchDO::getTaskId)
|
||||
// .leftJoin(TaskReportDO.class,"h",TaskReportDO::getDispatchDetailId,TaskDispatchDetailDO::getId)
|
||||
//
|
||||
// .groupBy("b.project_id,b.project_sub_id,b.bom_detail_id,t.procedure_id,t.owner")
|
||||
// ;
|
||||
// query.eq(TaskDispatchDO::getDispatchType,"PRODUCTION")
|
||||
// .eq(ObjectUtil.isNotEmpty(reqVO.getProjectCode()),ProjectOrderDO::getCode,reqVO.getProjectCode())
|
||||
// .eq(reqVO.getProjectName() !=null,ProjectOrderDO::getProjectName,reqVO.getProjectName())
|
||||
// .eq(reqVO.getTaskNo()!=null,PlanTaskDO::getTaskNo,reqVO.getTaskNo())
|
||||
// .eq(reqVO.getProjectSubName()!=null,ProjectOrderSubDO::getName, reqVO.getProjectSubName())
|
||||
// .eq(reqVO.getMaterialName()!=null,ProcessBomDetailDO::getMaterialName, reqVO.getMaterialName())
|
||||
// .eq(reqVO.getOwner()!=null,TaskDispatchDetailDO::getOwner,reqVO.getOwner())
|
||||
// ;
|
||||
//
|
||||
//
|
||||
//
|
||||
// return selectPage(reqVO, query);
|
||||
// }
|
||||
default boolean judgeHasOver(Long id){
|
||||
MPJLambdaWrapper<TaskDispatchDetailDO> query = new MPJLambdaWrapper<>();
|
||||
query.eq(TaskDispatchDetailDO::getDispatchId,id)
|
||||
@ -168,7 +169,9 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
|
||||
query.orderByDesc(TaskDispatchDetailDO::getDispatchId,TaskDispatchDetailDO::getSort);
|
||||
}else {
|
||||
//未完工升序
|
||||
query.orderByAsc(TaskDispatchDetailDO::getDispatchId,TaskDispatchDetailDO::getSort)
|
||||
|
||||
query.eq(TaskDispatchDO::getDispatchStatus,2)
|
||||
.orderByAsc(TaskDispatchDetailDO::getDispatchId,TaskDispatchDetailDO::getSort)
|
||||
;
|
||||
}
|
||||
if (CollUtil.isNotEmpty(postIds)) {
|
||||
@ -483,4 +486,6 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
|
||||
// 如果未超时,返回空的 PageResult
|
||||
return PageResult.empty();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -30,7 +30,9 @@ import java.util.List;
|
||||
public interface TaskDispatchMapper extends BaseMapperX<TaskDispatchDO> {
|
||||
|
||||
List<TaskDispatchDO> getzplist(Long id);
|
||||
List<TaskDispatchDO> getzplist1();
|
||||
List<TaskDispatchDO> getsclist(Long id);
|
||||
List<TaskDispatchDO> getsclist1();
|
||||
|
||||
public int deleteDetailByIds(List<Long> ids);
|
||||
default PageResult<TaskDispatchDO> selectPage(TaskDispatchPageReqVO reqVO) {
|
||||
|
@ -5,6 +5,7 @@ import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansub.PlanSubDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
||||
@ -35,6 +36,7 @@ public interface UnqualifiedNotificationMapper extends BaseMapperX<UnqualifiedNo
|
||||
.select("u1.nickname as ownerName", "u2.nickname as creatorName", "u3.nickname as auditorName")
|
||||
.select("h.name as procedureName")
|
||||
.leftJoin(PlanSubDO.class, "b", PlanSubDO::getProjectSubId, UnqualifiedNotificationDO::getProjectSubId)
|
||||
.leftJoin(PlanDO.class,"p",PlanDO::getId,PlanSubDO::getProjectPlanId)
|
||||
.leftJoin(ProjectOrderSubDO.class, "c", ProjectOrderSubDO::getId, UnqualifiedNotificationDO::getProjectSubId)
|
||||
.leftJoin(ProjectOrderDO.class, "d", ProjectOrderDO::getId, UnqualifiedNotificationDO::getProjectId)
|
||||
.leftJoin(CustomerDO.class, "e", CustomerDO::getId, ProjectOrderDO::getCustomerId)
|
||||
@ -45,7 +47,8 @@ public interface UnqualifiedNotificationMapper extends BaseMapperX<UnqualifiedNo
|
||||
.leftJoin(AdminUserDO.class, "u2", AdminUserDO::getId, UnqualifiedNotificationDO::getCreator)
|
||||
.leftJoin(AdminUserDO.class, "u3", AdminUserDO::getId, UnqualifiedNotificationDO::getAuditor)
|
||||
.disableSubLogicDel()
|
||||
.orderByDesc(UnqualifiedNotificationDO::getId);
|
||||
.eq(PlanDO::getStatus,2)
|
||||
.orderByDesc(PlanDO::getId);
|
||||
|
||||
query.like(!StringUtils.isEmpty(reqVO.getCode()), UnqualifiedNotificationDO::getCode, reqVO.getCode())
|
||||
.eq(!StringUtils.isEmpty(reqVO.getType()), UnqualifiedNotificationDO::getType, reqVO.getType())
|
||||
|
@ -105,9 +105,14 @@ public interface ZjPgMasterLineMapper extends BaseMapperX<ZjPgMasterLineDO> {
|
||||
query.selectAll(ZjPgMasterLineDO.class)
|
||||
.select("d.amounts,d.workTime")
|
||||
.leftJoin("(select SUM(c.amount) as amounts ,SUM(c.work_time) as workTime,c.zj_mx_id from quality_zj_bg_master_line c group by c.zj_mx_id) d on d.zj_mx_id = t.id")
|
||||
.orderByAsc(ZjPgMasterLineDO::getTaskNo,ZjPgMasterLineDO::getPgNumber)
|
||||
.disableSubLogicDel();
|
||||
if(reqVO.getPgType() == 1){
|
||||
|
||||
query.orderByDesc(ZjPgMasterLineDO::getPgNumber);
|
||||
}else {
|
||||
query.orderByAsc(ZjPgMasterLineDO::getPgNumber);
|
||||
// query.orderByAsc(ZjPgMasterLineDO::getTaskNo,ZjPgMasterLineDO::getPgNumber);
|
||||
}
|
||||
query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, ZjPgMasterLineDO::getDetilUser, reqVO.getDetilUser())
|
||||
.eq(reqVO.getPgType() != null, ZjPgMasterLineDO::getPgType, reqVO.getPgType())
|
||||
.eq(reqVO.getDispatchStatus()!=null,ZjPgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus())
|
||||
|
@ -45,6 +45,7 @@ public interface AttentiontodoService {
|
||||
*/
|
||||
AttentiontodoDO getAttentiontodo(Integer id);
|
||||
List<AttentiontodoDO> getAttentiontodolist(Integer id);
|
||||
List<AttentiontodoDO> getAttentiontodolistdaiban(Integer id);
|
||||
|
||||
/**
|
||||
* 获得待办关注分页
|
||||
|
@ -96,6 +96,10 @@ public class AttentiontodoServiceImpl implements AttentiontodoService {
|
||||
public List<AttentiontodoDO> getAttentiontodolist(Integer id) {
|
||||
return attentiontodoMapper.selectByIdlist(id);
|
||||
}
|
||||
@Override
|
||||
public List<AttentiontodoDO> getAttentiontodolistdaiban(Integer id) {
|
||||
return attentiontodoMapper.getAttentiontodolistdaiban(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<AttentiontodoDO> getAttentiontodoPage(AttentiontodoPageReqVO pageReqVO) {
|
||||
|
@ -1,9 +1,12 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.bdgzsomthing;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.http.useragent.UserAgentUtil;
|
||||
import cn.hutool.system.SystemUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderDO;
|
||||
@ -27,6 +30,9 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogNowMapper
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.TaskDispatchTypeEnum;
|
||||
import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService;
|
||||
import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi;
|
||||
import com.chanko.yunxi.mes.module.system.controller.admin.user.UserController;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import com.chanko.yunxi.mes.module.system.service.user.AdminUserService;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
@ -39,6 +45,7 @@ import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@ -71,6 +78,11 @@ import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExcept
|
||||
@Service
|
||||
@Validated
|
||||
public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
||||
@Resource
|
||||
private AdminUserApi userApi;
|
||||
|
||||
@Autowired
|
||||
private AttentiontodoService attentiontodoService;
|
||||
@Resource
|
||||
private TaskDispatchDetailMapper taskDispatchDetailMapper;
|
||||
@Resource
|
||||
@ -217,6 +229,27 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
||||
// PageResult<ProcessBomDO> pageResult = processBomService.getProcessBomPagesall();
|
||||
//库存低于安全库存
|
||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(2);//查找该类型的待办和关注人 改
|
||||
// String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(2);
|
||||
if (attentiontodook1.size()<1){
|
||||
|
||||
List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall1();//查询符合条件的值
|
||||
for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("库存低于安全库存");
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname());
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodook.add(attentiontodoDO);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||
List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall(attentiontodoRespVO.getTxrid());//查询符合条件的值
|
||||
@ -267,6 +300,30 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
||||
List<AttentiontodoDO> attentiontodookddfh = attentiontodoMapper.selectByIdlist(3);//查找该类型的待办和关注人 改
|
||||
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
||||
|
||||
List<AttentiontodoDO> attentiontodook3 = attentiontodoService.getAttentiontodolistdaiban(3);
|
||||
if (attentiontodook3.size()<1){
|
||||
|
||||
List<DeliverOrderDO> pageResult = deliverOrderMapper.selectPagemyn1();//查询符合条件的值
|
||||
for (DeliverOrderDO storageLogNowDO : pageResult) {
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("订单发货满一年");
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCustomerId()).getNickname());
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodookddfh.add(attentiontodoDO);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodookddfh) {
|
||||
List<DeliverOrderDO> deliverOrderDOS = deliverOrderMapper.selectPagemyn(attentiontodoRespVO.getTxrid());
|
||||
{
|
||||
@ -315,6 +372,26 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
||||
|
||||
//生产任务派工单 到期当天逾期
|
||||
List<AttentiontodoDO> attentiontodookddfh6 = attentiontodoMapper.selectByIdlist(6);//查找该类型的待办和关注人 改
|
||||
|
||||
List<AttentiontodoDO> attentiontodook6 = attentiontodoService.getAttentiontodolistdaiban(6);//改两个数字
|
||||
if (attentiontodook6.size()<1){ //改对应
|
||||
|
||||
List<TaskDispatchDO> pageResult = taskDispatchMapper.getsclist1();//复制条件+改
|
||||
for (TaskDispatchDO storageLogNowDO : pageResult) {
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("生产任务到期"); //改内容
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodookddfh6.add(attentiontodoDO);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
||||
//查数据
|
||||
TaskDispatchPageReqVO taskDispatchPageReqVO = new TaskDispatchPageReqVO();
|
||||
@ -396,6 +473,26 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
||||
List<AttentiontodoDO> attentiontodookddfh5 = attentiontodoMapper.selectByIdlist(5);//查找该类型的待办和关注人 改
|
||||
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
||||
//查数据
|
||||
List<AttentiontodoDO> attentiontodook5 = attentiontodoService.getAttentiontodolistdaiban(5);//改两个数字
|
||||
if (attentiontodook5.size()<1){ //改对应
|
||||
|
||||
List<TaskDispatchDO> pageResult = taskDispatchMapper.getzplist1();//复制条件+改
|
||||
for (TaskDispatchDO storageLogNowDO : pageResult) {
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("装配任务到期"); //改内容
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodookddfh5.add(attentiontodoDO);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//获取今天日期
|
||||
@ -461,6 +558,32 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
||||
|
||||
//过程检查-质检 到期当天逾期
|
||||
List<AttentiontodoDO> attentiontodookddfh7 = attentiontodoMapper.selectByIdlist(7);//查找该类型的待办和关注人 改
|
||||
|
||||
|
||||
List<AttentiontodoDO> attentiontodook7 = attentiontodoService.getAttentiontodolistdaiban(7);//改两个数字
|
||||
if (attentiontodook7.size()<1){ //改对应
|
||||
|
||||
List<PgMasterLineDO> pageResult = pgMasterMapper.selectgcjinsert1();//复制条件+改
|
||||
for (PgMasterLineDO storageLogNowDO : pageResult) {
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("质检任务到期前"); //改内容
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodookddfh7.add(attentiontodoDO);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
||||
//查数据
|
||||
// TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO();
|
||||
@ -532,6 +655,28 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
||||
|
||||
//终检-质检 到期当天逾期
|
||||
List<AttentiontodoDO> attentiontodookddfh7o = attentiontodoMapper.selectByIdlist(7);//查找该类型的待办和关注人 改
|
||||
|
||||
|
||||
|
||||
List<AttentiontodoDO> attentiontodook70 = attentiontodoService.getAttentiontodolistdaiban(7);//改两个数字
|
||||
if (attentiontodook70.size()<1){ //改对应
|
||||
|
||||
List<ZjPgMasterLineDO> pageResult = pgMasterMapper.selectgcjinsertzj1();//复制条件+改
|
||||
for (ZjPgMasterLineDO storageLogNowDO : pageResult) {
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("质检任务到期前"); //改内容
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodookddfh7o.add(attentiontodoDO);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
||||
//查数据
|
||||
// TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO();
|
||||
@ -604,6 +749,27 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
||||
|
||||
//生产工艺 到期当天逾期
|
||||
List<AttentiontodoDO> attentiontodookddfh4 = attentiontodoMapper.selectByIdlist(4);//查找该类型的待办和关注人 改
|
||||
|
||||
|
||||
|
||||
List<AttentiontodoDO> attentiontodook4 = attentiontodoService.getAttentiontodolistdaiban(4);//改两个数字
|
||||
if (attentiontodook4.size()<1){ //改对应
|
||||
|
||||
List<PlanDO> pageResult = planMapper.selectfhtj1();//复制条件+改
|
||||
for (PlanDO storageLogNowDO : pageResult) {
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("设计任务到期"); //改内容
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodookddfh4.add(attentiontodoDO);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
||||
//查数据
|
||||
// TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO();
|
||||
@ -689,6 +855,28 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
||||
|
||||
//物料需求计划到期前十天 到期当天逾期
|
||||
List<AttentiontodoDO> attentiontodookddfh9 = attentiontodoMapper.selectByIdlist(9);//查找该类型的待办和关注人 改
|
||||
|
||||
List<AttentiontodoDO> attentiontodook9 = attentiontodoService.getAttentiontodolistdaiban(9);//改两个数字
|
||||
if (attentiontodook9.size()<1){ //改对应
|
||||
|
||||
List<MaterialPlanDetailDO> pageResult = materialPlanDetailMapper.selectafterten1();//复制条件+改
|
||||
for (MaterialPlanDetailDO storageLogNowDO : pageResult) {
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("《物料需求计划》的采购"); //改内容
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodookddfh9.add(attentiontodoDO);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
||||
//查数据
|
||||
// TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO();
|
||||
|
@ -1,55 +1,55 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.master;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.master.MasterDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 借用主 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface MasterService {
|
||||
|
||||
/**
|
||||
* 创建借用主
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createMaster(@Valid MasterSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新借用主
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateMaster(@Valid MasterSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除借用主
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteMaster(Integer id);
|
||||
|
||||
/**
|
||||
* 获得借用主
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 借用主
|
||||
*/
|
||||
MasterDO getMaster(Integer id);
|
||||
|
||||
/**
|
||||
* 获得借用主分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 借用主分页
|
||||
*/
|
||||
PageResult<MasterDO> getMasterPage(MasterPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
package com.chanko.yunxi.mes.module.heli.service.master;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.master.MasterDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 借用主 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface MasterService {
|
||||
|
||||
/**
|
||||
* 创建借用主
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createMaster(@Valid MasterSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新借用主
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateMaster(@Valid MasterSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除借用主
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteMaster(Integer id);
|
||||
|
||||
/**
|
||||
* 获得借用主
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 借用主
|
||||
*/
|
||||
MasterDO getMaster(Integer id);
|
||||
|
||||
/**
|
||||
* 获得借用主分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 借用主分页
|
||||
*/
|
||||
PageResult<MasterDO> getMasterPage(MasterPageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -44,14 +44,6 @@ public class MasterServiceImpl implements MasterService {
|
||||
validateMasterExists(updateReqVO.getId());
|
||||
// 更新
|
||||
MasterDO updateObj = BeanUtils.toBean(updateReqVO, MasterDO.class);
|
||||
if(updateReqVO.getGh()==1){
|
||||
System.out.println("借用数量"+updateReqVO.getJyNum());
|
||||
System.out.println("归还数量"+updateReqVO.getGhNum());
|
||||
if(updateReqVO.getJyNum().compareTo(updateReqVO.getGhNum())==0){
|
||||
updateObj.setGhType(2);
|
||||
}
|
||||
}
|
||||
|
||||
masterMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@ -79,4 +71,4 @@ public class MasterServiceImpl implements MasterService {
|
||||
return masterMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.materialplandetail;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storagelog.vo.StorageLogPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO;
|
||||
@ -7,6 +8,8 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplan.MaterialPlan
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplan.MaterialPlanMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService;
|
||||
import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
@ -33,6 +36,11 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
||||
@Service
|
||||
@Validated
|
||||
public class MaterialPlanDetailServiceImpl implements MaterialPlanDetailService {
|
||||
@Resource
|
||||
private AdminUserApi userApi;
|
||||
|
||||
@Autowired
|
||||
private AttentiontodoService attentiontodoService;
|
||||
@Resource
|
||||
private MaterialPlanMapper materialPlanMapper;
|
||||
@Resource
|
||||
@ -62,6 +70,21 @@ public class MaterialPlanDetailServiceImpl implements MaterialPlanDetailService
|
||||
|
||||
|
||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(8);//查找该类型的待办和关注人 改
|
||||
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(8);
|
||||
if (attentiontodook1.size()<1){
|
||||
{
|
||||
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("《物料需求计划》提交后");
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(nickname);
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodook.add(attentiontodoDO);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||
{
|
||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||
|
@ -1,18 +1,18 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.pricequoterecord;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.pricequoterecord.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.pricequoterecord.PricequoterecordDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 基础信息-报价记录 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface PricequoterecordService {
|
||||
public interface PricequoterecordService extends IService<PricequoterecordDO> {
|
||||
|
||||
/**
|
||||
* 创建基础信息-报价记录
|
||||
|
@ -1,19 +1,20 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.pricequoterecord;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.projectorder.ProjectOrderMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.pricequoterecord.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.pricequoterecord.PricequoterecordDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.pricequoterecord.PricequoterecordMapper;
|
||||
@ -28,7 +29,7 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class PricequoterecordServiceImpl implements PricequoterecordService {
|
||||
public class PricequoterecordServiceImpl extends ServiceImpl<PricequoterecordMapper, PricequoterecordDO> implements PricequoterecordService {
|
||||
|
||||
@Resource
|
||||
private PricequoterecordMapper pricequoterecordMapper;
|
||||
@ -74,7 +75,6 @@ public class PricequoterecordServiceImpl implements PricequoterecordService {
|
||||
// 更新
|
||||
PricequoterecordDO updateObj = BeanUtils.toBean(updateReqVO, PricequoterecordDO.class);
|
||||
pricequoterecordMapper.updateById(updateObj);
|
||||
|
||||
if(updateObj.getWinTheResult()!=null && updateObj.getWinTheResult() == 0&& updateReqVO.getFlag() == 0){
|
||||
//生成启动单
|
||||
ProjectOrderDO projectOrderDO = new ProjectOrderDO();
|
||||
|
@ -12,6 +12,7 @@ import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
import com.chanko.yunxi.mes.framework.dict.core.util.DictFrameworkUtils;
|
||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
|
||||
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomImportExcelVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomSaveReqVO;
|
||||
@ -33,13 +34,16 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomDetailMap
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.shenhe.ShenheMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.ProcessBomStatusEnum;
|
||||
import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.composition.CompositionService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.material.MaterialService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.plantaskbom.PlanTaskBomService;
|
||||
import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi;
|
||||
import com.chanko.yunxi.mes.module.system.controller.admin.dict.vo.data.DictDataPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.dict.DictDataDO;
|
||||
import com.chanko.yunxi.mes.module.system.dal.mysql.dict.DictDataMapper;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -78,6 +82,11 @@ public class ProcessBomServiceImpl implements ProcessBomService {
|
||||
@Resource
|
||||
private ProcessBomMapper processBomMapper;
|
||||
@Resource
|
||||
private AdminUserApi userApi;
|
||||
|
||||
@Autowired
|
||||
private AttentiontodoService attentiontodoService;
|
||||
@Resource
|
||||
private ProcessBomDetailMapper processBomDetailMapper;
|
||||
@Resource
|
||||
private MaterialService materialService;
|
||||
@ -515,6 +524,23 @@ public class ProcessBomServiceImpl implements ProcessBomService {
|
||||
if (hasBomType4) {
|
||||
PlanDO getplanid = processBomMapper.getplanid(updateObj.getPlanId());
|
||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(13);// 改
|
||||
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(13);
|
||||
if (attentiontodook1.size()<1){
|
||||
{
|
||||
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("BOM变更审核通过后");
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(nickname);
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodook.add(attentiontodoDO);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||
{
|
||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||
@ -686,6 +712,24 @@ public class ProcessBomServiceImpl implements ProcessBomService {
|
||||
.anyMatch(bomDetail -> bomDetail.getBomType() == 4);
|
||||
if (hasBomType4) {
|
||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(14);// 改
|
||||
|
||||
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(14);
|
||||
if (attentiontodook1.size()<1){
|
||||
{
|
||||
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("BOM变更通知");
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(nickname);
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodook.add(attentiontodoDO);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||
{
|
||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||
@ -733,6 +777,24 @@ public class ProcessBomServiceImpl implements ProcessBomService {
|
||||
|
||||
if(hasBomType4){
|
||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(12);// 改
|
||||
|
||||
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(12);
|
||||
if (attentiontodook1.size()<1){
|
||||
{
|
||||
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("BOM变更审核");
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(nickname);
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodook.add(attentiontodoDO);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||
{
|
||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||
|
@ -31,8 +31,8 @@ public interface ProcessDesignService {
|
||||
*/
|
||||
Long createProcessDesign(@Valid ProcessDesignSaveReqVO createReqVO);
|
||||
|
||||
|
||||
Long updateBaoGong(Long zid, BigDecimal progress, String imageLink);
|
||||
Long updateBaoGong( ProcessDesignSaveReqSubVO processDesignSaveReqSubVO);
|
||||
Long updateBaoGong(Long zid, BigDecimal progress, String imageLink,String remark);
|
||||
|
||||
/**
|
||||
* 更新工艺设计
|
||||
|
@ -7,6 +7,7 @@ import com.chanko.yunxi.mes.framework.common.util.object.ObjectUtils;
|
||||
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignProgressPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignSaveReqSubVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignSaveReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.ZjBgMasterLinePageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processdesign.ProcessDesignDO;
|
||||
@ -51,9 +52,57 @@ public class ProcessDesignServiceImpl implements ProcessDesignService {
|
||||
public PageResult<ProcessDesignProgressDO> getProcessPage(ProcessDesignProgressPageReqVO pageReqVO) {
|
||||
return processDesignProgressMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long updateBaoGong(Long zid, BigDecimal progress, String imageLink){
|
||||
public Long updateBaoGong(ProcessDesignSaveReqSubVO reqVO){
|
||||
//先取出主ID下的所有报工百分比判断不能报工不能超过100
|
||||
ProcessDesignProgressDO processDesignProgressDOS = processDesignProgressMapper.selectSumJinDu(reqVO.getZid());
|
||||
BigDecimal value1 = reqVO.getProgress();
|
||||
BigDecimal threshold = new BigDecimal("100");
|
||||
if(processDesignProgressDOS != null){
|
||||
//相加判断是否大于100,大于时返回前端并给用户提示
|
||||
|
||||
BigDecimal value2 = processDesignProgressDOS.getProgress();
|
||||
BigDecimal sum = value1.add(value2);
|
||||
|
||||
if (value1.compareTo(threshold) > 0) {
|
||||
//大于100时不执行,并返回给用户,提示设计进度不能超过100
|
||||
throw exception(TASK_REPORT_PARAMS_ERRORJD);
|
||||
} else {
|
||||
if(processDesignProgressDOS.getProgress().compareTo(value1)>0){
|
||||
throw exception(TASK_REPORT_PARAMS_ERRORSJBG);
|
||||
}else{
|
||||
//反之插入数据库数据
|
||||
ProcessDesignProgressDO processDesignProgressDO = new ProcessDesignProgressDO();
|
||||
processDesignProgressDO.setProcessDesignId(reqVO.getZid());
|
||||
processDesignProgressDO.setProgress(reqVO.getProgress());
|
||||
processDesignProgressDO.setBlueprintLink(reqVO.getImageLink());
|
||||
if (reqVO.getRemark() != null && !reqVO.getRemark().trim().equals("")){
|
||||
processDesignProgressDO.setRemark(reqVO.getRemark());
|
||||
}
|
||||
|
||||
processDesignProgressMapper.insert(processDesignProgressDO);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(value1.compareTo(threshold) > 0){
|
||||
throw exception(TASK_REPORT_PARAMS_ERRORJD);
|
||||
}else{
|
||||
//反之插入数据库数据
|
||||
ProcessDesignProgressDO processDesignProgressDO = new ProcessDesignProgressDO();
|
||||
processDesignProgressDO.setProcessDesignId(reqVO.getZid());
|
||||
processDesignProgressDO.setProgress(reqVO.getProgress());
|
||||
processDesignProgressDO.setBlueprintLink(reqVO.getImageLink());
|
||||
processDesignProgressMapper.insert(processDesignProgressDO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public Long updateBaoGong(Long zid, BigDecimal progress, String imageLink,String remark){
|
||||
//先取出主ID下的所有报工百分比判断不能报工不能超过100
|
||||
ProcessDesignProgressDO processDesignProgressDOS = processDesignProgressMapper.selectSumJinDu(zid);
|
||||
BigDecimal value1 = progress;
|
||||
@ -76,6 +125,7 @@ public class ProcessDesignServiceImpl implements ProcessDesignService {
|
||||
processDesignProgressDO.setProcessDesignId(zid);
|
||||
processDesignProgressDO.setProgress(progress);
|
||||
processDesignProgressDO.setBlueprintLink(imageLink);
|
||||
processDesignProgressDO.setRemark(remark);
|
||||
processDesignProgressMapper.insert(processDesignProgressDO);
|
||||
}
|
||||
}
|
||||
@ -167,14 +217,17 @@ public class ProcessDesignServiceImpl implements ProcessDesignService {
|
||||
detailResult.getList().forEach(processDesign -> {
|
||||
if(ProcessDesignTypeEnum.BLUEPRINT_WORKBLANK.name().equals(processDesign.getProcessDesignType())){
|
||||
processDesignDO.setBlankDate(processDesign.getBlankDate())
|
||||
.setStartBlankDate(processDesign.getStartBlankDate())
|
||||
.setBlankOwnerName(processDesign.getBlankOwnerName())
|
||||
.setProgressBlank(processDesign.getProgress());
|
||||
}else if(ProcessDesignTypeEnum.BLUEPRINT_3D.name().equals(processDesign.getProcessDesignType())){
|
||||
processDesignDO.setThreeDimDate(processDesign.getThreeDimDate())
|
||||
.setStartThreeDimDate(processDesign.getStartThreeDimDate())
|
||||
.setThreeDimOwnerName(processDesign.getThreeDimOwnerName())
|
||||
.setProgress3d(processDesign.getProgress());
|
||||
}else if(ProcessDesignTypeEnum.BLUEPRINT_2D.name().equals(processDesign.getProcessDesignType())){
|
||||
processDesignDO.setTwoDimDate(processDesign.getTwoDimDate())
|
||||
.setStartTwoDimDate(processDesign.getStartTwoDimDate())
|
||||
.setTwoDimOwnerName(processDesign.getTwoDimOwnerName())
|
||||
.setProgress2d(processDesign.getProgress());
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ public interface ProjectOrderService {
|
||||
* @return 项目订单分页
|
||||
*/
|
||||
PageResult<ProjectOrderDO> getProjectOrderPage(ProjectOrderPageReqVO pageReqVO);
|
||||
PageResult<ProjectOrderDO> getProjectOrderPageWx(ProjectOrderPageReqVO pageReqVO);
|
||||
PageResult<ProjectOrderDO> getProjectOrderCostPage(ProjectOrderCostPageReqVO pageReqVO);
|
||||
|
||||
ProjectOrderDO getProjectOrderCost(Long id,Long projectSubId);
|
||||
|
@ -367,7 +367,10 @@ public class ProjectOrderServiceImpl implements ProjectOrderService {
|
||||
return projectOrderMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PageResult<ProjectOrderDO> getProjectOrderPageWx(ProjectOrderPageReqVO pageReqVO) {
|
||||
return projectOrderMapper.selectPageWx(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ProjectOrderDO> getProjectOrderCostPage(ProjectOrderCostPageReqVO pageReqVO) {
|
||||
@ -441,32 +444,41 @@ public class ProjectOrderServiceImpl implements ProjectOrderService {
|
||||
createProjectOrder(operateReqVO);
|
||||
if(operateReqVO.getHasPrice().equals(1)&&(operateReqVO.getPrice()==null)){
|
||||
//订单有价格但是没录价格
|
||||
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||
|
||||
|
||||
|
||||
List<AttentiontodoDO> attentiontodook = attentiontodoService.getAttentiontodolist(1);//查找该类型的待办和关注人 改
|
||||
AttentiontodoDO attentiontodoDO = attentiontodook.get(0);
|
||||
boolean containsAaa = attentiontodook.stream()
|
||||
.anyMatch(item -> nickname.equals(item.getAttr4()));
|
||||
if (!containsAaa){
|
||||
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(1);
|
||||
if (attentiontodook1.size()<1){
|
||||
{
|
||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||
bdgzsomthingDO BdgzsomthingDO = new bdgzsomthingDO();
|
||||
BdgzsomthingDO.setThingname(attentiontodoDO.getEvent());//事件名称
|
||||
BdgzsomthingDO.setThings(operateReqVO.getProjectName()+operateReqVO.getContractNo()+"价格没有录入系统");//事件名称
|
||||
BdgzsomthingDO.setAttr2(operateReqVO.getCode());//因为不用跳转所以为null
|
||||
// BdgzsomthingDO.setClicktime(attentiontodoRespVO.getRemindtime());//提醒周期
|
||||
// BdgzsomthingDO.setShowname(new Date());比较创建时间,不用单独填写
|
||||
BdgzsomthingDO.setDborgz("待办");
|
||||
BdgzsomthingDO.setClick(nickname);//提醒人
|
||||
BdgzsomthingDO.setLevel("紧急");
|
||||
// BdgzsomthingDO.setClick(attentiontodoRespVO.getRemindman());//提醒人
|
||||
BdgzsomthingDO.setYesorno("0");//是否点击
|
||||
BdgzsomthingDO.setAttr4("0");//是否已处理
|
||||
|
||||
BdgzsomthingDO.setAttr3(operateReqVO.getId().toString());//获取数据当前表的id
|
||||
// BdgzsomthingDO.setShowname(operateReqVO.getCreateTime());//获取数据当前表的创建事件 改
|
||||
bdgzsomthingMapper.insert(BdgzsomthingDO);
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("订单有价格");
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(nickname);
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodook.add(attentiontodoDO);
|
||||
|
||||
|
||||
|
||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||
// bdgzsomthingDO BdgzsomthingDO = new bdgzsomthingDO();
|
||||
// BdgzsomthingDO.setThingname("订单有价格");//事件名称
|
||||
// BdgzsomthingDO.setThings(operateReqVO.getProjectName()+operateReqVO.getContractNo()+"价格没有录入系统");//事件名称
|
||||
// BdgzsomthingDO.setAttr2(operateReqVO.getCode());//因为不用跳转所以为null
|
||||
//// BdgzsomthingDO.setClicktime(attentiontodoRespVO.getRemindtime());//提醒周期
|
||||
//// BdgzsomthingDO.setShowname(new Date());比较创建时间,不用单独填写
|
||||
// BdgzsomthingDO.setDborgz("待办");
|
||||
// BdgzsomthingDO.setClick(nickname);//提醒人
|
||||
// BdgzsomthingDO.setLevel("紧急");
|
||||
//// BdgzsomthingDO.setClick(attentiontodoRespVO.getRemindman());//提醒人
|
||||
// BdgzsomthingDO.setYesorno("0");//是否点击
|
||||
// BdgzsomthingDO.setAttr4("0");//是否已处理
|
||||
//
|
||||
// BdgzsomthingDO.setAttr3(operateReqVO.getId().toString());//获取数据当前表的id
|
||||
//// BdgzsomthingDO.setShowname(operateReqVO.getCreateTime());//获取数据当前表的创建事件 改
|
||||
// bdgzsomthingMapper.insert(BdgzsomthingDO);
|
||||
|
||||
|
||||
|
||||
|
@ -2,6 +2,7 @@ package com.chanko.yunxi.mes.module.heli.service.purchaseorder;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.chanko.yunxi.mes.framework.security.core.LoginUser;
|
||||
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.orderyf.vo.OrderYfSaveReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.plan.vo.PlanPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO;
|
||||
@ -14,9 +15,12 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMap
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.shenhe.ShenheMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.supplier.SupplierMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.orderyf.OrderYfService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
||||
import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -47,6 +51,12 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
||||
@Service
|
||||
@Validated
|
||||
public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
||||
|
||||
@Resource
|
||||
private AdminUserApi userApi;
|
||||
|
||||
@Autowired
|
||||
private AttentiontodoService attentiontodoService;
|
||||
@Resource
|
||||
private com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper bdgzsomthingMapper;
|
||||
@Resource
|
||||
@ -141,6 +151,25 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
||||
bdgzsomthingMapper.updateokone(abc);
|
||||
//采购订单收货完成
|
||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(10);//查找该类型的待办和关注人 改
|
||||
|
||||
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(10);
|
||||
if (attentiontodook1.size()<1){
|
||||
{
|
||||
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("《采购订单》到货时通知检验");
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(nickname);
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodook.add(attentiontodoDO);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||
{
|
||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||
|
@ -97,6 +97,7 @@ public class StorageLogServiceImpl implements StorageLogService {
|
||||
|
||||
@Override
|
||||
public PageResult<StorageLogNowDO> getStorageNowPage(StorageLogPageReqVO pageReqVO) {
|
||||
PageResult<StorageLogNowDO> storageLogNowDOPageResult = storageLogNowMapper.selectPage(pageReqVO);
|
||||
|
||||
return storageLogNowMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
@ -3,16 +3,12 @@ package com.chanko.yunxi.mes.module.heli.service.taskdispatch;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.chanko.yunxi.mes.framework.common.exception.ErrorCode;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomImportExcelVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipManufactureDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuserdetail.FpUserDetailDO;
|
||||
@ -22,10 +18,8 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatch
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskreport.TaskReportDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.equipmanufacture.EquipManufactureMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.fpuser.FpUserMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.fpuserdetail.FpUserDetailMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.plan.PlanMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.plansub.PlanSubMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.projectorder.ProjectOrderSubMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchMapper;
|
||||
@ -34,21 +28,15 @@ import com.chanko.yunxi.mes.module.heli.enums.*;
|
||||
import com.chanko.yunxi.mes.module.heli.manager.CrossOrderManager;
|
||||
import com.chanko.yunxi.mes.module.heli.service.pgmaster.PgMasterService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.zjbgmasterline.ZjBgMasterLineService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.zjpgmaster.ZjPgMasterService;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import com.chanko.yunxi.mes.module.system.service.user.AdminUserService;
|
||||
import org.apache.commons.lang3.SerializationUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Isolation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.SimpleDateFormat;
|
||||
@ -127,7 +115,6 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
||||
throw exception(PROCESS_BOM_DETAIL_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
// 更新
|
||||
TaskDispatchDO updateObj = BeanUtils.toBean(updateReqVO, TaskDispatchDO.class);
|
||||
if(!updateObj.canOperate(operateTypeEnum)){
|
||||
@ -136,11 +123,9 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
||||
// 明细工序状态更新
|
||||
if(operateTypeEnum == OperateTypeEnum.SUBMIT){
|
||||
updateReqVO.getTaskDispatchDetails().forEach(taskDispatchDetailDO -> {
|
||||
if(taskDispatchDetailDO.getProcedureStatus().intValue() == 0 ||
|
||||
(taskDispatchDetailDO.getBeforeAmount()!=null && taskDispatchDetailDO.getAmount()!=null && taskDispatchDetailDO.getAmount() != taskDispatchDetailDO.getBeforeAmount())
|
||||
|| (taskDispatchDetailDO.getBeforeAmount() == null && taskDispatchDetailDO.getAmount() != null)
|
||||
|| (taskDispatchDetailDO.getBeforeAmount() != null && taskDispatchDetailDO.getAmount() == null)
|
||||
if(taskDispatchDetailDO.getProcedureStatus().intValue() == 0||taskDispatchDetailDO.getBeforeAmount()!=taskDispatchDetailDO.getAmount()
|
||||
){
|
||||
taskDispatchDetailDO.setBeforeAmount(taskDispatchDetailDO.getAmount());
|
||||
taskDispatchDetailDO.setProcedureStatus(TaskDispatchProcedureStatusEnum.SUBMITTED.getCode());
|
||||
}
|
||||
});
|
||||
@ -155,12 +140,15 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
||||
taskDispatchDetailDO.setProcedureStatus(TaskDispatchProcedureStatusEnum.DEFAULT.getCode());
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
updateObj.setDispatchStatus(TaskDispatchStatusEnum.valueOf(updateReqVO.getActive()).getCode());
|
||||
taskDispatchMapper.updateById(updateObj);
|
||||
// 更新子表
|
||||
updateTaskDispatchDetailList(updateReqVO.getId(), updateReqVO.getTaskDispatchDetails());
|
||||
if(operateTypeEnum != OperateTypeEnum.CANCEL_SUBMIT){
|
||||
updateTaskDispatchDetailList(updateReqVO.getId(), updateReqVO.getTaskDispatchDetails());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -221,7 +209,11 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
||||
|
||||
@Override
|
||||
public PageResult<TaskDispatchDetailDO> planBbPage(TaskPlanJDBaoBiaoPageReqVO pageReqVO) {
|
||||
PageResult<TaskDispatchDetailDO> taskDispatchDOPageResult = taskDispatchDetailMapper.planBbPage(pageReqVO);
|
||||
pageReqVO.setPageNo((pageReqVO.getPageNo()-1)*pageReqVO.getPageSize());
|
||||
List<TaskDispatchDetailDO> taskDispatchDOList = taskDispatchDetailMapper.planBb(pageReqVO);
|
||||
List<TaskDispatchDetailDO> taskDispatchDOList1 = taskDispatchDetailMapper.planBbPage(pageReqVO);
|
||||
int totalPage = new BigDecimal(taskDispatchDOList.size()).divide(new BigDecimal(pageReqVO.getPageSize()), 0, RoundingMode.CEILING).intValue();
|
||||
PageResult<TaskDispatchDetailDO> taskDispatchDOPageResult = new PageResult<>(taskDispatchDOList1, Long.parseLong(String.valueOf(taskDispatchDOList.size())), totalPage);
|
||||
return taskDispatchDOPageResult;
|
||||
}
|
||||
@Override
|
||||
@ -317,10 +309,6 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
||||
List<TaskDispatchDetailDO> taskDispatchDetailDOS = taskDispatchDetailMapper.selectListByDispatchId(dispatchId);
|
||||
for (TaskDispatchDetailDO taskDispatchDetailDO : taskDispatchDetailDOS) {
|
||||
taskDispatchDetailDO.setBeginProduce(taskReportMapper.hasReport(taskDispatchDetailDO.getId())) ;
|
||||
if (taskDispatchDetailDO.getAmount()!=null){
|
||||
|
||||
taskDispatchDetailDO.setBeforeAmount(taskDispatchDetailDO.getAmount());
|
||||
}
|
||||
}
|
||||
return taskDispatchDetailDOS;
|
||||
}
|
||||
@ -357,31 +345,6 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
||||
postIds.add(fpUserDetailDO.getPostId());
|
||||
}
|
||||
PageResult<TaskDispatchDetailDO> taskDispatchDetailDOPageResult = taskDispatchDetailMapper.selectPageWx(pageReqVO, postIds);
|
||||
// List<TaskDispatchDetailDO> list = taskDispatchDetailDOPageResult.getList();
|
||||
// List<TaskDispatchDetailDO> afterList = new ArrayList<>();
|
||||
// if (CollUtil.isNotEmpty(list)){
|
||||
// Map<String, List<TaskDispatchDetailDO>> collect ;
|
||||
// if(pageReqVO.getProcedureStatusList().size()==1 && pageReqVO.getProcedureStatusList().get(0)==2){
|
||||
// collect = list.stream()
|
||||
// .collect(Collectors.groupingBy(
|
||||
// TaskDispatchDetailDO::getDispatchCode,
|
||||
// () -> new TreeMap<>(Comparator.reverseOrder()),
|
||||
// Collectors.toList()
|
||||
// ));
|
||||
//
|
||||
// }else {
|
||||
// collect = list.stream()
|
||||
// .collect(Collectors.groupingBy(
|
||||
// TaskDispatchDetailDO::getDispatchCode,
|
||||
// TreeMap::new,
|
||||
// Collectors.toList()
|
||||
// ));
|
||||
// }
|
||||
// collect.forEach((code,list2)->{
|
||||
// afterList.addAll(list2);
|
||||
// });
|
||||
// }
|
||||
// taskDispatchDetailDOPageResult.setList(afterList);
|
||||
return taskDispatchDetailDOPageResult;
|
||||
}
|
||||
@Override
|
||||
@ -451,12 +414,15 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
||||
}
|
||||
|
||||
// 不能超额报工
|
||||
if(operate == TaskReportOperateEnum.SUBMIT){
|
||||
if(operate==TaskReportOperateEnum.START || operate == TaskReportOperateEnum.SUBMIT){
|
||||
List<TaskReportDO> historyReportList = taskReportMapper.selectList(new LambdaQueryWrapper<TaskReportDO>() {{
|
||||
eq(TaskReportDO::getDispatchDetailId, taskDispatchDetailDO.getId())
|
||||
.ne(TaskReportDO::getAmount, 0);
|
||||
}});
|
||||
int historyReportAmount = historyReportList.stream().mapToInt(TaskReportDO::getAmount).sum();
|
||||
if (taskDispatchDetailDO.getAmount() <= historyReportAmount){
|
||||
throw exception(TASK_DISPATCH_TASK_IS_OVER);
|
||||
}
|
||||
if(taskDispatchDetailDO.getAmount() < (historyReportAmount + operateReqVO.getAmount())){
|
||||
throw exception(TASK_DISPATCH_TASK_REPORT_AMOUNT_EXCESS);
|
||||
}
|
||||
@ -652,6 +618,9 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
||||
taskDispatchDetailMapper.updateBatch(updateList);
|
||||
}
|
||||
if(!insertList.isEmpty()) {
|
||||
for (TaskDispatchDetailDO taskDispatchDetailDO : insertList) {
|
||||
taskDispatchDetailDO.setBeforeAmount(taskDispatchDetailDO.getAmount());
|
||||
}
|
||||
taskDispatchDetailMapper.insertBatch(insertList);
|
||||
//如果插入不为空区分是按人还是按岗位
|
||||
// Map<Long, List<TaskDispatchDetailDO>> groupedByType = insertList.stream().collect(Collectors.groupingBy(vo -> vo.getDispatchType() == null ? 0: vo.getDispatchType()));
|
||||
|
@ -17,8 +17,11 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.unqualifiednotification.Unqual
|
||||
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.CodeEnum;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.UnqualifiedNotificationStatusEnum;
|
||||
import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.unqualifiednotificationfile.UnqualifiedNotificationFileService;
|
||||
import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -42,6 +45,11 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.UNQUALIF
|
||||
@Service
|
||||
@Validated
|
||||
public class UnqualifiedNotificationServiceImpl implements UnqualifiedNotificationService {
|
||||
@Resource
|
||||
private AdminUserApi userApi;
|
||||
|
||||
@Autowired
|
||||
private AttentiontodoService attentiontodoService;
|
||||
@Resource
|
||||
private com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper bdgzsomthingMapper;
|
||||
@Resource
|
||||
@ -69,6 +77,24 @@ public class UnqualifiedNotificationServiceImpl implements UnqualifiedNotificati
|
||||
//质检通知单预警
|
||||
{
|
||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(15);// 改
|
||||
|
||||
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(15);
|
||||
if (attentiontodook1.size()<1){
|
||||
{
|
||||
|
||||
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||
attentiontodoDO.setEvent("质检通知单");
|
||||
attentiontodoDO.setAttr5("1");
|
||||
attentiontodoDO.setAttr4(nickname);
|
||||
attentiontodoDO.setLevel("1");
|
||||
attentiontodook.add(attentiontodoDO);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||
{
|
||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||
|
@ -12,6 +12,8 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.plan.PlanMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.zjbgmasterline.ZjBgMasterLineMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.TaskDispatchTypeEnum;
|
||||
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import com.chanko.yunxi.mes.module.system.dal.mysql.user.AdminUserMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -57,11 +59,15 @@ public class ZjPgMasterServiceImpl implements ZjPgMasterService {
|
||||
|
||||
@Resource
|
||||
private MouldTypeMapper mouldTypeMapper;
|
||||
|
||||
@Resource
|
||||
private AdminUserMapper adminUserMapper;
|
||||
|
||||
@Override
|
||||
public ZjPgMasterLineDO getLine(Integer id) {
|
||||
return zjPgMasterLineMapper.selectById(id);
|
||||
ZjPgMasterLineDO zjPgMasterLineDO = zjPgMasterLineMapper.selectById(id);
|
||||
AdminUserDO adminUserDO = adminUserMapper.selectById(zjPgMasterLineDO.getDetilUser());
|
||||
zjPgMasterLineDO.setNickName(adminUserDO.getNickname());
|
||||
return zjPgMasterLineDO;
|
||||
}
|
||||
@Override
|
||||
public ZjPgMasterLineDO getTaskDispatchDetail(ZjPgMasterLinePageReqVO pageReqVO){
|
||||
|
@ -26,5 +26,16 @@ FROM db_attentiontodo a
|
||||
WHERE a.attr2 = #{param1}
|
||||
|
||||
</select>
|
||||
<select id="getAttentiontodolistdaiban"
|
||||
parameterType="Integer"
|
||||
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO">
|
||||
|
||||
|
||||
SELECT a.*, b.tenant_id as txrid
|
||||
FROM db_attentiontodo a
|
||||
INNER JOIN system_users b ON a.attr4 = b.nickname
|
||||
WHERE a.attr2 = #{param1} and a.attr5='1'
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -40,6 +40,35 @@
|
||||
t.id ORDER BY t.id DESC
|
||||
|
||||
|
||||
</select>
|
||||
<select id="selectPagemyn1"
|
||||
parameterType="Long"
|
||||
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderDO">
|
||||
SELECT t.id, t.code, t.sale_order_ids,
|
||||
t.customer_id, t.deliver_date,
|
||||
t.deliver_status, t.deliver_person,
|
||||
t.deliver_person_mobile, t.deliver_mode,
|
||||
t.receive_person_mobile, t.transport_driver_name,
|
||||
t.transport_driver_mobile, t.transport_bus_number,
|
||||
t.transport_weight, t.transport_size, t.transport_freight_cost,
|
||||
t.remark, t.status, t.receive_person_name, t.receive_address,
|
||||
t.create_time, t.update_time, t.creator, t.updater, t.deleted,
|
||||
u.nickname AS deliverPersonName, e.name AS customerName,
|
||||
GROUP_CONCAT(DISTINCT p.code) AS saleOrderCode,
|
||||
GROUP_CONCAT(p.project_name) AS projectName,
|
||||
GROUP_CONCAT(p.contract_no) AS contractNo,
|
||||
GROUP_CONCAT(p.property) AS property FROM
|
||||
project_deliver_order t LEFT JOIN project_sale_order p
|
||||
ON FIND_IN_SET(p.id, t.sale_order_ids) AND p.tenant_id = 1
|
||||
LEFT JOIN system_users u ON (u.id = t.deliver_person) AND u.tenant_id = 1
|
||||
LEFT JOIN base_customer e ON (e.id = t.customer_id) AND e.tenant_id = 1
|
||||
WHERE t.deleted = 0 AND (t.deliver_status = 2) AND t.tenant_id = 1
|
||||
and DATE_ADD(t.deliver_date, INTERVAL 1 YEAR) < CURDATE()
|
||||
and t.show_zbmoney is null and t.deliver_status in('2')
|
||||
GROUP by
|
||||
t.id ORDER BY t.id DESC
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<update id="showendmoney"
|
||||
|
@ -31,5 +31,27 @@
|
||||
group by project_material_plan_no
|
||||
|
||||
</select>
|
||||
<select id="selectafterten1"
|
||||
parameterType="Long"
|
||||
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplandetail.MaterialPlanDetailDO">
|
||||
select w.*from project_purchase_order q,
|
||||
(SELECT
|
||||
b.project_material_plan_no,a.project_material_plan_id,a.creator
|
||||
FROM
|
||||
project_material_plan_detail a
|
||||
JOIN
|
||||
project_material_plan b ON a.project_material_plan_id = b.id
|
||||
JOIN
|
||||
base_material bm ON a.material_id = bm.id
|
||||
WHERE
|
||||
b.status = '3'
|
||||
AND CURDATE() >= DATE_SUB(a.require_arrive_time, INTERVAL 10 DAY)
|
||||
|
||||
) w
|
||||
where q.project_material_plan_id =w.project_material_plan_id
|
||||
and q.receiving_status !='3'
|
||||
group by project_material_plan_no
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -31,6 +31,29 @@ FROM quality_bg_master_line
|
||||
WHERE zj_mx_id = b.zj_mx_id
|
||||
GROUP BY zj_mx_id
|
||||
)
|
||||
)
|
||||
|
||||
</select>
|
||||
<select id="selectgcjinsert1"
|
||||
parameterType="Long"
|
||||
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.pgmaster.PgMasterLineDO">
|
||||
SELECT a.*
|
||||
FROM quality_pg_master_line a
|
||||
WHERE ent_time <= DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||
|
||||
and deleted !='1'
|
||||
AND pg_type = '0'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM quality_bg_master_line b
|
||||
WHERE b.zj_mx_id = a.id
|
||||
AND b.zj_mx_id IS NOT NULL
|
||||
AND a.amount <= (
|
||||
SELECT SUM(amount)
|
||||
FROM quality_bg_master_line
|
||||
WHERE zj_mx_id = b.zj_mx_id
|
||||
GROUP BY zj_mx_id
|
||||
)
|
||||
)
|
||||
|
||||
</select>
|
||||
@ -60,5 +83,32 @@ GROUP BY zj_mx_id
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
<select id="selectgcjinsertzj1"
|
||||
parameterType="Long"
|
||||
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.zjpgmaster.ZjPgMasterLineDO">
|
||||
|
||||
SELECT a.*
|
||||
FROM quality_zj_pg_master_line a
|
||||
WHERE ent_time <= DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||
|
||||
and deleted !='1'
|
||||
AND pg_type = '0'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM quality_zj_bg_master_line b
|
||||
WHERE b.zj_mx_id = a.id
|
||||
AND b.zj_mx_id IS NOT NULL
|
||||
AND a.amount <= (
|
||||
SELECT SUM(amount)
|
||||
FROM quality_zj_bg_master_line
|
||||
WHERE zj_mx_id = b.zj_mx_id
|
||||
GROUP BY zj_mx_id
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
</mapper>
|
@ -155,5 +155,151 @@
|
||||
where a.progress not like '%100%'
|
||||
|
||||
</select>
|
||||
<select id="selectfhtj1"
|
||||
parameterType="Long"
|
||||
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO">
|
||||
|
||||
select a.* from (
|
||||
SELECT
|
||||
b.*,
|
||||
COALESCE(a.progress, '0') AS progress
|
||||
FROM (
|
||||
SELECT
|
||||
d.id,
|
||||
d.creator,
|
||||
d.project_id,
|
||||
d.project_sub_id,
|
||||
c.plan_no AS project_sub_code,
|
||||
d.process_design_type,
|
||||
c.blank_date AS change_end_time
|
||||
FROM
|
||||
pro_process_design d
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
x.*,
|
||||
y.plan_no
|
||||
FROM (
|
||||
SELECT * FROM project_plan_sub pps WHERE blank_date IS NOT NULL
|
||||
AND blank_date<= DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||
) x
|
||||
JOIN project_plan y ON x.project_plan_id = y.id
|
||||
) c ON c.project_plan_id = d.plan_id AND c.project_sub_id = d.project_sub_id
|
||||
WHERE
|
||||
d.process_design_type = 'BLUEPRINT_WORKBLANK'
|
||||
AND d.status = '1'
|
||||
GROUP BY
|
||||
d.project_id,
|
||||
d.creator,
|
||||
d.project_sub_id,
|
||||
c.project_sub_code,
|
||||
d.process_design_type,
|
||||
c.blank_date
|
||||
) b
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
process_design_id,
|
||||
progress,
|
||||
ROW_NUMBER() OVER (PARTITION BY process_design_id ORDER BY progress DESC) AS rn
|
||||
FROM
|
||||
pro_process_design_progress
|
||||
) a ON a.process_design_id = b.id AND a.rn = 1
|
||||
) a
|
||||
where a.progress not like '%100%'
|
||||
union all
|
||||
select a.* from (
|
||||
SELECT
|
||||
b.*,
|
||||
COALESCE(a.progress, '0') AS progress
|
||||
FROM (
|
||||
SELECT
|
||||
d.id,
|
||||
d.creator,
|
||||
d.project_id,
|
||||
d.project_sub_id,
|
||||
c.plan_no AS project_sub_code,
|
||||
d.process_design_type,
|
||||
c.three_dim_date AS change_end_time
|
||||
FROM
|
||||
pro_process_design d
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
x.*,
|
||||
y.plan_no
|
||||
FROM (
|
||||
SELECT * FROM project_plan_sub pps WHERE three_dim_date IS NOT NULL
|
||||
AND three_dim_date<= DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||
) x
|
||||
JOIN project_plan y ON x.project_plan_id = y.id
|
||||
) c ON c.project_plan_id = d.plan_id AND c.project_sub_id = d.project_sub_id
|
||||
WHERE
|
||||
d.process_design_type = 'BLUEPRINT_3D'
|
||||
AND d.status = '1'
|
||||
GROUP BY
|
||||
d.project_id,
|
||||
d.creator,
|
||||
d.project_sub_id,
|
||||
c.project_sub_code,
|
||||
d.process_design_type,
|
||||
c.three_dim_date
|
||||
) b
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
process_design_id,
|
||||
progress,
|
||||
ROW_NUMBER() OVER (PARTITION BY process_design_id ORDER BY progress DESC) AS rn
|
||||
FROM
|
||||
pro_process_design_progress
|
||||
) a ON a.process_design_id = b.id AND a.rn = 1
|
||||
) a
|
||||
where a.progress not like '%100%'
|
||||
union all
|
||||
select a.* from (
|
||||
SELECT
|
||||
b.*,
|
||||
COALESCE(a.progress, '0') AS progress
|
||||
FROM (
|
||||
SELECT
|
||||
d.id,
|
||||
d.creator,
|
||||
d.project_id,
|
||||
d.project_sub_id,
|
||||
c.plan_no AS project_sub_code,
|
||||
d.process_design_type,
|
||||
c.two_dim_date AS change_end_time
|
||||
FROM
|
||||
pro_process_design d
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
x.*,
|
||||
y.plan_no
|
||||
FROM (
|
||||
SELECT * FROM project_plan_sub pps WHERE two_dim_date IS NOT NULL
|
||||
AND two_dim_date <= DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||
) x
|
||||
JOIN project_plan y ON x.project_plan_id = y.id
|
||||
) c ON c.project_plan_id = d.plan_id AND c.project_sub_id = d.project_sub_id
|
||||
WHERE
|
||||
d.process_design_type = 'BLUEPRINT_2D'
|
||||
AND d.status = '1'
|
||||
GROUP by
|
||||
d.creator,
|
||||
d.project_id,
|
||||
d.project_sub_id,
|
||||
c.project_sub_code,
|
||||
d.process_design_type,
|
||||
c.two_dim_date
|
||||
) b
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
process_design_id,
|
||||
progress,
|
||||
ROW_NUMBER() OVER (PARTITION BY process_design_id ORDER BY progress DESC) AS rn
|
||||
FROM
|
||||
pro_process_design_progress
|
||||
) a ON a.process_design_id = b.id AND a.rn = 1
|
||||
) a
|
||||
where a.progress not like '%100%'
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -109,12 +109,13 @@
|
||||
b.mat_code id,
|
||||
b.create_time,
|
||||
b.mat_name,
|
||||
b.total_storage_ok_qty
|
||||
b.total_storage_ok_qty,
|
||||
b.creator
|
||||
FROM
|
||||
(SELECT
|
||||
mat_code,
|
||||
create_time,
|
||||
mat_name,
|
||||
mat_name,creator,
|
||||
id,
|
||||
SUM(storage_ok_qty) AS total_storage_ok_qty
|
||||
FROM
|
||||
@ -123,13 +124,45 @@
|
||||
mat_code,
|
||||
create_time,
|
||||
mat_name,
|
||||
id) b
|
||||
id,creator) b
|
||||
JOIN
|
||||
base_material a ON b.mat_code = a.code
|
||||
WHERE
|
||||
b.total_storage_ok_qty < a.inv_safe
|
||||
and a.tenant_id =#{param1}
|
||||
|
||||
</select>
|
||||
<select id="selectPagesmall1"
|
||||
parameterType="Long"
|
||||
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO">
|
||||
|
||||
|
||||
|
||||
SELECT
|
||||
b.mat_code id,
|
||||
b.create_time,
|
||||
b.mat_name,
|
||||
b.total_storage_ok_qty,
|
||||
b.creator
|
||||
FROM
|
||||
(SELECT
|
||||
mat_code,
|
||||
create_time,
|
||||
mat_name,creator,
|
||||
id,
|
||||
SUM(storage_ok_qty) AS total_storage_ok_qty
|
||||
FROM
|
||||
v_storage_material_now
|
||||
GROUP BY
|
||||
mat_code,
|
||||
create_time,
|
||||
mat_name,
|
||||
id,creator) b
|
||||
JOIN
|
||||
base_material a ON b.mat_code = a.code
|
||||
WHERE
|
||||
b.total_storage_ok_qty < a.inv_safe
|
||||
|
||||
</select>
|
||||
<select id="selectPagesmallbyid"
|
||||
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO">
|
||||
|
@ -14,4 +14,90 @@
|
||||
<if test="type == 2">post_id = null</if>
|
||||
WHERE id =#{id}
|
||||
</update>
|
||||
<select id="planBbPage" resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO">
|
||||
SELECT d.code AS projectCode,
|
||||
d.project_name AS projectName,
|
||||
g.task_no AS taskNo, 0 AS planType,
|
||||
e.name AS projectSubName,
|
||||
c.material_name AS materialName,
|
||||
f.name AS procdureName,
|
||||
t.work_time AS workTime,
|
||||
t.owner,
|
||||
b.dispatch_type as type,
|
||||
t.amount AS amount,
|
||||
COALESCE(SUM(CASE WHEN h.work_time IS NULL THEN 0 ELSE h.work_time END), 0) AS bgWorkTime,
|
||||
COALESCE(SUM(CASE WHEN h.amount IS NULL THEN 0 ELSE h.amount END), 0) AS bgAmount,
|
||||
t.procedure_status AS wgType, t.end_time AS endTime
|
||||
FROM pro_task_dispatch_detail t
|
||||
LEFT JOIN pro_task_dispatch b ON (b.id = t.dispatch_id AND b.tenant_id = 2 AND b.deleted = 0)
|
||||
LEFT JOIN pro_task_report h ON (h.dispatch_detail_id = t.id AND h.tenant_id = 2 AND h.deleted = 0)
|
||||
LEFT JOIN pro_process_bom_detail c ON (c.id = b.bom_detail_id AND c.tenant_id = 2 AND c.deleted = 0)
|
||||
LEFT JOIN project_sale_order d ON (d.id = b.project_id AND d.tenant_id = 2 AND d.deleted = 0)
|
||||
LEFT JOIN project_sale_order_sub e ON (e.id = b.project_sub_id AND e.tenant_id = 2 AND e.deleted = 0)
|
||||
LEFT JOIN base_procedure f ON (f.id = t.procedure_id AND f.tenant_id = 2 AND f.deleted = 0)
|
||||
LEFT JOIN project_plan_task g ON (g.id = b.task_id AND g.tenant_id = 2 AND g.deleted = 0)
|
||||
WHERE t.deleted = 0 AND t.tenant_id = 2
|
||||
<if test="reqVO.projectCode != null and reqVO.projectCode != ''">
|
||||
AND d.code = #{reqVO.projectCode}
|
||||
</if>
|
||||
<if test="reqVO.projectName != null and reqVO.projectName != ''">
|
||||
AND d.project_name = #{reqVO.projectName}
|
||||
</if>
|
||||
<if test="reqVO.taskNo != null and reqVO.taskNo != ''">
|
||||
AND g.task_no = #{reqVO.taskNo}
|
||||
</if>
|
||||
<if test="reqVO.projectSubName != null and reqVO.projectSubName != ''">
|
||||
AND e.name = #{reqVO.projectSubName}
|
||||
</if>
|
||||
<if test="reqVO.materialName != null and reqVO.materialName != ''">
|
||||
AND c.material_name = #{reqVO.materialName}
|
||||
</if>
|
||||
<if test="reqVO.owner != null and reqVO.owner != ''">
|
||||
AND t.owner = #{reqVO.owner}
|
||||
</if>
|
||||
GROUP BY t.id
|
||||
limit #{reqVO.pageNo},#{reqVO.pageSize}
|
||||
</select>
|
||||
<select id="planBb" resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO">
|
||||
SELECT d.code AS projectCode,
|
||||
d.project_name AS projectName,
|
||||
g.task_no AS taskNo, 0 AS planType,
|
||||
e.name AS projectSubName,
|
||||
c.material_name AS materialName,
|
||||
f.name AS procdureName,
|
||||
t.work_time AS workTime,
|
||||
t.owner,
|
||||
t.amount AS amount,
|
||||
COALESCE(SUM(CASE WHEN h.work_time IS NULL THEN 0 ELSE h.work_time END), 0) AS bgWorkTime,
|
||||
COALESCE(SUM(CASE WHEN h.amount IS NULL THEN 0 ELSE h.amount END), 0) AS bgAmount,
|
||||
t.procedure_status AS wgType, t.end_time AS endTime
|
||||
FROM pro_task_dispatch_detail t
|
||||
LEFT JOIN pro_task_dispatch b ON (b.id = t.dispatch_id AND b.tenant_id = 2 AND b.deleted = 0)
|
||||
LEFT JOIN pro_task_report h ON (h.dispatch_detail_id = t.id AND h.tenant_id = 2 AND h.deleted = 0)
|
||||
LEFT JOIN pro_process_bom_detail c ON (c.id = b.bom_detail_id AND c.tenant_id = 2 AND c.deleted = 0)
|
||||
LEFT JOIN project_sale_order d ON (d.id = b.project_id AND d.tenant_id = 2 AND d.deleted = 0)
|
||||
LEFT JOIN project_sale_order_sub e ON (e.id = b.project_sub_id AND e.tenant_id = 2 AND e.deleted = 0)
|
||||
LEFT JOIN base_procedure f ON (f.id = t.procedure_id AND f.tenant_id = 2 AND f.deleted = 0)
|
||||
LEFT JOIN project_plan_task g ON (g.id = b.task_id AND g.tenant_id = 2 AND g.deleted = 0)
|
||||
WHERE t.deleted = 0 AND t.tenant_id = 2
|
||||
<if test="reqVO.projectCode != null and reqVO.projectCode != ''">
|
||||
AND d.code = #{reqVO.projectCode}
|
||||
</if>
|
||||
<if test="reqVO.projectName != null and reqVO.projectName != ''">
|
||||
AND d.project_name = #{reqVO.projectName}
|
||||
</if>
|
||||
<if test="reqVO.taskNo != null and reqVO.taskNo != ''">
|
||||
AND g.task_no = #{reqVO.taskNo}
|
||||
</if>
|
||||
<if test="reqVO.projectSubName != null and reqVO.projectSubName != ''">
|
||||
AND e.name = #{reqVO.projectSubName}
|
||||
</if>
|
||||
<if test="reqVO.materialName != null and reqVO.materialName != ''">
|
||||
AND c.material_name = #{reqVO.materialName}
|
||||
</if>
|
||||
<if test="reqVO.owner != null and reqVO.owner != ''">
|
||||
AND t.owner = #{reqVO.owner}
|
||||
</if>
|
||||
GROUP BY t.id
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -28,6 +28,24 @@
|
||||
where d.dispatch_id =c.id and c.dispatch_type ='ASSEMBLE'
|
||||
|
||||
|
||||
</select>
|
||||
<select id="getzplist1"
|
||||
parameterType="Long"
|
||||
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
select c.code,d.end_time project_end_time from pro_task_dispatch c,(SELECT b.*, COALESCE(SUM(a.amount), 0) AS total_amount
|
||||
FROM pro_task_dispatch_detail b
|
||||
LEFT JOIN pro_task_report a ON a.dispatch_detail_id = b.id
|
||||
WHERE b.end_time <= DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||
GROUP BY b.id
|
||||
HAVING COALESCE(SUM(a.amount), 0) < b.amount) d
|
||||
where d.dispatch_id =c.id and c.dispatch_type ='ASSEMBLE'
|
||||
|
||||
|
||||
</select>
|
||||
<select id="getsclist"
|
||||
parameterType="Long"
|
||||
@ -45,6 +63,23 @@
|
||||
where d.dispatch_id =c.id and c.dispatch_type ='PRODUCTION'
|
||||
|
||||
|
||||
</select>
|
||||
<select id="getsclist1"
|
||||
parameterType="Long"
|
||||
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO">
|
||||
|
||||
|
||||
|
||||
|
||||
select c.code,d.end_time project_end_time,d.creator from pro_task_dispatch c,(SELECT b.*, COALESCE(SUM(a.amount), 0) AS total_amount
|
||||
FROM pro_task_dispatch_detail b
|
||||
LEFT JOIN pro_task_report a ON a.dispatch_detail_id = b.id
|
||||
WHERE b.end_time <= DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||
GROUP BY b.id
|
||||
HAVING COALESCE(SUM(a.amount), 0) < b.amount) d
|
||||
where d.dispatch_id =c.id and c.dispatch_type ='PRODUCTION'
|
||||
|
||||
|
||||
</select>
|
||||
<delete id="deleteDetailByIds">
|
||||
DELETE FROM pro_task_dispatch_detail WHERE dispatch_id IN
|
||||
|
@ -1,46 +1,43 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface MasterVO {
|
||||
id: number
|
||||
jyUser: string
|
||||
jyType: number
|
||||
jyBm: string
|
||||
jyYt: string
|
||||
rem: string
|
||||
jyMaster: string
|
||||
jyNum: number
|
||||
ghNum: number
|
||||
jyTime: Date
|
||||
ghTime: Date
|
||||
ghType: number
|
||||
}
|
||||
|
||||
// 查询借用主分页
|
||||
export const getMasterPage = async (params) => {
|
||||
return await request.get({ url: `/heli/master/page`, params })
|
||||
}
|
||||
|
||||
// 查询借用主详情
|
||||
export const getMaster = async (id: number) => {
|
||||
return await request.get({ url: `/heli/master/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增借用主
|
||||
export const createMaster = async (data: MasterVO) => {
|
||||
return await request.post({ url: `/heli/master/create`, data })
|
||||
}
|
||||
|
||||
// 修改借用主
|
||||
export const updateMaster = async (data: MasterVO) => {
|
||||
return await request.put({ url: `/heli/master/update`, data })
|
||||
}
|
||||
|
||||
// 删除借用主
|
||||
export const deleteMaster = async (id: number) => {
|
||||
return await request.delete({ url: `/heli/master/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出借用主 Excel
|
||||
export const exportMaster = async (params) => {
|
||||
return await request.download({ url: `/heli/master/export-excel`, params })
|
||||
}
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface MasterVO {
|
||||
id: number
|
||||
jyBm: string
|
||||
jyYt: string
|
||||
rem: string
|
||||
jyMaster: string
|
||||
jyUser: number
|
||||
jyType: number
|
||||
num: number
|
||||
jyDate:Date
|
||||
}
|
||||
|
||||
// 查询借用主分页
|
||||
export const getMasterPage = async (params) => {
|
||||
return await request.get({ url: `/heli/master/page`, params })
|
||||
}
|
||||
|
||||
// 查询借用主详情
|
||||
export const getMaster = async (id: number) => {
|
||||
return await request.get({ url: `/heli/master/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增借用主
|
||||
export const createMaster = async (data: MasterVO) => {
|
||||
return await request.post({ url: `/heli/master/create`, data })
|
||||
}
|
||||
|
||||
// 修改借用主
|
||||
export const updateMaster = async (data: MasterVO) => {
|
||||
return await request.put({ url: `/heli/master/update`, data })
|
||||
}
|
||||
|
||||
// 删除借用主
|
||||
export const deleteMaster = async (id: number) => {
|
||||
return await request.delete({ url: `/heli/master/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出借用主 Excel
|
||||
export const exportMaster = async (params) => {
|
||||
return await request.download({ url: `/heli/master/export-excel`, params })
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ export default defineComponent({
|
||||
type: Array as PropType<FormSchema[]>,
|
||||
default: () => []
|
||||
},
|
||||
// 是否需要栅格布局
|
||||
// 需要栅格布局
|
||||
// update by 芋艿:将 true 改成 false,因为项目更常用这种方式
|
||||
isCol: propTypes.bool.def(false),
|
||||
// 表单数据对象
|
||||
|
@ -266,6 +266,8 @@ export enum DICT_TYPE {
|
||||
|
||||
HELI_SHENHE='heli_shenhe',//审核类型
|
||||
PICKCAR='pickcar',//审核类型
|
||||
HELI_BORROW_TYPE='heli_borrow_type',//员工借用物料类型
|
||||
HELI_USE='heli_use',//员工借用物料用途
|
||||
|
||||
PICKMODE='pickmode',//领料模式
|
||||
DB_LEVEL='db_level',//代办级别
|
||||
|
@ -43,7 +43,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="客户现状" prop="clientActuality">
|
||||
<el-select class="!w-265px" v-model="formData.clientActuality" placeholder="下拉选择" >
|
||||
@ -54,8 +54,8 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_KEHUXIANZHUANG)" :key="dict.valu
|
||||
<!-- <el-input class="!w-265px" placeholder="客户现状" v-model="formData.clientActuality" /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="确定中标时间" prop="winTheBiddingTime">
|
||||
<el-date-picker
|
||||
@ -71,7 +71,7 @@ class="!w-265px" v-model="formData.winTheBiddingTime" type="date" value-format="
|
||||
v-for="dicts in getIntDictOptions(DICT_TYPE.HELI_BAWO)" :key="dicts.value"
|
||||
:label="dicts.label" :value="dicts.value" />
|
||||
</el-select>
|
||||
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@ -86,7 +86,7 @@ v-for="dicts in getIntDictOptions(DICT_TYPE.HELI_TOUBIAOJIEGUO)" :key="dicts.val
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card class="hl-card-info">
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">报价信息</span>
|
||||
@ -96,7 +96,7 @@ v-for="dicts in getIntDictOptions(DICT_TYPE.HELI_TOUBIAOJIEGUO)" :key="dicts.val
|
||||
<el-form-item label="报价次数" prop="baojiacishu">
|
||||
<el-input class="!w-265px" placeholder="报价次数" v-model="formData.baojiacishu" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="竞争对手" prop="jingzhengduishou">
|
||||
<el-input class="!w-265px" placeholder="竞争对手" v-model="formData.jingzhengduishou" />
|
||||
@ -212,7 +212,7 @@ const formData = ref({
|
||||
projectName: undefined,
|
||||
salesman: undefined,
|
||||
clientActuality: undefined,
|
||||
winTheBiddingTime: [],
|
||||
winTheBiddingTime: undefined,
|
||||
winTheResult: undefined,
|
||||
winTheGrasp: undefined,
|
||||
craftInfos: [],
|
||||
@ -226,7 +226,7 @@ const formData = ref({
|
||||
const formRules = reactive({
|
||||
clientName: [{ required: true, message: '客户全称不能为空', trigger: 'blur' }],
|
||||
clientNameJc: [{ required: true, message: '客户建厂不能为空', trigger: 'blur' }],
|
||||
salesman: [{ required: true, message: '业务员不能为空', trigger: 'blur' }],
|
||||
salesman: [{ required: true, message: '业务员不能为空', trigger: 'blur' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
const subFormLoading = ref(false) // 子表单的加载中
|
||||
@ -273,8 +273,8 @@ const userInit = ref()
|
||||
|
||||
/** 打开弹窗 */
|
||||
const queryData = async (type: string, id?: number) => {
|
||||
|
||||
|
||||
|
||||
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
@ -289,10 +289,10 @@ const queryData = async (type: string, id?: number) => {
|
||||
}
|
||||
|
||||
// 子项列表
|
||||
|
||||
|
||||
|
||||
|
||||
// 如为归档
|
||||
let businessType = 'PROJECT_BAOJIA'
|
||||
let businessType = 'QUOTATION_RECORD'
|
||||
if (type == 'detailArchive') {
|
||||
businessType = 'PROJECT_BAOJIA_SNAPSHOT'
|
||||
} else {
|
||||
@ -340,10 +340,13 @@ const queryData = async (type: string, id?: number) => {
|
||||
}
|
||||
|
||||
const submitForm = async (active) => {
|
||||
|
||||
|
||||
// 校验表单
|
||||
formData.value.active = active
|
||||
await formRef.value.validate()
|
||||
if (formData.value.winTheBiddingTime.length==0){
|
||||
formData.value.winTheBiddingTime=''
|
||||
}
|
||||
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
@ -581,8 +584,8 @@ const refreshAttachments = (files, type) => {
|
||||
formData.value.attachments = formData.value.attachments.filter((value, index, array) => {
|
||||
return value.businessFileType != type || value.id
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
let file = files[i]
|
||||
@ -683,9 +686,9 @@ onMounted(() => {
|
||||
if (!formData.value.businessMan) {
|
||||
formData.value.businessMan = useUserStore().getUser.id // 当前登录的编码
|
||||
}
|
||||
|
||||
|
||||
formData.value.craftInfos = []
|
||||
|
||||
|
||||
/* getIntDictOptions(DICT_TYPE.HELI_KEHUXIANZHUANG).forEach(dict =>{
|
||||
formData.value.craftInfos.push({id:dict.value,name:dict.label,startDate:'',endDate:'',owner:'',description:''})
|
||||
}) */
|
||||
|
@ -1,90 +1,115 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" :style="{width: '2000px', height: '500px'}">
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="1200">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="160px"
|
||||
label-width="180px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="借用人" prop="jyUser">
|
||||
<UserSelect v-model="formData.jyUser" @update:newValue="handleSelectedUser1" class="!w-265px"/>
|
||||
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="借用部门" prop="jyBm">
|
||||
<el-input v-model="formData.jyBm" placeholder="请输入借用部门" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="借用用途" prop="jyYt">
|
||||
<el-input v-model="formData.jyYt" placeholder="请输入借用用途" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="借用物料名称" prop="jyMaster">
|
||||
<el-input v-model="formData.jyMaster" placeholder="请输入借用物料名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="借用数量" prop="jyNum">
|
||||
<el-input v-model="formData.jyNum" placeholder="请输入借用数量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="借用时间" prop="jyTime">
|
||||
<el-date-picker
|
||||
v-model="formData.jyTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择借用时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="备注" prop="rem">
|
||||
<el-input v-model="formData.rem" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item v-if="xianshi" label="归还数量" prop="ghNum">
|
||||
<el-input v-model="formData.ghNum" placeholder="请输入归还数量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item v-if="xianshi" label="归还时间" prop="ghTime">
|
||||
<el-date-picker
|
||||
v-model="formData.ghTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择归还时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
||||
<el-form-item label="借用人" prop="jyUser">
|
||||
<!-- <el-input v-model="formData.jyUser" placeholder="请输入借用人" />-->
|
||||
<el-select v-model="formData.jyUser" placeholder="请选择借用人">
|
||||
<el-option
|
||||
v-for="user in userList"
|
||||
:key="user.id"
|
||||
:label="user.nickname"
|
||||
:value="user.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="借用部门" prop="jyBm">
|
||||
<!-- <el-input v-model="formData.jyBm" placeholder="请输入借用部门" />-->
|
||||
<!-- <el-select v-model="formData.jyUser" placeholder="请选择借用人">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="user in deptList"-->
|
||||
<!-- :key="user.id"-->
|
||||
<!-- :label="user.nickname"-->
|
||||
<!-- :value="user.id"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<BranchSelect v-model="formData.jyBm" placeholder="请选择借用部门"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="借用类型" prop="jyType">
|
||||
<el-select
|
||||
v-model="formData.jyType"
|
||||
placeholder="请选择借用类型"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.HELI_BORROW_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="用途" prop="jyYt">
|
||||
<el-select
|
||||
v-model="formData.jyYt"
|
||||
placeholder="请选择用途"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.HELI_USE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="借用日期" prop="jyDate" >
|
||||
<el-date-picker
|
||||
v-model="formData.jyDate"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择借用日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="借用物料名称" prop="jyMaster">
|
||||
<!-- <el-input v-model="formData.jyMaster" placeholder="请输入借用物料名称" />-->
|
||||
<el-select v-model="formData.jyMaster" placeholder="请选择借用物料名称">
|
||||
<el-option
|
||||
v-for="material in materialList"
|
||||
:key="material.id"
|
||||
:label="material.name"
|
||||
:value="material.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="数量" prop="num">
|
||||
<el-input-number v-model="formData.num" placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="rem">
|
||||
<el-input v-model="formData.rem" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
@ -93,50 +118,45 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import * as MasterApi from '@/api/heli/master'
|
||||
import UserSelect from '@/views/heli/hlvuestyle/userSelect.vue'
|
||||
import {DICT_TYPE, getStrDictOptions} from "@/utils/dict";
|
||||
import MaterialSelect from "@/views/heli/hlvuestyle/materialSelect.vue";
|
||||
import * as UserApi from "@/api/system/user";
|
||||
import {getSimpList} from "@/api/heli/material";
|
||||
import * as MaterialApi from "@/api/heli/material";
|
||||
import * as DeptApi from "@/api/system/dept";
|
||||
import {getSimpleDeptList} from "@/api/system/dept";
|
||||
import BranchSelect from "@/views/heli/hlvuestyle/branchSelect.vue";
|
||||
import {number} from "vue-types";
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const userList = ref<any[]>([]) // 用户列表
|
||||
const materialList = ref<any[]>([]) // 物料列表
|
||||
const deptList = ref<any[]>([]) // 部门列表
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const xianshi = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
jyUser: undefined,
|
||||
jyType: undefined,
|
||||
jyBm: undefined,
|
||||
jyYt: undefined,
|
||||
rem: undefined,
|
||||
jyMaster: undefined,
|
||||
jyNum: undefined,
|
||||
ghNum: undefined,
|
||||
jyTime: undefined,
|
||||
ghTime: undefined,
|
||||
ghType: undefined,
|
||||
gh:undefined,
|
||||
jyUser: undefined,
|
||||
jyType: undefined,
|
||||
num: undefined,
|
||||
jyDate:undefined
|
||||
})
|
||||
const formRules = reactive({
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
//项目负责人
|
||||
const handleSelectedUser1 = (newValue: any) => {
|
||||
formData.value.jyUser = newValue?.id
|
||||
}
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
if(type=='guihuan'){
|
||||
xianshi.value = true
|
||||
}else{
|
||||
xianshi.value = false
|
||||
}
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
@ -147,6 +167,9 @@ const open = async (type: string, id?: number) => {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
userList.value = await UserApi.getSimpleUserList()
|
||||
materialList.value = await MaterialApi.getSimpList()
|
||||
deptList.value = await DeptApi.getSimpleDeptList()
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
@ -163,11 +186,6 @@ const submitForm = async () => {
|
||||
await MasterApi.createMaster(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
if (formType.value === 'guihuan') {
|
||||
data.gh = 1
|
||||
}else{
|
||||
data.gh = 0
|
||||
}
|
||||
await MasterApi.updateMaster(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
@ -183,18 +201,14 @@ const submitForm = async () => {
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
jyUser: undefined,
|
||||
jyType: undefined,
|
||||
jyBm: undefined,
|
||||
jyYt: undefined,
|
||||
rem: undefined,
|
||||
jyMaster: undefined,
|
||||
jyNum: undefined,
|
||||
ghNum: undefined,
|
||||
jyTime: undefined,
|
||||
ghTime: undefined,
|
||||
ghType: undefined,
|
||||
jyUser: undefined,
|
||||
jyType: undefined,
|
||||
num: undefined
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
@ -6,25 +6,17 @@
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="160px"
|
||||
label-width="100px"
|
||||
>
|
||||
|
||||
<el-form-item label="借用人" prop="jyUser">
|
||||
<UserSelect v-model="queryParams.jyUser" @update:newValue="handleSelectedUser1" class="!w-265px"/>
|
||||
|
||||
|
||||
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="1借出2归还" prop="jyType">
|
||||
<el-select
|
||||
v-model="queryParams.jyType"
|
||||
placeholder="请选择1借出2归还"
|
||||
<el-input
|
||||
v-model="queryParams.jyUser"
|
||||
placeholder="请输入借用人"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="借用部门" prop="jyBm">
|
||||
<el-input
|
||||
v-model="queryParams.jyBm"
|
||||
@ -34,50 +26,46 @@
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="借用类型" prop="jyType">
|
||||
<el-select
|
||||
v-model="queryParams.jyType"
|
||||
placeholder="请选择借用类型"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.HELI_BORROW_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用途" prop="jyYt">
|
||||
<el-select
|
||||
v-model="queryParams.jyYt"
|
||||
placeholder="请选择用途"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.HELI_USE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="借用物料名称" prop="jyMaster">
|
||||
<el-form-item label="物料名称" prop="jyMaster">
|
||||
<el-input
|
||||
v-model="queryParams.jyMaster"
|
||||
placeholder="请输入借用物料名称"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="借用时间" prop="jyTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.jyTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="归还时间" prop="ghTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.ghTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否归还" prop="ghType">
|
||||
<el-select
|
||||
v-model="queryParams.ghType"
|
||||
placeholder="请选择是否归"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
@ -89,51 +77,57 @@
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['heli:master:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- @click="handleExport"-->
|
||||
<!-- :loading="exportLoading"-->
|
||||
<!-- v-hasPermi="['heli:master:export']"-->
|
||||
<!-- >-->
|
||||
<!-- <Icon icon="ep:download" class="mr-5px" /> 导出-->
|
||||
<!-- </el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" class="hl-table" :show-overflow-tooltip="true">
|
||||
<el-table-column v-if="false" label="主键" align="center" prop="id" />
|
||||
|
||||
<el-table-column label="借用人" align="center" prop="jyUser" >
|
||||
<template #default="scope">
|
||||
{{ userList.find((user) => user.id === scope.row.jyUser)?.nickname }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if= "false" label="1借出2归还" align="center" prop="jyType" />
|
||||
<el-table-column label="借用部门" align="center" prop="jyBm" />
|
||||
<el-table-column label="借用用途" align="center" prop="jyYt" />
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="借用人" align="center" prop="jyUsers" >
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{ userList.find((user) => user.id === scope.row.jyUser)?.nickname }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column label="借用部门" align="center" prop="jyBms" >
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{deptList.find((dept)=>dept.id==scope.row.jyBm)?.name}}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="单据日期"
|
||||
align="center"
|
||||
prop="jyDate"
|
||||
:formatter="dateFormatter1"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="借用类型" align="center" prop="jyType" >
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_BORROW_TYPE" :value="scope.row.jyType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="用途" align="center" prop="jyYt">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_USE" :value="scope.row.jyYt" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" prop="num" />
|
||||
<el-table-column label="借用物料名称" align="center" prop="jyMasters" width="180">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{materialList.find((material)=>material.id==scope.row.jyMaster)?.name}}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="rem" />
|
||||
<el-table-column label="借用物料名称" align="center" prop="jyMaster" />
|
||||
<el-table-column label="借用数量" align="center" prop="jyNum" />
|
||||
<el-table-column label="归还数量" align="center" prop="ghNum" />
|
||||
<el-table-column
|
||||
label="借用时间"
|
||||
align="center"
|
||||
prop="jyTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="归还时间"
|
||||
align="center"
|
||||
prop="ghTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="是否归还" align="center" prop="ghType" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
@ -144,16 +138,6 @@
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('guihuan', scope.row.id)"
|
||||
v-hasPermi="['heli:master:update']"
|
||||
>
|
||||
归还
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@ -179,18 +163,22 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import {dateFormatter, dateFormatter1} from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import * as MasterApi from '@/api/heli/master'
|
||||
import MasterForm from './MasterForm.vue'
|
||||
import UserSelect from '@/views/heli/hlvuestyle/userSelect.vue'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import {DICT_TYPE, getStrDictOptions} from "@/utils/dict";
|
||||
import * as UserApi from "@/api/system/user";
|
||||
import * as MaterialApi from "@/api/heli/material";
|
||||
import * as DeptApi from "@/api/system/dept";
|
||||
|
||||
defineOptions({ name: 'Master' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||
const userList = ref<any[]>([]) // 用户列表
|
||||
const materialList = ref<any[]>([]) // 物料列表
|
||||
const deptList = ref<any[]>([]) // 部门列表
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
@ -198,24 +186,16 @@ const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
createTime: [],
|
||||
jyUser: undefined,
|
||||
jyType: undefined,
|
||||
jyBm: undefined,
|
||||
jyYt: undefined,
|
||||
rem: undefined,
|
||||
jyMaster: undefined,
|
||||
jyNum: undefined,
|
||||
ghNum: undefined,
|
||||
jyTime: [],
|
||||
ghTime: [],
|
||||
ghType: undefined,
|
||||
jyUser: undefined,
|
||||
jyType: undefined,
|
||||
num: undefined
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
//项目负责人
|
||||
const handleSelectedUser1 = (newValue: any) => {
|
||||
queryParams.jyUser = newValue?.id
|
||||
}
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
@ -277,7 +257,9 @@ const handleExport = async () => {
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(async () => {
|
||||
await getList()
|
||||
getList()
|
||||
userList.value = await UserApi.getSimpleUserList()
|
||||
materialList.value = await MaterialApi.getSimpList()
|
||||
deptList.value = await DeptApi.getSimpleDeptList()
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
|
342
mes-ui/mes-ui-admin-vue3/src/views/heli/master/indexBb.vue
Normal file
342
mes-ui/mes-ui-admin-vue3/src/views/heli/master/indexBb.vue
Normal file
@ -0,0 +1,342 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="借用人" prop="jyUser">
|
||||
<el-input
|
||||
v-model="queryParams.jyUser"
|
||||
placeholder="请输入借用人"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="借用部门" prop="jyBm">
|
||||
<el-input
|
||||
v-model="queryParams.jyBm"
|
||||
placeholder="请输入借用部门"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="借用类型" prop="jyType">
|
||||
<el-select
|
||||
v-model="queryParams.jyType"
|
||||
placeholder="请选择借用类型"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.HELI_BORROW_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用途" prop="jyYt">
|
||||
<el-select
|
||||
v-model="queryParams.jyYt"
|
||||
placeholder="请选择用途"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.HELI_USE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="物料名称" prop="jyMaster">
|
||||
<el-input
|
||||
v-model="queryParams.jyMaster"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- @click="openForm('create')"-->
|
||||
<!-- v-hasPermi="['heli:master:create']"-->
|
||||
<!-- >-->
|
||||
<!-- <Icon icon="ep:plus" class="mr-5px" /> 新增-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- @click="handleExport"-->
|
||||
<!-- :loading="exportLoading"-->
|
||||
<!-- v-hasPermi="['heli:master:export']"-->
|
||||
<!-- >-->
|
||||
<!-- <Icon icon="ep:download" class="mr-5px" /> 导出-->
|
||||
<!-- </el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" show-summary :summary-method="getSummaries">
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="借用人" align="center" prop="jyUsers" >
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{ userList.find((user) => user.id === scope.row.jyUser)?.nickname }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column label="借用部门" align="center" prop="jyBms" >
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{deptList.find((dept)=>dept.id==scope.row.jyBm)?.name}}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="单据日期"
|
||||
align="center"
|
||||
prop="jyDate"
|
||||
:formatter="dateFormatter1"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="借用类型" align="center" prop="jyType" >
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_BORROW_TYPE" :value="scope.row.jyType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="用途" align="center" prop="jyYt">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_USE" :value="scope.row.jyYt" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" prop="num" />
|
||||
<el-table-column label="借出数量" align="center" prop="quantityLent" />
|
||||
<el-table-column label="借用物料名称" align="center" prop="jyMasters" width="160">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{materialList.find((material)=>material.id==scope.row.jyMaster)?.name}}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="rem" />
|
||||
<!-- <el-table-column label="操作" align="center" width="140">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- link-->
|
||||
<!-- type="primary"-->
|
||||
<!-- @click="openForm('update', scope.row.id)"-->
|
||||
<!-- v-hasPermi="['heli:master:update']"-->
|
||||
<!-- >-->
|
||||
<!-- 编辑-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- link-->
|
||||
<!-- type="danger"-->
|
||||
<!-- @click="handleDelete(scope.row.id)"-->
|
||||
<!-- v-hasPermi="['heli:master:delete']"-->
|
||||
<!-- >-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<MasterForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {dateFormatter, dateFormatter1} from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import * as MasterApi from '@/api/heli/master'
|
||||
import MasterForm from './MasterForm.vue'
|
||||
import {DICT_TYPE, getStrDictOptions} from "@/utils/dict";
|
||||
import * as UserApi from "@/api/system/user";
|
||||
import * as MaterialApi from "@/api/heli/material";
|
||||
import * as DeptApi from "@/api/system/dept";
|
||||
|
||||
defineOptions({ name: 'Master' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
const userList = ref<any[]>([]) // 用户列表
|
||||
const materialList = ref<any[]>([]) // 物料列表
|
||||
const deptList = ref<any[]>([]) // 部门列表
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
createTime: [],
|
||||
jyBm: undefined,
|
||||
jyYt: undefined,
|
||||
rem: undefined,
|
||||
jyMaster: undefined,
|
||||
jyUser: undefined,
|
||||
jyType: undefined,
|
||||
num: undefined
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await MasterApi.getMasterPage(queryParams)
|
||||
list.value = data.list
|
||||
list.value.map(item=>{
|
||||
if (item.jyType=="4"){
|
||||
item.quantityLent= Number(-Math.abs(item.num));
|
||||
}else if (item.jyType=="1"){
|
||||
item.quantityLent= Number(item.num);
|
||||
}else {
|
||||
item.quantityLent=0
|
||||
}
|
||||
})
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await MasterApi.deleteMaster(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await MasterApi.exportMaster(queryParams)
|
||||
download.excel(data, '借用主.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
const getSummaries = (param: SummaryMethodProps) => {
|
||||
const summaryField = ["quantityLent"];
|
||||
console.log(param)
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
return;
|
||||
}
|
||||
if (!summaryField.includes(column.property)) {
|
||||
sums[index] = '';
|
||||
return;
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return floatAdd(prev, curr);
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
const thousandsField = [];
|
||||
if (thousandsField.includes(column.property)) {
|
||||
sums[index] = thousandsFormat(sums[index]);
|
||||
}
|
||||
} else {
|
||||
sums[index] = '';
|
||||
}
|
||||
});
|
||||
// const sumValue = computed(() => {
|
||||
// return list.value.reduce((sum, item) => sum + item.quantityLent, 0);
|
||||
// });
|
||||
// const sums = ['合计','','','','','','','',sumValue];
|
||||
return sums;
|
||||
}
|
||||
const floatAdd = (a, b) => {
|
||||
var c, d, e;
|
||||
if (undefined === a || null === a || "" === a || isNaN(a)) { a = 0; }
|
||||
if (undefined === b || null === b || "" === b || isNaN(b)) { b = 0; }
|
||||
try {
|
||||
c = a.toString().split(".")[1].length;
|
||||
} catch (f) {
|
||||
c = 0;
|
||||
}
|
||||
try {
|
||||
d = b.toString().split(".")[1].length;
|
||||
} catch (f) {
|
||||
d = 0;
|
||||
}
|
||||
e = Math.pow(10, Math.max(c, d));
|
||||
return (floatMul(a, e) + floatMul(b, e)) / e;
|
||||
};
|
||||
const floatMul = (a, b) => {
|
||||
var c = 0,
|
||||
d = a.toString(),
|
||||
e = b.toString();
|
||||
try {
|
||||
c += d.split(".")[1].length;
|
||||
} catch (f) {}
|
||||
try {
|
||||
c += e.split(".")[1].length;
|
||||
} catch (f) {}
|
||||
return Number(d.replace(".", "")) * Number(e.replace(".", "")) / Math.pow(10, c);
|
||||
}
|
||||
/** 初始化 **/
|
||||
onMounted(async () => {
|
||||
getList()
|
||||
|
||||
userList.value = await UserApi.getSimpleUserList()
|
||||
materialList.value = await MaterialApi.getSimpList()
|
||||
deptList.value = await DeptApi.getSimpleDeptList()
|
||||
})
|
||||
</script>
|
@ -105,11 +105,9 @@ const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
if (formData.value.cgYishou<formData.value.cgYs&&formData.value.cgTypee==2){
|
||||
message.error("已收金额小于应收金额,回款未完成,请确认")
|
||||
return
|
||||
await message.confirm("已收金额小于应收金额,回款未完成,请确认")
|
||||
}else if (formData.value.cgYishou>=formData.value.cgYs&&formData.value.cgTypee==1){
|
||||
message.error("已收金额大于等于应收金额,回款已完成,请确认")
|
||||
return
|
||||
await message.confirm("已收金额大于等于应收金额,回款已完成,请确认")
|
||||
}
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
|
@ -70,7 +70,8 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="材质" prop="compositionId">
|
||||
<el-input v-model="formData.compositionId" placeholder="" />
|
||||
<!-- <el-input v-model="formData.compositionId" placeholder="" /> -->
|
||||
<CompositionSelect v-model="formData.compositionId" disabled @update:new-value="(val) => { formData.compositionId = val.id; }" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@ -80,7 +81,8 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="formData.unit" placeholder="请输入单位" />
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="formData.unit"/>
|
||||
<!-- <el-input v-model="formData.unit" placeholder="请输入单位" /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -98,7 +100,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检验人" prop="detilUser">
|
||||
<el-input v-model="formData.detilUser" placeholder="" />
|
||||
<el-input disabled v-model="formData.nickName" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@ -119,12 +121,14 @@
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="开始日期" prop="startTime">
|
||||
<el-date-picker v-model="formData.startTime" type="date" value-format="x" placeholder="" />
|
||||
<el-input v-model="formData.finalStartTime" disabled="true"/>
|
||||
<!-- <el-date-picker v-model="formData.startTime" type="date" value-format="x" placeholder="" /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="结束日期" prop="entTime">
|
||||
<el-date-picker v-model="formData.entTime" type="date" value-format="x" placeholder="选择结束日期" />
|
||||
<el-input v-model="formData.finalEndTime" disabled="true"/>
|
||||
<!-- <el-date-picker v-model="formData.entTime" type="date" value-format="x" placeholder="选择结束日期" /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@ -158,6 +162,7 @@
|
||||
<script setup lang="ts">
|
||||
import * as PgMasterApi from '@/api/heli/pgmaster'
|
||||
import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@/utils/dict'
|
||||
import CompositionSelect from '../hlvuestyle/compositionSelect.vue'
|
||||
const {
|
||||
t
|
||||
} = useI18n() // 国际化
|
||||
@ -198,12 +203,24 @@ import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@
|
||||
projectName: undefined,
|
||||
pgNumber: undefined,
|
||||
active: undefined,
|
||||
finalStartTime:'',
|
||||
finalEndTime:'',
|
||||
nickName:'',
|
||||
})
|
||||
const formRules = reactive({})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
const formatDate = (date) => {
|
||||
const d = new Date(date);
|
||||
const year = d.getFullYear();
|
||||
const month = (d.getMonth() + 1).toString().padStart(2, '0');
|
||||
const day = d.getDate().toString().padStart(2, '0');
|
||||
const hours = d.getHours().toString().padStart(2, '0');
|
||||
const minutes = d.getMinutes().toString().padStart(2, '0');
|
||||
const seconds = d.getSeconds().toString().padStart(2, '0');
|
||||
return `${year}-${month}-${day}${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id ? : number) => {
|
||||
const open = async (type: string, nickName :string,id ? : number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
@ -213,9 +230,12 @@ import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await PgMasterApi.getPgMasterLineListByZlPgIdLine(id)
|
||||
formData.value.finalStartTime = formatDate(formData.value.startTime);
|
||||
formData.value.finalEndTime = formatDate(formData.value.entTime);
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
formData.value.nickName = nickName;
|
||||
}
|
||||
}
|
||||
defineExpose({
|
||||
@ -279,6 +299,9 @@ import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@
|
||||
projectName: undefined,
|
||||
pgNumber: undefined,
|
||||
active: undefined,
|
||||
finalStartTime:'',
|
||||
finalEndTime:'',
|
||||
nickName:'',
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
@ -63,7 +63,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="检验人" prop="detilUser">
|
||||
<UserSelect v-model="queryParams.detilUser" @update:newValue="handleSelectedUser1" class="!w-265px"/>
|
||||
<UserSelect v-model="queryParams.detilUser" @update:new-value="handleSelectedUser1" class="!w-265px"/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="检验人" prop="detilUser">
|
||||
@ -158,14 +158,15 @@
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" class="hl-table" :show-overflow-tooltip="true">
|
||||
<el-table-column v-if="false" label="主键" align="center" prop="id" />
|
||||
<el-table-column v-if="false"
|
||||
<el-table-column
|
||||
v-if="false"
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="生产计划单号" align="center" prop="taskNo" width="200" />
|
||||
<el-table-column label="生产计划单号" fixed="left" align="center" prop="taskNo" width="200" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||
<el-table-column label="子项目名称" align="center" prop="projectSubName" />
|
||||
<el-table-column label="物料名称" align="center" prop="materialName" />
|
||||
@ -210,12 +211,12 @@
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<el-table-column label="操作" align="center" width="140" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
@click="openForm('update', scope.row.nickName,scope.row.id)"
|
||||
v-hasPermi="['heli:pg-master-line:update']"
|
||||
>
|
||||
查看
|
||||
@ -324,8 +325,8 @@ const resetQuery = () => {
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
const openForm = (type: string,nickName:string, id?: number) => {
|
||||
formRef.value.open(type, nickName,id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
|
@ -342,6 +342,18 @@ v-model="scope.row.mouldId" clearable placeholder="下拉选择" disabled
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="equipId" align="center" min-width="140px">
|
||||
<template #header> 设备型号 </template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.equipId`" class="mb-0px!">
|
||||
<!-- <el-select v-model="scope.row.equipId" clearable placeholder="下拉选择" style="width: 100%">
|
||||
<el-option v-for="dict in scope.row.equipList" :key="dict.id" :label="dict.name"
|
||||
:value="dict.id" />
|
||||
</el-select> -->
|
||||
<EquipSelect v-model="scope.row.equipId" @update:new-value="handleSelectedequip(scope, $event)" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="180px" align="center">
|
||||
<template #header>毛坯开始日期</template>
|
||||
<template #default="{ row, $index }">
|
||||
@ -446,18 +458,6 @@ class="!w-265px" v-model="row.threeDimDate" type="date" value-format="x"
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="compositionName" label="主要材质" min-width="100px" align="center" />
|
||||
<el-table-column prop="equipId" align="center" min-width="140px">
|
||||
<template #header> 设备型号 </template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.equipId`" class="mb-0px!">
|
||||
<!-- <el-select v-model="scope.row.equipId" clearable placeholder="下拉选择" style="width: 100%">
|
||||
<el-option v-for="dict in scope.row.equipList" :key="dict.id" :label="dict.name"
|
||||
:value="dict.id" />
|
||||
</el-select> -->
|
||||
<EquipSelect v-model="scope.row.equipId" @update:new-value="handleSelectedequip(scope, $event)" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="projectSubCode" label="子项目编号" min-width="180px" align="center" />
|
||||
<el-table-column prop="unit" label="单位" min-width="90px" align="center">
|
||||
<template #default="scope">
|
||||
|
@ -62,7 +62,7 @@
|
||||
class="!w-240px"
|
||||
/> -->
|
||||
<UserSelect v-model="queryParams.owner" @update:newValue="handleSelectedUser1" class="!w-265px"/>
|
||||
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
@ -83,14 +83,19 @@
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" border class="hl-table" :row-class-name="tableRowClassName">
|
||||
<el-table-column type="index" min-width="60" fixed label="序号" align="center" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<el-table-column label="项目编号" align="center" prop="projectCode" width="240px" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" width="240px"/>
|
||||
<el-table-column label="报工类型" align="center" prop="planType" width="160px">
|
||||
<template #default="scope">
|
||||
{{scope.row.type=='ASSEMBLE'?"装配任务派工单":"生产任务派工单"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产计划号" align="center" prop="taskNo" width="240px"/>
|
||||
<el-table-column label="生产状态" align="center" prop="planType" >
|
||||
<template #default="scope">
|
||||
@ -115,7 +120,7 @@
|
||||
<el-table-column label="总报工工时" align="center" prop="bgWorkTime" />
|
||||
<el-table-column label="总报工数量" align="center" prop="bgAmount" />
|
||||
<el-table-column label="完成标志" align="center" prop="wgType">
|
||||
|
||||
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_PG_PLANTYPE" :value="1" v-if="scope.row.wgType==2"/>
|
||||
<dict-tag :type="DICT_TYPE.HELI_PG_PLANTYPE" :value="0" v-else/>
|
||||
@ -133,7 +138,7 @@
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@ -160,8 +165,8 @@ const queryParams = reactive({
|
||||
projectSubName: undefined,
|
||||
materialName: undefined,
|
||||
owner: undefined,
|
||||
|
||||
|
||||
|
||||
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
@ -245,7 +245,7 @@ class="!w-260px" v-model="formData.createTime" type="date" value-format="x"
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">派工明细</span>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col v-if="active != 'detail' || !detailDisabled">
|
||||
<el-col v-if=" (formData.dispatchStatus != 2 && active != 'detail') || !detailDisabled">
|
||||
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem">新增</el-button>
|
||||
</el-col>
|
||||
<el-col>
|
||||
@ -260,7 +260,7 @@ ref="subFormRef" :model="formData.taskDispatchDetails" :rules="subFormRules"
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.procedureId`" :rules="subFormRules.procedureId" class="mb-0px!">
|
||||
<ProcedureSelect
|
||||
:disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0"
|
||||
:disabled="detailDisabled || row.procedureStatus != 0"
|
||||
v-model="row.procedureId"
|
||||
@update:new-value="(val) => { handleSelectedProcedure(row, val); }" />
|
||||
</el-form-item>
|
||||
@ -276,7 +276,7 @@ ref="subFormRef" :model="formData.taskDispatchDetails" :rules="subFormRules"
|
||||
<el-form-item :prop="`${$index}.sort`" :rules="subFormRules.sort" class="mb-0px!">
|
||||
<el-input-number
|
||||
min="0" :precision="0" class="!w-240px"
|
||||
:disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0" v-model="row.sort"
|
||||
:disabled="detailDisabled || (row.beginProduce != 0 && row.procedureStatus != 0)" v-model="row.sort"
|
||||
placeholder="请输入顺序号" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
@ -288,7 +288,7 @@ min="0" :precision="0" class="!w-240px"
|
||||
<!-- <UserSelect-->
|
||||
<!--v-model="row.owner" :disabled="detailDisabled || row.procedureStatus != 0"-->
|
||||
<!-- @update:new-value="handleSelectedUser($index, $event)" />-->
|
||||
<el-select v-model="row.owner" :disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0" @update:new-value="handleSelectedUser($index, $event)">
|
||||
<el-select v-model="row.owner" :disabled="detailDisabled || (row.beginProduce != 0 && row.procedureStatus != 0)" @update:new-value="handleSelectedUser($index, $event)">
|
||||
<el-option
|
||||
v-for="dict in userInit" :key="dict.id"
|
||||
:label="dict.username+' '+dict.nickname" :value="dict.id" />
|
||||
@ -301,7 +301,7 @@ v-for="dict in userInit" :key="dict.id"
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.startTime`" :rules="subFormRules.startTime" class="mb-0px!">
|
||||
<el-date-picker
|
||||
:disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0" v-model="row.startTime"
|
||||
:disabled="detailDisabled " v-model="row.startTime"
|
||||
type="date" value-format="x" placeholder="选择预计开始日期" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
@ -311,7 +311,7 @@ v-for="dict in userInit" :key="dict.id"
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.endTime`" :rules="subFormRules.endTime" class="mb-0px!">
|
||||
<el-date-picker
|
||||
:disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0" v-model="row.endTime"
|
||||
:disabled="detailDisabled " v-model="row.endTime"
|
||||
type="date" value-format="x" placeholder="选择预计结束日期" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
@ -322,7 +322,7 @@ v-for="dict in userInit" :key="dict.id"
|
||||
<el-form-item :prop="`${$index}.workTime`" :rules="subFormRules.workTime" class="mb-0px!">
|
||||
<el-input-number
|
||||
min="0" :precision="2" class="!w-240px"
|
||||
:disabled="detailDisabled|| row.beginProduce != 0 || row.procedureStatus != 0" v-model="row.workTime"
|
||||
:disabled="detailDisabled" v-model="row.workTime"
|
||||
placeholder="请输入预计工时" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
@ -344,7 +344,7 @@ min="0" :precision="2" class="!w-240px"
|
||||
<EquipmentSelect
|
||||
v-model="row.deviceModel"
|
||||
@update:new-value="handleSelectedequip($index, $event)"
|
||||
:disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0" />
|
||||
:disabled="detailDisabled || (row.beginProduce != 0 && row.procedureStatus != 0)" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -352,7 +352,7 @@ min="0" :precision="2" class="!w-240px"
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.summary`" class="mb-0px!">
|
||||
<el-input
|
||||
:disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0" v-model="row.summary"
|
||||
:disabled="detailDisabled ||(row.beginProduce != 0 && row.procedureStatus != 0)" v-model="row.summary"
|
||||
placeholder="请输入工序要点" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
@ -366,7 +366,7 @@ min="0" :precision="2" class="!w-240px"
|
||||
<el-table-column fixed="right" label="操作" align="center" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="'detail' != active && scope.row.procedureStatus == 0" link type="danger"
|
||||
v-if="'detail' != active && (scope.row.beginProduce == 0 && scope.row.procedureStatus == 0)" link type="danger"
|
||||
size="small" @click.prevent="onDeleteItem(scope.$index)">
|
||||
删除
|
||||
</el-button>
|
||||
|
@ -296,7 +296,7 @@ v-model="row.owner" :disabled="detailDisabled || row.procedureStatus != 0"
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.startTime`" :rules="subFormRules.startTime" class="mb-0px!">
|
||||
<el-date-picker
|
||||
:disabled="detailDisabled || row.procedureStatus != 0" v-model="row.startTime"
|
||||
:disabled="detailDisabled " v-model="row.startTime"
|
||||
type="date" value-format="x" placeholder="选择预计开始日期" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
@ -306,7 +306,7 @@ v-model="row.owner" :disabled="detailDisabled || row.procedureStatus != 0"
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.endTime`" :rules="subFormRules.endTime" class="mb-0px!">
|
||||
<el-date-picker
|
||||
:disabled="detailDisabled || row.procedureStatus != 0" v-model="row.endTime"
|
||||
:disabled=" detailDisabled" v-model="row.endTime"
|
||||
type="date" value-format="x" placeholder="选择预计结束日期" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
@ -317,7 +317,7 @@ v-model="row.owner" :disabled="detailDisabled || row.procedureStatus != 0"
|
||||
<el-form-item :prop="`${$index}.workTime`" :rules="subFormRules.workTime" class="mb-0px!">
|
||||
<el-input-number
|
||||
min="0" :precision="2" class="!w-240px"
|
||||
:disabled="detailDisabled || row.beginProduce != 0 || row.procedureStatus != 0" v-model="row.workTime"
|
||||
:disabled="detailDisabled " v-model="row.workTime"
|
||||
placeholder="请输入预计工时" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
@ -367,7 +367,7 @@ v-model="row.deviceModel"
|
||||
<el-table-column fixed="right" label="操作" align="center" min-width="90">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="'detail' != active && scope.row.procedureStatus == 0" link type="danger"
|
||||
v-if="'detail' != active && (scope.row.beginProduce == 0 && scope.row.procedureStatus == 0)" link type="danger"
|
||||
size="small" @click.prevent="onDeleteItem(scope.row,scope.$index)">
|
||||
删除
|
||||
</el-button>
|
||||
@ -459,10 +459,10 @@ v-if="formData.dispatchStatus == 2" @click="printHandle(formData.id)" :disabled=
|
||||
</span>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="centerDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="sureToCancle()">
|
||||
确认
|
||||
</el-button>
|
||||
<el-button @click="centerDialogVisible = false">取消</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@ -1086,7 +1086,6 @@ const submitForm = async (operate) => {
|
||||
}
|
||||
}
|
||||
const data = formData.value as unknown as TaskDispatchApi.TaskDispatchVO
|
||||
console.log(data);
|
||||
let dataId = await TaskDispatchApi.operateTaskDispatch(data)
|
||||
message.success(t('common.operationSuccess'))
|
||||
|
||||
@ -1146,6 +1145,7 @@ const onAddItem = () => {
|
||||
summary: undefined,
|
||||
status: 1,
|
||||
procedureStatus: 0,
|
||||
beginProduce:0,
|
||||
dispatchId: undefined,
|
||||
procedureCode:'' ,
|
||||
isReport:0 ,
|
||||
|
@ -52,24 +52,27 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="formData.unit" placeholder="" />
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="formData.unit"/>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检验人" prop="detilUser">
|
||||
<el-input v-model="formData.detilUser" placeholder="" />
|
||||
<el-input v-model="formData.nickName" disabled placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="开始日期" prop="startTime">
|
||||
<el-date-picker v-model="formData.startTime" type="date" value-format="x"
|
||||
placeholder="选择开始日期" />
|
||||
<el-input v-model="formData.finalStartTime" disabled="true"/>
|
||||
<!-- <el-date-picker
|
||||
v-model="formData.startTime" type="date" value-format="x"
|
||||
placeholder="选择开始日期" /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="结束日期" prop="entTime">
|
||||
<el-date-picker v-model="formData.entTime" type="date" value-format="x" placeholder="选择结束日期" />
|
||||
<el-input v-model="formData.finalEndTime" disabled="true"/>
|
||||
<!-- <el-date-picker v-model="formData.entTime" type="date" value-format="x" placeholder="选择结束日期" /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -78,7 +81,7 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单据状态" prop="pgType">
|
||||
<el-form-item label="单据状态" prop="pgType" >
|
||||
<el-select v-model="formData.pgType" placeholder="">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PGTYPE)"
|
||||
@ -130,6 +133,7 @@
|
||||
<script setup lang="ts">
|
||||
import * as ZjPgMasterApi from '@/api/heli/zjpgmaster'
|
||||
import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@/utils/dict'
|
||||
import { string } from 'vue-types'
|
||||
const {
|
||||
t
|
||||
} = useI18n() // 国际化
|
||||
@ -163,10 +167,22 @@
|
||||
projectName: undefined,
|
||||
dispatchStatus: undefined,
|
||||
active: undefined,
|
||||
finalStartTime:'',
|
||||
finalEndTime:'',
|
||||
nickName:'',
|
||||
})
|
||||
const formRules = reactive({})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
const formatDate = (date) => {
|
||||
const d = new Date(date);
|
||||
const year = d.getFullYear();
|
||||
const month = (d.getMonth() + 1).toString().padStart(2, '0');
|
||||
const day = d.getDate().toString().padStart(2, '0');
|
||||
const hours = d.getHours().toString().padStart(2, '0');
|
||||
const minutes = d.getMinutes().toString().padStart(2, '0');
|
||||
const seconds = d.getSeconds().toString().padStart(2, '0');
|
||||
return `${year}-${month}-${day}${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id ? : number) => {
|
||||
dialogVisible.value = true
|
||||
@ -178,6 +194,8 @@
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await ZjPgMasterApi.getZjPgMasterLineListByZlPgIdLine(id)
|
||||
formData.value.finalStartTime = formatDate(formData.value.startTime);
|
||||
formData.value.finalEndTime = formatDate(formData.value.entTime);
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
@ -230,6 +248,9 @@
|
||||
compositionName: undefined,
|
||||
mouldId: undefined,
|
||||
mouldName: undefined,
|
||||
finalStartTime:'',
|
||||
finalEndTime:'',
|
||||
nickName:'',
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
@ -51,7 +51,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="检验人" prop="detilUser">
|
||||
<UserSelect v-model="queryParams.detilUser" @update:newValue="handleSelectedUser1" class="!w-265px"/>
|
||||
<UserSelect v-model="queryParams.detilUser" @update:new-value="handleSelectedUser1" class="!w-265px"/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="检验人" prop="detilUser">
|
||||
@ -94,17 +94,18 @@
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" class="hl-table" :show-overflow-tooltip="true">
|
||||
<el-table-column v-if = "false" label="主键" align="center" prop="id" />
|
||||
<el-table-column v-if = "false"
|
||||
<el-table-column
|
||||
v-if = "false"
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="生产计划单号" align="center" prop="taskNo" width="200"/>
|
||||
<el-table-column label="生产计划单号" fixed="left" align="center" prop="taskNo" width="200"/>
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" width="200"/>
|
||||
<el-table-column label="子项目名称" align="center" prop="projectSubName" width="200"/>
|
||||
<el-table-column label="模具名称" align="center" prop="mouldName" />
|
||||
<el-table-column label="模具名称" align="center" prop="mouldName" min-width="105" />
|
||||
<el-table-column label="材质" align="center" prop="compositionName" />
|
||||
|
||||
<el-table-column label="单位" align="center" prop="unit" >
|
||||
@ -116,7 +117,7 @@
|
||||
<el-table-column label="检验人" align="center" prop="nickName" />
|
||||
|
||||
|
||||
<el-table-column label="材质名称" align="center" prop="compositionName" />
|
||||
<el-table-column label="材质名称" align="center" prop="compositionName" min-width="100" />
|
||||
|
||||
<el-table-column label="派工单号" align="center" prop="pgNumber" width="220"/>
|
||||
|
||||
@ -134,20 +135,20 @@
|
||||
:formatter="dateFormatter"
|
||||
width="240"
|
||||
/>
|
||||
<el-table-column label="派工状态" min-width="80">
|
||||
<el-table-column label="派工状态" min-width="105">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_DISPATCH_STATUS" :value="scope.row.dispatchStatus" />
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态" min-width="80">
|
||||
<el-table-column label="单据状态" min-width="105" fixed="right" style="text-align: center;">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_PGTYPE" :value="scope.row.pgType" />
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
|
@ -4,10 +4,10 @@ import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { getListAPI, getDictAPI,postOperateAPIZF,updateBaoGong } from '@/services/moJuSheJiReport'
|
||||
import { useLoginStore } from '@/stores/modules/login'
|
||||
import { formatDate } from '@/utils/index'
|
||||
import popup from './popup.vue';
|
||||
// import popup from './popup.vue';
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
|
||||
const popup = ref<UniHelper.UniPopupInstance>()
|
||||
const userStore = useLoginStore()
|
||||
const userId = userStore.userInfo.userId
|
||||
|
||||
@ -17,7 +17,7 @@ const isFinish = ref(false)
|
||||
const isTriggered = ref(false)
|
||||
const progress = ref(0)
|
||||
const imageLink = ref(0)
|
||||
|
||||
const remark = ref('')
|
||||
const selectedId = ref(null); // 定义 selectedId 变量
|
||||
|
||||
// 定义 porps
|
||||
@ -47,14 +47,14 @@ const queryParams: Required<any> = {
|
||||
const dataList = ref([])
|
||||
const showPopup = ref(false);
|
||||
|
||||
const onPopupClose = (progress, imageLink) => {
|
||||
const onPopupClose = (progress, imageLink,remark) => {
|
||||
|
||||
// 这里可以添加关闭弹出框时的逻辑,例如重置某些状态
|
||||
showPopup.value = false;
|
||||
|
||||
console.log(remark)
|
||||
|
||||
const zid = selectedId.value;
|
||||
callApi(zid,progress,imageLink)
|
||||
callApi(zid,progress,imageLink,remark)
|
||||
|
||||
|
||||
|
||||
@ -63,16 +63,22 @@ const onPopupClose = (progress, imageLink) => {
|
||||
/* */
|
||||
|
||||
};
|
||||
const callApi = async (zid: Number,progress :Number,imageLink: String) => {
|
||||
const submitDetail = async() =>{
|
||||
const zid = selectedId.value;
|
||||
await callApi(zid,progress.value,imageLink.value,remark.value)
|
||||
popup.value.close()
|
||||
}
|
||||
const callApi = async (zid: Number,progress :Number,imageLink: String,remark:String) => {
|
||||
console.log(progress);
|
||||
if(progress>0){
|
||||
//调用报工接口,将录入的进度、图片链接和id传入进去
|
||||
await updateBaoGong(zid,progress,imageLink);
|
||||
await updateBaoGong(zid,progress,imageLink,remark);
|
||||
isFinish.value = false;
|
||||
isLoading.value = false;
|
||||
queryParams.pageNo = 1;
|
||||
dataList.value = [];
|
||||
await getListData();
|
||||
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '设计进度填写时不能为0%,请重新填写后提交!',
|
||||
@ -99,9 +105,10 @@ const getListData = async () => {
|
||||
e.twoDimDate = formatDate(e.twoDimDate, "YYYY-MM-DD");
|
||||
e.threeDimDate = formatDate(e.threeDimDate, "YYYY-MM-DD");
|
||||
e.endTime = formatDate(e.endTime, "YYYY-MM-DD");
|
||||
|
||||
|
||||
|
||||
e.startTwoDimDate = formatDate(e.startTwoDimDate, "YYYY-MM-DD");
|
||||
e.startThreeDimDate = formatDate(e.startThreeDimDate, "YYYY-MM-DD");
|
||||
e.startBlankDate = formatDate(e.startBlankDate, "YYYY-MM-DD");
|
||||
e.blankDate = formatDate(e.blankDate, "YYYY-MM-DD");
|
||||
})
|
||||
// 数组追加
|
||||
dataList.value.push(...data.list)
|
||||
@ -133,8 +140,10 @@ const handleDetail =async (item) => {
|
||||
if(props.orderState == 0){
|
||||
progress.value = 0;
|
||||
imageLink.value = item.blueprintLink;
|
||||
remark.value = item.remark;
|
||||
await nextTick(); // 等待数据更新和DOM渲染
|
||||
showPopup.value = true;
|
||||
// showPopup.value = true;
|
||||
popup.value?.open()
|
||||
selectedId.value = item.id;
|
||||
}else{
|
||||
const url = `/pages/moJuSheJiReport/moJuSheJiReport-detail?id=${item.id}&jd=${item.progress}`
|
||||
@ -178,6 +187,9 @@ const onRefresherrefresh = async () => {
|
||||
// 关闭动画
|
||||
isTriggered.value = false
|
||||
}
|
||||
const handleClose = () =>{
|
||||
popup.value.close();
|
||||
}
|
||||
// const searchVal = ref('')
|
||||
// const dataListDefault = ref([])
|
||||
// const handleSearch = async () => {
|
||||
@ -214,7 +226,12 @@ const onRefresherrefresh = async () => {
|
||||
<view class="product-item">项目:{{ item.projectName }}</view>
|
||||
<view class="product-item">子项目:{{ item.projectSubCode || "" }}</view>
|
||||
<view class="product-item">客户名称:{{ item.customerName }}</view>
|
||||
<view class="product-item">工艺起止日期:{{item.twoDimDate}} ~ {{item.threeDimDate}} </view>
|
||||
<view class="product-item" v-if="item.processDesignType == 'BLUEPRINT_2D'">工艺起止日期:{{item.startTwoDimDate}} ~ {{item.twoDimDate}} </view>
|
||||
<view class="product-item" v-else-if ="item.processDesignType == 'BLUEPRINT_3D'">工艺起止日期:{{item.startThreeDimDate}} ~ {{item.threeDimDate}} </view>
|
||||
<view class="product-item" v-else-if="item.processDesignType == 'BLUEPRINT_WORKBLANK'">工艺起止日期:{{item.startBlankDate}} ~ {{item.blankDate}} </view>
|
||||
<!-- <view class="product-item" v-else-if="item.processDesignType == 'BLUEPRINT_FOUNDRY_TECHNOLOGY'">工艺起止日期:{{item.twoDimDate}} ~ {{item.threeDimDate}} </view> -->
|
||||
|
||||
|
||||
<view class="product-item">最新进度:{{item.progress}}%</view>
|
||||
<!-- <view class="product-item">预计生产日期:{{ item.startTime }} ~ {{ item.entTime }}</view> -->
|
||||
</view>
|
||||
@ -226,7 +243,37 @@ const onRefresherrefresh = async () => {
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- <popup :show="showPopup" :progress="0.0" :imageLink="''" @close="onPopupClose" /> -->
|
||||
<popup :showPopup="showPopup" :progress="progress" :imageLink="imageLink" @close="onPopupClose" />
|
||||
<uni-popup class="popup" ref="popup" :mask-click="true" type="bottom" background-color="#fff">
|
||||
<view class="title">
|
||||
<view class="text">填写信息</view>
|
||||
<view class="close" @click="handleClose">X</view>
|
||||
</view>
|
||||
<view class="cont">
|
||||
<!-- <view class="item">
|
||||
<view class="label">终检开始时间:</view>
|
||||
<view class="val">{{ formObj.startTime }}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">终检结束时间:</view>
|
||||
<view class="val">{{ formObj.endTime }}</view>
|
||||
</view> -->
|
||||
<view class="item">
|
||||
<view class="label"><span class="star">*</span>进度百分比:</view>
|
||||
<uni-easyinput class="val" type="number" v-model="progress" placeholder="请输入本次报工工时"></uni-easyinput>
|
||||
<view class="unit">%</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label"><span class="star">*</span>图纸连接:</view>
|
||||
</view>
|
||||
<uni-easyinput type="textarea" v-model="imageLink" placeholder="请输入图纸链接"></uni-easyinput>
|
||||
<view class="item">
|
||||
<view class="label"><span class="star"></span>备注:</view>
|
||||
</view>
|
||||
<uni-easyinput type="textarea" class="popup-input" v-model="remark" placeholder="请输入备注"/>
|
||||
</view>
|
||||
<view class="ok" @click="submitDetail()">确定</view>
|
||||
</uni-popup>
|
||||
<!-- <popup :showPopup="showPopup" :progress="progress" :imageLink="imageLink" :remark="remark" @close="onPopupClose" /> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -246,7 +293,70 @@ const onRefresherrefresh = async () => {
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
.popup {
|
||||
.title {
|
||||
line-height: 1;
|
||||
padding: 40rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: normal;
|
||||
border-bottom: 1rpx solid #ddd;
|
||||
color: #444;
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
top: 40rpx;
|
||||
height: 60rpx;
|
||||
width: 60rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.cont {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 40rpx;
|
||||
height: 50vh;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 20rpx 0;
|
||||
color: #737D88;
|
||||
width: 94%;
|
||||
|
||||
.label {
|
||||
font-size: 32rpx;
|
||||
width: 260rpx;
|
||||
.star {
|
||||
color: red
|
||||
}
|
||||
}
|
||||
|
||||
.val {
|
||||
flex: 1;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.unit {
|
||||
width: 100rpx;
|
||||
margin-left: 4rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ok {
|
||||
font-size: 32rpx;
|
||||
margin: 20rpx auto 80rpx;
|
||||
text-align: center;
|
||||
width: 200rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 8rpx 0;
|
||||
background-color: #3C8AF7;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.data-list {
|
||||
height: 90vh;
|
||||
.item {
|
||||
@ -291,7 +401,7 @@ const onRefresherrefresh = async () => {
|
||||
.product-item {
|
||||
margin: 20rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: left;
|
||||
color: #737D88
|
||||
}
|
||||
.product-row {
|
||||
|
@ -6,7 +6,9 @@
|
||||
<input type="number" class="popup-input" v-model="progress" placeholder="请输入进度">
|
||||
<view class="product-item">图纸链接</view>
|
||||
<input type="text" class="popup-input" v-model="imageLink" placeholder="请输入图片链接">
|
||||
<button @click="onClose">确认上报</button>
|
||||
<view class="product-item">备注</view>
|
||||
<uni-easyinput type="textarea" class="popup-input" v-model="remark" placeholder="请输入备注"/>
|
||||
<button style="margin-top: 5%;" size="10px" type="primary" @click="onClose">确认上报</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -22,12 +24,16 @@ const props = defineProps({
|
||||
imageLink: {
|
||||
type: String,
|
||||
default: '123'
|
||||
}
|
||||
},
|
||||
remark: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
});
|
||||
|
||||
const progress = ref(0);
|
||||
const imageLink = ref('');
|
||||
|
||||
const remark = ref('');
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
const onMaskClick = () => {
|
||||
@ -35,19 +41,20 @@ const onMaskClick = () => {
|
||||
};
|
||||
|
||||
const onClose = () => {
|
||||
emit('close', progress.value, imageLink.value);
|
||||
emit('close', progress.value, imageLink.value,remark.value);
|
||||
progress.value = 0;
|
||||
imageLink.value = '';
|
||||
imageLink.value = '';
|
||||
remark.value = '';
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
imageLink.value = props.imageLink;
|
||||
remark.value = props.remark;
|
||||
});
|
||||
|
||||
watchEffect(() => {
|
||||
console.log('传入的值');
|
||||
console.log(props.imageLink);
|
||||
imageLink.value = props.imageLink;
|
||||
remark.value = props.remark;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -211,8 +211,8 @@ const handleStop = async () => {
|
||||
</view> -->
|
||||
<view class="product-item">上报时间:{{ item.createTime }}</view>
|
||||
<!-- <view class="product-item">生产结束时间:{{ item.endTimeStr }}</view> -->
|
||||
|
||||
<view class="product-row">
|
||||
<view class="product-item">报工进度:{{ item.progress+'%' }}</view>
|
||||
<!-- <view class="product-row">
|
||||
<view class="row-item">
|
||||
<view class="label">设计进度:</view>
|
||||
<view class="val high-color">{{ item.progress }}%</view>
|
||||
@ -221,7 +221,9 @@ const handleStop = async () => {
|
||||
<view class="label">图纸链接:</view>
|
||||
<view class="val high-color">{{ item.blueprintLink }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="product-item">图纸链接:{{item.blueprintLink }}</view>
|
||||
<view class="product-item">备注:{{ item.remark }}</view>
|
||||
<view class="tip-index">
|
||||
<image src="/static/images/productionReport-detail-index.png" class="icon-status" mode="scaleToFit">
|
||||
</image>
|
||||
|
@ -163,6 +163,25 @@ const handleStart = async () => {
|
||||
}
|
||||
// 结束生产
|
||||
const handleStop = async () => {
|
||||
|
||||
//算时间和数量
|
||||
//算时间
|
||||
var lastIndex = historyList.value.length-1;
|
||||
var lastItem = historyList.value[lastIndex];
|
||||
console.log( historyList.value)
|
||||
workTime.value = Math.floor(Math.abs(lastItem.createTime - Date.now()) / (1000 * 60 * 60)).toString();
|
||||
//算数量
|
||||
if(historyList.value.length == 1){
|
||||
amount.value =detailInfo.value.amount;
|
||||
}else{
|
||||
var beforeAmount = 0;
|
||||
for (var i = 0 ; i < historyList.value.length-1;i++){
|
||||
beforeAmount += historyList.value[i].amount
|
||||
}
|
||||
var finalamount = detailInfo.value.amount -beforeAmount
|
||||
if(finalamount < 0){finalamount = 0}
|
||||
amount.value = finalamount.toString();
|
||||
}
|
||||
popup.value.open();
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { toRaw, ref, onMounted } from 'vue'
|
||||
import { formatDate } from '@/utils/index'
|
||||
import { getApproveOrderAPI, getChildProductAPI } from '@/services/approveOrder'
|
||||
import { getApproveOrderAPI, getChildProductAPI ,getApproveOrderAPIWx} from '@/services/approveOrder'
|
||||
import { getBomPageAPI, getProcedurePageAPI, getUserPageAPI, postAddAPI } from '@/services/unqualifiedNotification'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { useLoginStore } from '@/stores/modules/login'
|
||||
@ -33,16 +33,16 @@
|
||||
})
|
||||
}
|
||||
// 项目
|
||||
let projectData = []
|
||||
const projectData = ref([])
|
||||
const getProjectData = async () => {
|
||||
const params = {
|
||||
pageNo: 1,
|
||||
pageSize: 99,
|
||||
pageSize: 999,
|
||||
orderStatusList: '32',
|
||||
isSnapshot: 0,
|
||||
deliveryStatusList: '1,2' // 发货状态1|2|3 未发货 部分发货 全部发货
|
||||
}
|
||||
const data = await getApproveOrderAPI(params)
|
||||
const data = await getApproveOrderAPIWx(params)
|
||||
const arr = []
|
||||
data.list.forEach(e => {
|
||||
const obj = {
|
||||
@ -51,7 +51,8 @@
|
||||
}
|
||||
arr.push(obj)
|
||||
})
|
||||
projectData = arr
|
||||
console.log(arr)
|
||||
projectData.value = arr
|
||||
}
|
||||
const projectChildData = ref([])
|
||||
const getProjectChildData = async (projectOrderId) => {
|
||||
@ -140,7 +141,7 @@
|
||||
await getTypeDictData()
|
||||
await getProjectData()
|
||||
await getBomData()
|
||||
await getProcedurePage()
|
||||
// await getProcedurePage()
|
||||
await getOwnerDataData()
|
||||
// isLoading.value = false
|
||||
})
|
||||
|
@ -162,6 +162,23 @@ const handleStart = async () => {
|
||||
}
|
||||
// 结束生产
|
||||
const handleStop = async () => {
|
||||
// var lastIndex = historyList.value.length-1;
|
||||
var lastItem = historyList.value[0];
|
||||
console.log(historyList.value)
|
||||
workTime.value = Math.floor(Math.abs(lastItem.createTime - Date.now()) / (1000 * 60 * 60)).toString();
|
||||
//算数量
|
||||
if(historyList.value.length == 1){
|
||||
amount.value = detailInfo.value.amount;
|
||||
}else{
|
||||
var beforeAmount = 0;
|
||||
for (var i = historyList.value.length-1 ; i >0;i--){
|
||||
console.log( historyList.value[i])
|
||||
beforeAmount += historyList.value[i].amount
|
||||
}
|
||||
var finalamount = detailInfo.value.amount -beforeAmount
|
||||
if(finalamount < 0){finalamount = 0}
|
||||
amount.value = finalamount.toString();
|
||||
}
|
||||
popup.value.open();
|
||||
/* const params = {
|
||||
id: detailInfo.value?.id,
|
||||
|
@ -15,7 +15,13 @@ export const getApproveOrderAPI = (data: Object) => {
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export const getApproveOrderAPIWx = (data: Object) => {
|
||||
return http<any[]>({
|
||||
method: 'GET',
|
||||
url: '/heli/project-order/pageWX',
|
||||
data,
|
||||
})
|
||||
}
|
||||
export const getApproveOrderDetailAPI = (data: Object) => {
|
||||
return http<any[]>({
|
||||
method: 'GET',
|
||||
|
@ -10,5 +10,5 @@
|
||||
// export const serviceDomain = 'https://star.hz-hl.com'
|
||||
// export const serviceDomain = 'http://222.71.165.187:9010'
|
||||
|
||||
// export const serviceDomain = 'http://localhost:8080'
|
||||
export const serviceDomain = 'https://nxhs.cjyx.cc'
|
||||
// export const serviceDomain = 'http://localhost:8080'
|
||||
export const serviceDomain = 'https://nxhs.cjyx.cc'
|
||||
|
@ -19,11 +19,12 @@ export const getListAPI = (data: Object) => {
|
||||
/**
|
||||
* 操作生产任务(开始/结束/提交/完成)
|
||||
*/
|
||||
export const updateBaoGong = (zid: String,progress: String,imageLink:String) => {
|
||||
export const updateBaoGong = (zid: String,progress: String,imageLink:String,remark:String) => {
|
||||
const data = {
|
||||
zid: zid,
|
||||
progress: progress,
|
||||
imageLink: imageLink
|
||||
imageLink: imageLink,
|
||||
remark:remark
|
||||
};
|
||||
return http<any[]>({
|
||||
method: 'POST',
|
||||
|
Loading…
Reference in New Issue
Block a user