过程检/终检/审核
This commit is contained in:
parent
e2ceafc29d
commit
ae754e2a71
@ -18,7 +18,7 @@ const categoryList = ref([
|
||||
},
|
||||
{
|
||||
path: 'unqualifiedNotification',
|
||||
name: '品质异常通知',
|
||||
name: '品质异常审核',
|
||||
auth: false,
|
||||
imgUrl: '/static/images/unqualifiedNotification.png',
|
||||
defaultImgUrl: '/static/images/unqualifiedNotification-default.png',
|
||||
|
@ -49,6 +49,7 @@ public class BgMasterLineController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建过程检报工")
|
||||
@PreAuthorize("@ss.hasPermission('heli:bg-master-line:create')")
|
||||
@ -73,6 +74,8 @@ public class BgMasterLineController {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得过程检报工")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@ -81,7 +84,13 @@ public class BgMasterLineController {
|
||||
BgMasterLineDO bgMasterLine = bgMasterLineService.getBgMasterLine(id);
|
||||
return success(BeanUtils.toBean(bgMasterLine, BgMasterLineRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/validExceed")
|
||||
@Operation(summary = "获得过程检报工")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:bg-master-line:query')")
|
||||
public CommonResult<Boolean> validExceed(@RequestParam("id") Long id,@RequestParam("amount") Integer amount) {
|
||||
return success(bgMasterLineService.validExceed(id,amount));
|
||||
}
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得过程检报工分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:bg-master-line:query')")
|
||||
|
@ -38,6 +38,15 @@ public class BgMasterLinePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "工时")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private BigDecimal[] workTime;
|
||||
|
||||
}
|
||||
private BigDecimal[] workTime;
|
||||
private String userName;
|
||||
private Integer isRepre;
|
||||
private Integer isQua;
|
||||
private String remark;
|
||||
private Integer notificationStatus;
|
||||
private Integer conStatus;
|
||||
private String auditOpinion;
|
||||
private Integer auditor;
|
||||
private LocalDateTime audit_time;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.bgmasterline.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
@ -53,5 +54,13 @@ public class BgMasterLineRespVO {
|
||||
@Schema(description = "报工人")
|
||||
@ExcelProperty("报工人")
|
||||
private String userName;
|
||||
|
||||
}
|
||||
private Integer isRepre;
|
||||
private Integer isQua;
|
||||
private String remark;
|
||||
private Integer notificationStatus;
|
||||
private Integer conStatus;
|
||||
private String auditOpinion;
|
||||
private Integer auditor;
|
||||
private LocalDateTime audit_time;
|
||||
private List<String> fileUrlList;
|
||||
}
|
||||
|
@ -1,37 +1,47 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.bgmasterline.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
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
|
||||
public class BgMasterLineSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "11518")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "过程检ID", example = "1862")
|
||||
private Integer zjId;
|
||||
|
||||
@Schema(description = "过程检明细id", example = "10005")
|
||||
private Integer zjMxId;
|
||||
|
||||
@Schema(description = "报工人")
|
||||
private String bgUser;
|
||||
|
||||
@Schema(description = "报工数量")
|
||||
private Integer amount;
|
||||
|
||||
@Schema(description = "报工时间")
|
||||
private LocalDateTime bgTime;
|
||||
|
||||
@Schema(description = "工时")
|
||||
private BigDecimal workTime;
|
||||
|
||||
}
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.bgmasterline.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
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
|
||||
public class BgMasterLineSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "11518")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "过程检ID", example = "1862")
|
||||
private Integer zjId;
|
||||
|
||||
@Schema(description = "过程检明细id", example = "10005")
|
||||
private Long zjMxId;
|
||||
|
||||
@Schema(description = "报工人")
|
||||
private String bgUser;
|
||||
|
||||
@Schema(description = "报工数量")
|
||||
private Integer amount;
|
||||
|
||||
@Schema(description = "报工时间")
|
||||
private LocalDateTime bgTime;
|
||||
|
||||
@Schema(description = "工时")
|
||||
private BigDecimal workTime;
|
||||
|
||||
private Integer isRepre;
|
||||
private Integer isQua;
|
||||
private String remark;
|
||||
private Integer type;
|
||||
private String userName;
|
||||
private Integer notificationStatus;
|
||||
private Integer conStatus;
|
||||
private String auditOpinion;
|
||||
private Integer auditor;
|
||||
private LocalDateTime audit_time;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public class PgMasterController {
|
||||
@PostMapping("/zfPgMaster")
|
||||
@Operation(summary = "作废过程检验派工单")
|
||||
@PreAuthorize("@ss.hasPermission('heli:pg-master:create')")
|
||||
public CommonResult<Integer> zfPgMaster(@RequestParam("id") Integer id) {
|
||||
public CommonResult<Integer> zfPgMaster(@RequestParam("id") Long id) {
|
||||
return success(pgMasterService.zfPgMaster(id));
|
||||
}
|
||||
|
||||
@ -104,6 +104,7 @@ public class PgMasterController {
|
||||
@PreAuthorize("@ss.hasPermission('heli:pg-master:query')")
|
||||
public CommonResult<PageResult<PgMasterRespVO>> getPgMasterPage(@Valid PgMasterPageReqVO pageReqVO) {
|
||||
PageResult<PgMasterDO> pageResult = pgMasterService.getPgMasterPage(pageReqVO);
|
||||
|
||||
return success(BeanUtils.toBean(pageResult, PgMasterRespVO.class));
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ public class UnqualifiedNotificationController {
|
||||
@PostMapping("/createWx")
|
||||
@Operation(summary = "创建品质异常通知单审核Wx")
|
||||
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:create')")
|
||||
public CommonResult<String> uploadFile(@RequestParam("file") MultipartFile file,@RequestHeader("id") String id) {
|
||||
public CommonResult<String> uploadFile(@RequestParam("file") MultipartFile file,@RequestHeader("id") String id,@RequestHeader("type") String type) {
|
||||
if (file.isEmpty()) {
|
||||
System.out.println(file);
|
||||
return error(500,"The file is empty.");
|
||||
@ -94,7 +94,9 @@ public class UnqualifiedNotificationController {
|
||||
fileDO.setUnqualifiedId(Long.valueOf(id));
|
||||
fileDO.setFileName(fileName);
|
||||
fileDO.setFileUrl( HeliWebConfiguration.FILE_URL+id+"/"+fileName);
|
||||
|
||||
if (type != null){
|
||||
fileDO.setType(Integer.valueOf(type));
|
||||
}
|
||||
fileDO.setFilePath(directory+id+"/" + fileName);
|
||||
unqualifiedNotificationFileService.createUnqualifiedNotificationFile(fileDO);
|
||||
return success("File uploaded successfully: " + fileName);
|
||||
@ -148,7 +150,7 @@ public class UnqualifiedNotificationController {
|
||||
if(CollUtil.isNotEmpty(list)){
|
||||
for (UnqualifiedNotificationDO unqualifiedNotificationDO : list) {
|
||||
List<String> fileUrlList = new ArrayList<>();
|
||||
List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(unqualifiedNotificationDO.getId());
|
||||
List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(unqualifiedNotificationDO.getId(),0);
|
||||
if(CollUtil.isNotEmpty(unqualifiedNotificationFileDOS)){
|
||||
for (UnqualifiedNotificationFileDO unqualifiedNotificationFileDO : unqualifiedNotificationFileDOS) {
|
||||
fileUrlList.add(unqualifiedNotificationFileDO.getFileUrl());
|
||||
@ -160,7 +162,29 @@ public class UnqualifiedNotificationController {
|
||||
|
||||
return success(BeanUtils.toBean(unqualifiedNotificationPage, UnqualifiedNotificationRespVO.class));
|
||||
}
|
||||
@GetMapping("/pageWx")
|
||||
@Operation(summary = "获得品质异常通知单审核分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:query')")
|
||||
public CommonResult<PageResult<UnqualifiedNotificationDO>> getUnqualifiedNotificationPageWx(@Valid UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||
int i = pageReqVO.getPageNo() * pageReqVO.getPageSize();
|
||||
pageReqVO.setPageNum(i);
|
||||
PageResult<UnqualifiedNotificationDO> unqualifiedNotificationPage = unqualifiedNotificationService.getUnqualifiedNotificationPageWx(pageReqVO);
|
||||
// List<UnqualifiedNotificationDO> list = unqualifiedNotificationPage.getList();
|
||||
// if(CollUtil.isNotEmpty(list)){
|
||||
// for (UnqualifiedNotificationDO unqualifiedNotificationDO : list) {
|
||||
// List<String> fileUrlList = new ArrayList<>();
|
||||
// List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(unqualifiedNotificationDO.getId(),0);
|
||||
// if(CollUtil.isNotEmpty(unqualifiedNotificationFileDOS)){
|
||||
// for (UnqualifiedNotificationFileDO unqualifiedNotificationFileDO : unqualifiedNotificationFileDOS) {
|
||||
// fileUrlList.add(unqualifiedNotificationFileDO.getFileUrl());
|
||||
// }
|
||||
// unqualifiedNotificationDO.setFileUrlList(fileUrlList);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
return success(unqualifiedNotificationPage);
|
||||
}
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出品质异常通知单审核 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:export')")
|
||||
|
@ -82,6 +82,7 @@ public class UnqualifiedNotificationPageReqVO extends PageParam {
|
||||
@Schema(description = "创建人名称")
|
||||
private String creatorName;
|
||||
|
||||
private Integer pageNum;
|
||||
@Schema(description = "最小创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime minCreateTime;
|
||||
@ -89,4 +90,6 @@ public class UnqualifiedNotificationPageReqVO extends PageParam {
|
||||
@Schema(description = "最大创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime maxCreateTime;
|
||||
|
||||
private Integer queryType;
|
||||
}
|
||||
|
@ -45,7 +45,13 @@ public class ZjBgMasterLineController {
|
||||
public CommonResult<Integer> endBg(@Valid @RequestBody ZjBgMasterLineSaveReqVO createReqVO) {
|
||||
return success(zjBgMasterLineService.updateBgMasterLines(createReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/validExceed")
|
||||
@Operation(summary = "获得过程检报工")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:bg-master-line:query')")
|
||||
public CommonResult<Boolean> validExceed(@RequestParam("id") Long id,@RequestParam("amount") Integer amount) {
|
||||
return success(zjBgMasterLineService.validExceed(id,amount));
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建终检报工")
|
||||
@ -69,7 +75,7 @@ public class ZjBgMasterLineController {
|
||||
@Operation(summary = "删除终检报工")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:delete')")
|
||||
public CommonResult<Boolean> deleteZjBgMasterLine(@RequestParam("id") Integer id) {
|
||||
public CommonResult<Boolean> deleteZjBgMasterLine(@RequestParam("id") Long id) {
|
||||
zjBgMasterLineService.deleteZjBgMasterLine(id);
|
||||
return success(true);
|
||||
}
|
||||
@ -78,7 +84,7 @@ public class ZjBgMasterLineController {
|
||||
@Operation(summary = "获得终检报工")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:query')")
|
||||
public CommonResult<ZjBgMasterLineRespVO> getZjBgMasterLine(@RequestParam("id") Integer id) {
|
||||
public CommonResult<ZjBgMasterLineRespVO> getZjBgMasterLine(@RequestParam("id") Long id) {
|
||||
ZjBgMasterLineDO zjBgMasterLine = zjBgMasterLineService.getZjBgMasterLine(id);
|
||||
return success(BeanUtils.toBean(zjBgMasterLine, ZjBgMasterLineRespVO.class));
|
||||
}
|
||||
|
@ -53,5 +53,14 @@ public class ZjBgMasterLineRespVO {
|
||||
@Schema(description = "报工人")
|
||||
@ExcelProperty("报工人")
|
||||
private String userName;
|
||||
private Integer isRepre;
|
||||
private Integer isQua;
|
||||
private String remark;
|
||||
private Integer notificationStatus;
|
||||
private Integer conStatus;
|
||||
private String auditOpinion;
|
||||
private Integer auditor;
|
||||
private LocalDateTime audit_time;
|
||||
private List<String> fileUrlList;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,37 +1,46 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
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
|
||||
public class ZjBgMasterLineSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24341")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "终检ID", example = "30462")
|
||||
private Integer zjId;
|
||||
|
||||
@Schema(description = "终检检明细id", example = "21667")
|
||||
private Integer zjMxId;
|
||||
|
||||
@Schema(description = "报工人")
|
||||
private String bgUser;
|
||||
|
||||
@Schema(description = "报工数量")
|
||||
private Integer amount;
|
||||
|
||||
@Schema(description = "报工时间")
|
||||
private LocalDateTime bgTime;
|
||||
|
||||
@Schema(description = "工时")
|
||||
private BigDecimal workTime;
|
||||
|
||||
}
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
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
|
||||
public class ZjBgMasterLineSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24341")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "终检ID", example = "30462")
|
||||
private Integer zjId;
|
||||
|
||||
@Schema(description = "终检检明细id", example = "21667")
|
||||
private Long zjMxId;
|
||||
|
||||
@Schema(description = "报工人")
|
||||
private String bgUser;
|
||||
|
||||
@Schema(description = "报工数量")
|
||||
private Integer amount;
|
||||
|
||||
@Schema(description = "报工时间")
|
||||
private LocalDateTime bgTime;
|
||||
|
||||
@Schema(description = "工时")
|
||||
private BigDecimal workTime;
|
||||
private Integer isRepre;
|
||||
private Integer isQua;
|
||||
private String remark;
|
||||
private Integer type;
|
||||
private String userName;
|
||||
private Integer notificationStatus;
|
||||
private Integer conStatus;
|
||||
private String auditOpinion;
|
||||
private Integer auditor;
|
||||
private LocalDateTime audit_time;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public class ZjPgMasterController {
|
||||
@PostMapping("/zfZjPgMaster")
|
||||
@Operation(summary = "作废终检派工单")
|
||||
@PreAuthorize("@ss.hasPermission('heli:zj-pg-master:create')")
|
||||
public CommonResult<Integer> zfZjPgMaster(@RequestParam("id") Integer id) {
|
||||
public CommonResult<Integer> zfZjPgMaster(@RequestParam("id") Long id) {
|
||||
return success(zjPgMasterService.zfZjPgMaster(id));
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ public class BgMasterLineDO extends BaseDO {
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
private Long id;
|
||||
/**
|
||||
* 过程检ID
|
||||
*/
|
||||
@ -36,7 +36,7 @@ public class BgMasterLineDO extends BaseDO {
|
||||
/**
|
||||
* 过程检明细id
|
||||
*/
|
||||
private Integer zjMxId;
|
||||
private Long zjMxId;
|
||||
/**
|
||||
* 报工人
|
||||
*/
|
||||
@ -60,5 +60,14 @@ public class BgMasterLineDO extends BaseDO {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userName;
|
||||
|
||||
}
|
||||
private Integer isRepre;
|
||||
private Integer isQua;
|
||||
private String remark;
|
||||
private Integer notificationStatus;
|
||||
private Integer conStatus;
|
||||
private String auditOpinion;
|
||||
private Integer auditor;
|
||||
private LocalDateTime audit_time;
|
||||
@TableField(exist = false)
|
||||
private List<String> fileUrlList;
|
||||
}
|
||||
|
@ -94,7 +94,6 @@ public class UnqualifiedNotificationDO extends BaseDO {
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String projectName;
|
||||
|
||||
@ -139,7 +138,10 @@ public class UnqualifiedNotificationDO extends BaseDO {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String creatorName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer totalAmount;
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
@TableField(exist = false)
|
||||
private String statisticAmount;
|
||||
@TableField(exist = false)
|
||||
|
@ -41,4 +41,5 @@ public class UnqualifiedNotificationFileDO extends BaseDO {
|
||||
private String fileName;
|
||||
private String filePath;
|
||||
private String fileUrl;
|
||||
private Integer type;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ public class ZjBgMasterLineDO extends BaseDO {
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
private Long id;
|
||||
/**
|
||||
* 终检ID
|
||||
*/
|
||||
@ -36,7 +36,7 @@ public class ZjBgMasterLineDO extends BaseDO {
|
||||
/**
|
||||
* 终检检明细id
|
||||
*/
|
||||
private Integer zjMxId;
|
||||
private Long zjMxId;
|
||||
/**
|
||||
* 报工人
|
||||
*/
|
||||
@ -61,6 +61,15 @@ public class ZjBgMasterLineDO extends BaseDO {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userName;
|
||||
private Integer isRepre;
|
||||
private Integer isQua;
|
||||
private String remark;
|
||||
private Integer notificationStatus;
|
||||
private Integer conStatus;
|
||||
private String auditOpinion;
|
||||
private Integer auditor;
|
||||
private LocalDateTime audit_time;
|
||||
@TableField(exist = false)
|
||||
private List<String> fileUrlList;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,8 @@ public interface BgMasterLineMapper extends BaseMapperX<BgMasterLineDO> {
|
||||
.select("u2.username as userName")
|
||||
.leftJoin("system_users u2 on u2.id = t.bg_user")
|
||||
;
|
||||
query.eq(BgMasterLineDO::getZjMxId, reqVO.getZjMxId());
|
||||
query.eq(BgMasterLineDO::getZjMxId, reqVO.getZjMxId())
|
||||
.orderByDesc(BgMasterLineDO::getId);
|
||||
return selectPage(reqVO, query);
|
||||
|
||||
|
||||
@ -46,7 +47,7 @@ public interface BgMasterLineMapper extends BaseMapperX<BgMasterLineDO> {
|
||||
.orderByDesc(BgMasterLineDO::getId))
|
||||
;*/
|
||||
}
|
||||
default BgMasterLineDO selectSum(Integer zjMxId) {
|
||||
default BgMasterLineDO selectSum(Long zjMxId) {
|
||||
MPJLambdaWrapper<BgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
query.select("SUM(t.amount) as amount ,SUM(t.work_time) as workTime");
|
||||
|
||||
@ -57,7 +58,19 @@ public interface BgMasterLineMapper extends BaseMapperX<BgMasterLineDO> {
|
||||
|
||||
return selectOne(query);
|
||||
}
|
||||
default BgMasterLineDO selectEnd(Integer zjMxId) {
|
||||
default BgMasterLineDO selectCountUn(Integer type) {
|
||||
MPJLambdaWrapper<BgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
query.select("count(1) as amount");
|
||||
|
||||
|
||||
query
|
||||
.eq(BgMasterLineDO::getNotificationStatus,type)
|
||||
|
||||
;
|
||||
|
||||
return selectOne(query);
|
||||
}
|
||||
default BgMasterLineDO selectEnd(Long zjMxId) {
|
||||
MPJLambdaWrapper<BgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
|
||||
@ -67,5 +80,15 @@ public interface BgMasterLineMapper extends BaseMapperX<BgMasterLineDO> {
|
||||
|
||||
return selectOne(query);
|
||||
}
|
||||
default BgMasterLineDO selectLast(Long zjMxId) {
|
||||
MPJLambdaWrapper<BgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
}
|
||||
|
||||
query.eq( BgMasterLineDO::getZjMxId, zjMxId)
|
||||
.orderByDesc(BgMasterLineDO::getId)
|
||||
.last("limit 1");
|
||||
;
|
||||
|
||||
return selectOne(query);
|
||||
}
|
||||
}
|
||||
|
@ -72,6 +72,13 @@ public interface UnqualifiedNotificationMapper extends BaseMapperX<UnqualifiedNo
|
||||
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
Long selectCountPageWx( @Param("queryType") Integer queryType,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("limit") Integer limit);
|
||||
|
||||
List<UnqualifiedNotificationDO> selectPageWx( @Param("queryType") Integer queryType,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("limit") Integer limit);
|
||||
|
||||
default UnqualifiedNotificationDO selectById(Long id) {
|
||||
MPJLambdaWrapper<UnqualifiedNotificationDO> query = new MPJLambdaWrapper<>();
|
||||
|
@ -18,9 +18,10 @@ import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface UnqualifiedNotificationFileMapper extends BaseMapperX<UnqualifiedNotificationFileDO> {
|
||||
default List<UnqualifiedNotificationFileDO> queryUnqualifiedNotificationFileBySuperId(Long unqualifiedId){
|
||||
default List<UnqualifiedNotificationFileDO> queryUnqualifiedNotificationFileBySuperId(Long unqualifiedId,Integer type){
|
||||
MPJLambdaWrapper<UnqualifiedNotificationFileDO> query = new MPJLambdaWrapper<>();
|
||||
query.eq(UnqualifiedNotificationFileDO::getUnqualifiedId,unqualifiedId);
|
||||
query.eq(UnqualifiedNotificationFileDO::getUnqualifiedId,unqualifiedId)
|
||||
.eq(UnqualifiedNotificationFileDO::getType,type);
|
||||
return selectList(query);
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public interface ZjBgMasterLineMapper extends BaseMapperX<ZjBgMasterLineDO> {
|
||||
.orderByDesc(ZjBgMasterLineDO::getId));*/
|
||||
}
|
||||
|
||||
default ZjBgMasterLineDO selectSum(Integer zjMxId) {
|
||||
default ZjBgMasterLineDO selectSum(Long zjMxId) {
|
||||
MPJLambdaWrapper<ZjBgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
query.select("SUM(t.amount) as amount ,SUM(t.work_time) as workTime");
|
||||
|
||||
@ -54,15 +54,25 @@ public interface ZjBgMasterLineMapper extends BaseMapperX<ZjBgMasterLineDO> {
|
||||
return selectOne(query);
|
||||
}
|
||||
|
||||
default ZjBgMasterLineDO selectEnd(Integer zjMxId) {
|
||||
default ZjBgMasterLineDO selectEnd(Long zjMxId) {
|
||||
MPJLambdaWrapper<ZjBgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
|
||||
query.eq( BgMasterLineDO::getZjMxId, zjMxId)
|
||||
.isNull(BgMasterLineDO::getAmount)
|
||||
query.eq( ZjBgMasterLineDO::getZjMxId, zjMxId)
|
||||
.isNull(ZjBgMasterLineDO::getAmount)
|
||||
;
|
||||
|
||||
return selectOne(query);
|
||||
}
|
||||
default ZjBgMasterLineDO selectLast(Long zjMxId) {
|
||||
MPJLambdaWrapper<ZjBgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
}
|
||||
|
||||
query.eq( BgMasterLineDO::getZjMxId, zjMxId)
|
||||
.orderByDesc(ZjBgMasterLineDO::getId)
|
||||
.last("limit 1");
|
||||
;
|
||||
|
||||
return selectOne(query);
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public interface BgMasterLineService {
|
||||
* @return 过程检报工
|
||||
*/
|
||||
BgMasterLineDO getBgMasterLine(Integer id);
|
||||
|
||||
public boolean validExceed(Long zjmxId,Integer amount);
|
||||
/**
|
||||
* 获得过程检报工分页
|
||||
*
|
||||
|
@ -1,14 +1,18 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.bgmasterline;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.pgmaster.PgMasterDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.pgmaster.PgMasterLineDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.unqualifiednotification.UnqualifiedNotificationDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.unqualifiednotificationfile.UnqualifiedNotificationFileDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.pgmaster.PgMasterLineMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.pgmaster.PgMasterMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.service.unqualifiednotificationfile.UnqualifiedNotificationFileService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -43,39 +47,65 @@ public class BgMasterLineServiceImpl implements BgMasterLineService {
|
||||
private PgMasterLineMapper pgMasterLineMapper;
|
||||
@Resource
|
||||
private TaskDispatchDetailMapper taskDispatchDetailMapper;
|
||||
@Resource
|
||||
private UnqualifiedNotificationFileService unqualifiedNotificationFileService;
|
||||
|
||||
|
||||
//结束本次报工
|
||||
@Override
|
||||
public Integer updateBgMasterLines(BgMasterLineSaveReqVO createReqVO){
|
||||
if(createReqVO.getAmount() == null || createReqVO.getWorkTime() == null){
|
||||
throw exception(TASK_REPORT_PARAMS_ERROR);
|
||||
}
|
||||
|
||||
public boolean validExceed(Long zjmxId,Integer amount){
|
||||
//先取出总的派工数量和预计工时
|
||||
PgMasterLineDO pgMasterLineDO = pgMasterLineMapper.selectById(createReqVO.getZjMxId());
|
||||
PgMasterLineDO pgMasterLineDO = pgMasterLineMapper.selectById(zjmxId);
|
||||
//然后再取出这条ID明细ID下的所有工时和报工数量相加
|
||||
BgMasterLineDO bgMasterLineDO = bgMasterLineMapper.selectSum(createReqVO.getZjMxId());
|
||||
BgMasterLineDO bgMasterLineDO = bgMasterLineMapper.selectSum(zjmxId);
|
||||
//然后加上用户传入的当前的工时和查出的工时进行相加,进行判断
|
||||
int value1 = 0;
|
||||
if(bgMasterLineDO!=null){
|
||||
//然后加上用户传入的当前的工时和查出的工时进行相加,进行判断
|
||||
value1 = bgMasterLineDO.getAmount()+createReqVO.getAmount();
|
||||
value1 = bgMasterLineDO.getAmount()+amount;
|
||||
}else{
|
||||
value1 = createReqVO.getAmount();
|
||||
value1 = amount;
|
||||
}
|
||||
//先判断报工数量是否大于派工数量
|
||||
if(value1>pgMasterLineDO.getAmount()){
|
||||
//这个地方返回错误:报工数量不允许超过派工数量请检查
|
||||
throw exception(TASK_REPORT_PARAMS_ERRORS);
|
||||
}else{
|
||||
return value1>pgMasterLineDO.getAmount();
|
||||
}
|
||||
|
||||
//结束本次报工
|
||||
@Override
|
||||
public Integer updateBgMasterLines(BgMasterLineSaveReqVO createReqVO){
|
||||
//非结束时判断
|
||||
if (createReqVO.getType() != null && createReqVO.getType() != 0){
|
||||
if(createReqVO.getAmount() == null || createReqVO.getWorkTime() == null){
|
||||
throw exception(TASK_REPORT_PARAMS_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// //先取出总的派工数量和预计工时
|
||||
PgMasterLineDO pgMasterLineDO = pgMasterLineMapper.selectById(createReqVO.getZjMxId());
|
||||
// //然后再取出这条ID明细ID下的所有工时和报工数量相加
|
||||
// BgMasterLineDO bgMasterLineDO = bgMasterLineMapper.selectSum(createReqVO.getZjMxId());
|
||||
// //然后加上用户传入的当前的工时和查出的工时进行相加,进行判断
|
||||
// int value1 = 0;
|
||||
// if(bgMasterLineDO!=null){
|
||||
// //然后加上用户传入的当前的工时和查出的工时进行相加,进行判断
|
||||
// value1 = bgMasterLineDO.getAmount()+createReqVO.getAmount();
|
||||
// }else{
|
||||
// value1 = createReqVO.getAmount();
|
||||
// }
|
||||
// //先判断报工数量是否大于派工数量
|
||||
// if(value1>pgMasterLineDO.getAmount()){
|
||||
// //这个地方返回错误:报工数量不允许超过派工数量请检查
|
||||
// throw exception(TASK_REPORT_PARAMS_ERRORS);
|
||||
// }else{
|
||||
//取出本派工单在报工明细中,有没有报
|
||||
BgMasterLineDO bgMasterLineDOs = bgMasterLineMapper.selectEnd(createReqVO.getZjMxId());
|
||||
if (createReqVO.getType() != null && createReqVO.getType() == 0){
|
||||
bgMasterLineDOs = bgMasterLineMapper.selectLast(createReqVO.getZjMxId());
|
||||
}
|
||||
//判断报工user是否相等
|
||||
if(bgMasterLineDOs.getBgUser().equals(createReqVO.getBgUser())){
|
||||
//相同时判断报工数量和派工数量是否相等,相等设置为设置报工状态为1 已完成
|
||||
LocalDateTime currentDateTime = LocalDateTime.now();
|
||||
if(value1 == pgMasterLineDO.getAmount()){
|
||||
if(createReqVO.getType() != null && createReqVO.getType() == 0){
|
||||
//这个地方跟定是否完成状态
|
||||
pgMasterLineDO.setPgType(1);
|
||||
pgMasterLineDO.setDetilUser(Long.parseLong(createReqVO.getBgUser()));
|
||||
@ -86,44 +116,34 @@ public class BgMasterLineServiceImpl implements BgMasterLineService {
|
||||
LambdaUpdateWrapper<TaskDispatchDetailDO> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.eq(TaskDispatchDetailDO::getId,pgMasterLineDO.getDispatchDetailId());
|
||||
wrapper.set(TaskDispatchDetailDO::getTestYn,"Y");
|
||||
taskDispatchDetailMapper.update(wrapper);
|
||||
// TaskDispatchDetailDO taskDispatchDetailDO = taskDispatchDetailMapper.selectById(pgMasterLineDO.getDispatchDetailId());
|
||||
// if (ObjectUtil.isNotEmpty(taskDispatchDetailDO)){
|
||||
// LambdaQueryWrapper<TaskDispatchDetailDO> wrapper1 = new LambdaQueryWrapper<>();
|
||||
// wrapper1.eq(TaskDispatchDetailDO::getDispatchId, taskDispatchDetailDO.getDispatchId());
|
||||
// wrapper1.gt(TaskDispatchDetailDO::getSort, taskDispatchDetailDO.getSort());
|
||||
// wrapper1.eq(TaskDispatchDetailDO::getReportStatus, 0);
|
||||
// wrapper1.eq(TaskDispatchDetailDO::getDeleted, 0);
|
||||
// wrapper1.orderByAsc(TaskDispatchDetailDO::getSort);
|
||||
// wrapper1.last("limit 1");
|
||||
// TaskDispatchDetailDO nextTaskDispatchDetailDO = taskDispatchDetailMapper.selectOne(wrapper1);
|
||||
// if (ObjectUtil.isNotEmpty(nextTaskDispatchDetailDO)){
|
||||
// nextTaskDispatchDetailDO.setReportStatus(1);
|
||||
// taskDispatchDetailMapper.updateById(nextTaskDispatchDetailDO);
|
||||
// }
|
||||
// }
|
||||
return taskDispatchDetailMapper.update(wrapper);
|
||||
|
||||
}else{
|
||||
//不相等时只更新当前报工状态
|
||||
pgMasterLineDO.setActive("END");
|
||||
pgMasterLineDO.setEntTime(currentDateTime);
|
||||
pgMasterLineMapper.updateById(pgMasterLineDO);
|
||||
}
|
||||
//更新报工信息
|
||||
//结束时间
|
||||
bgMasterLineDOs.setEntTime(currentDateTime);
|
||||
//报工工时
|
||||
bgMasterLineDOs.setWorkTime(createReqVO.getWorkTime());
|
||||
//报工数量
|
||||
bgMasterLineDOs.setAmount(createReqVO.getAmount());
|
||||
//更新报工信息
|
||||
//结束时间
|
||||
bgMasterLineDOs.setEntTime(currentDateTime);
|
||||
//报工工时
|
||||
bgMasterLineDOs.setWorkTime(createReqVO.getWorkTime());
|
||||
bgMasterLineDOs.setIsQua(createReqVO.getIsQua()==null ?null :createReqVO.getIsQua());
|
||||
bgMasterLineDOs.setIsRepre(createReqVO.getIsRepre()==null ?null :createReqVO.getIsRepre());
|
||||
bgMasterLineDOs.setRemark(createReqVO.getRemark()!=null && !createReqVO.getRemark().trim().equals("")?createReqVO.getRemark() :null);
|
||||
|
||||
bgMasterLineDOs.setNotificationStatus(1);
|
||||
//报工数量
|
||||
bgMasterLineDOs.setAmount(createReqVO.getAmount());
|
||||
return bgMasterLineMapper.updateById(bgMasterLineDOs);
|
||||
}
|
||||
|
||||
return bgMasterLineMapper.updateById(bgMasterLineDOs);
|
||||
}else{
|
||||
//当创建人和报工人不一样时返回报错,不允许用户报工
|
||||
throw exception(TASK_REPORT_PARAMS_ERRORBG);
|
||||
}
|
||||
//
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -179,7 +199,21 @@ public class BgMasterLineServiceImpl implements BgMasterLineService {
|
||||
|
||||
@Override
|
||||
public PageResult<BgMasterLineDO> getBgMasterLinePage(BgMasterLinePageReqVO pageReqVO) {
|
||||
return bgMasterLineMapper.selectPage(pageReqVO);
|
||||
PageResult<BgMasterLineDO> pageResult = bgMasterLineMapper.selectPage(pageReqVO);
|
||||
List<BgMasterLineDO> list = pageResult.getList();
|
||||
if(CollUtil.isNotEmpty(list)){
|
||||
for (BgMasterLineDO bgMasterLineDO : list) {
|
||||
List<String> fileUrlList = new ArrayList<>();
|
||||
List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(bgMasterLineDO.getId(),1);
|
||||
if(CollUtil.isNotEmpty(unqualifiedNotificationFileDOS)){
|
||||
for (UnqualifiedNotificationFileDO unqualifiedNotificationFileDO : unqualifiedNotificationFileDOS) {
|
||||
fileUrlList.add(unqualifiedNotificationFileDO.getFileUrl());
|
||||
}
|
||||
bgMasterLineDO.setFileUrlList(fileUrlList);
|
||||
}
|
||||
}
|
||||
}
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ public interface PgMasterService {
|
||||
* @param id 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer zfPgMaster(Integer id);
|
||||
Integer zfPgMaster(Long id);
|
||||
/**
|
||||
* 创建质量过程检派工单主
|
||||
*
|
||||
|
@ -164,7 +164,7 @@ public class PgMasterServiceImpl implements PgMasterService {
|
||||
|
||||
|
||||
@Override
|
||||
public Integer zfPgMaster(Integer id) {
|
||||
public Integer zfPgMaster(Long id) {
|
||||
|
||||
//作废先判断是否已经报工
|
||||
BgMasterLineDO bgMasterLineDO = bgMasterLineMapper.selectSum(id);
|
||||
|
@ -5,6 +5,8 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.unqualifiednotification.UnqualifiedNotificationDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 品质异常通知单审核 Service 接口
|
||||
*
|
||||
@ -49,6 +51,7 @@ public interface UnqualifiedNotificationService {
|
||||
* @return 品质异常通知单审核分页
|
||||
*/
|
||||
PageResult<UnqualifiedNotificationDO> getUnqualifiedNotificationPage(UnqualifiedNotificationPageReqVO pageReqVO);
|
||||
PageResult<UnqualifiedNotificationDO> getUnqualifiedNotificationPageWx(UnqualifiedNotificationPageReqVO pageReqVO);
|
||||
|
||||
void operate(UnqualifiedNotificationSaveReqVO operateReqVO);
|
||||
|
||||
|
@ -3,6 +3,7 @@ package com.chanko.yunxi.mes.module.heli.service.unqualifiednotification;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.QualityStatistics;
|
||||
@ -10,11 +11,15 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationSaveReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bgmasterline.BgMasterLineDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumberDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.unqualifiednotification.UnqualifiedNotificationDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.unqualifiednotificationfile.UnqualifiedNotificationFileDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjbgmasterline.ZjBgMasterLineDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.bgmasterline.BgMasterLineMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.unqualifiednotification.UnqualifiedNotificationMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.zjbgmasterline.ZjBgMasterLineMapper;
|
||||
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;
|
||||
@ -55,7 +60,10 @@ public class UnqualifiedNotificationServiceImpl implements UnqualifiedNotificati
|
||||
private com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper bdgzsomthingMapper;
|
||||
@Resource
|
||||
private AttentiontodoMapper attentiontodoMapper;
|
||||
|
||||
@Resource
|
||||
private ZjBgMasterLineMapper zjBgMasterLineMapper;
|
||||
@Resource
|
||||
private BgMasterLineMapper bgMasterLineMapper;
|
||||
@Resource
|
||||
private UnqualifiedNotificationMapper unqualifiedNotificationMapper;
|
||||
@Resource
|
||||
@ -196,7 +204,7 @@ try {
|
||||
@Override
|
||||
public UnqualifiedNotificationDO getUnqualifiedNotification(Long id) {
|
||||
UnqualifiedNotificationDO unqualifiedNotificationDO = unqualifiedNotificationMapper.selectById(id);
|
||||
List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(unqualifiedNotificationDO.getId());
|
||||
List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(unqualifiedNotificationDO.getId(),0);
|
||||
List<String> fileUrlList = unqualifiedNotificationFileDOS.stream()
|
||||
.map(UnqualifiedNotificationFileDO::getFileUrl)
|
||||
.collect(Collectors.toList());
|
||||
@ -208,7 +216,19 @@ try {
|
||||
public PageResult<UnqualifiedNotificationDO> getUnqualifiedNotificationPage(UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||
return unqualifiedNotificationMapper.selectPage(pageReqVO);
|
||||
}
|
||||
@Override
|
||||
public PageResult<UnqualifiedNotificationDO> getUnqualifiedNotificationPageWx(UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||
PageResult<UnqualifiedNotificationDO> pageResult = new PageResult<>();
|
||||
Long total = unqualifiedNotificationMapper.selectCountPageWx(pageReqVO.getQueryType(), pageReqVO.getPageNum(), pageReqVO.getPageSize());
|
||||
|
||||
pageResult.setTotal(total);
|
||||
if (total > 0L){
|
||||
pageResult.setTotalPages(total.intValue()/ pageReqVO.getPageSize());
|
||||
}
|
||||
List<UnqualifiedNotificationDO> unqualifiedNotificationDOS = unqualifiedNotificationMapper.selectPageWx(pageReqVO.getQueryType(), pageReqVO.getPageNum(), pageReqVO.getPageSize());
|
||||
pageResult.setList(unqualifiedNotificationDOS);
|
||||
return pageResult;
|
||||
}
|
||||
@Override
|
||||
public void operate(UnqualifiedNotificationSaveReqVO operateReqVO) {
|
||||
if(operateReqVO.getId() == null){
|
||||
|
@ -21,7 +21,7 @@ public interface UnqualifiedNotificationFileService {
|
||||
|
||||
int createUnqualifiedNotificationFile(@Valid UnqualifiedNotificationFileDO unqualifiedNotificationFileDO);
|
||||
// void updateUnqualifiedNotificationFile(@Valid UnqualifiedNotificationFileDO unqualifiedNotificationFileDO);
|
||||
List<UnqualifiedNotificationFileDO> queryUnqualifiedNotificationFileBySuperId(@Valid Long unqualificationId);
|
||||
List<UnqualifiedNotificationFileDO> queryUnqualifiedNotificationFileBySuperId(@Valid Long unqualificationId,Integer type);
|
||||
/**
|
||||
* 删除品质异常通知单审核
|
||||
*
|
||||
|
@ -33,8 +33,8 @@ public class UnqualifiedNotificationFileServiceImpl implements UnqualifiedNotifi
|
||||
// }
|
||||
|
||||
@Override
|
||||
public List<UnqualifiedNotificationFileDO> queryUnqualifiedNotificationFileBySuperId(Long unqualificationId) {
|
||||
return unqualifiedNotificationFileMapper.queryUnqualifiedNotificationFileBySuperId(unqualificationId);
|
||||
public List<UnqualifiedNotificationFileDO> queryUnqualifiedNotificationFileBySuperId(Long unqualificationId,Integer type) {
|
||||
return unqualifiedNotificationFileMapper.queryUnqualifiedNotificationFileBySuperId(unqualificationId,type);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -22,7 +22,7 @@ public interface ZjBgMasterLineService {
|
||||
* @return 编号
|
||||
*/
|
||||
Integer updateBgMasterLines(@Valid ZjBgMasterLineSaveReqVO createReqVO);
|
||||
|
||||
public boolean validExceed(Long zjmxId,Integer amount);
|
||||
|
||||
/**
|
||||
* 创建终检报工
|
||||
@ -44,7 +44,7 @@ public interface ZjBgMasterLineService {
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteZjBgMasterLine(Integer id);
|
||||
void deleteZjBgMasterLine(Long id);
|
||||
|
||||
/**
|
||||
* 获得终检报工
|
||||
@ -52,7 +52,7 @@ public interface ZjBgMasterLineService {
|
||||
* @param id 编号
|
||||
* @return 终检报工
|
||||
*/
|
||||
ZjBgMasterLineDO getZjBgMasterLine(Integer id);
|
||||
ZjBgMasterLineDO getZjBgMasterLine(Long id);
|
||||
|
||||
/**
|
||||
* 获得终检报工分页
|
||||
|
@ -1,12 +1,15 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.zjbgmasterline;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.bgmasterline.vo.BgMasterLineSaveReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bgmasterline.BgMasterLineDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.pgmaster.PgMasterLineDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.unqualifiednotificationfile.UnqualifiedNotificationFileDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjpgmaster.ZjPgMasterDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjpgmaster.ZjPgMasterLineDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.zjpgmaster.ZjPgMasterLineMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.zjpgmaster.ZjPgMasterMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.service.unqualifiednotificationfile.UnqualifiedNotificationFileService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -43,46 +46,53 @@ public class ZjBgMasterLineServiceImpl implements ZjBgMasterLineService {
|
||||
@Resource
|
||||
private ZjPgMasterLineMapper zjPgMasterLineMapper;
|
||||
|
||||
|
||||
|
||||
@Resource
|
||||
private UnqualifiedNotificationFileService unqualifiedNotificationFileService;
|
||||
@Override
|
||||
public boolean validExceed(Long zjmxId,Integer amount){
|
||||
//先取出总的派工数量和预计工时
|
||||
ZjPgMasterLineDO zjPgMasterLineDO = zjPgMasterLineMapper.selectById(zjmxId);
|
||||
//然后再取出这条ID明细ID下的所有工时和报工数量相加
|
||||
ZjBgMasterLineDO zjBgMasterLineDO = zjBgMasterLineMapper.selectSum(zjmxId);
|
||||
//然后加上用户传入的当前的工时和查出的工时进行相加,进行判断
|
||||
int value1 = 0;
|
||||
if(zjBgMasterLineDO!=null){
|
||||
//然后加上用户传入的当前的工时和查出的工时进行相加,进行判断
|
||||
value1 = zjBgMasterLineDO.getAmount()+amount;
|
||||
}else{
|
||||
value1 = amount;
|
||||
}
|
||||
return value1>zjPgMasterLineDO.getAmount();
|
||||
}
|
||||
|
||||
|
||||
//结束本次报工
|
||||
@Override
|
||||
public Integer updateBgMasterLines(ZjBgMasterLineSaveReqVO createReqVO){
|
||||
if(createReqVO.getAmount() == null || createReqVO.getWorkTime() == null){
|
||||
throw exception(TASK_REPORT_PARAMS_ERROR);
|
||||
if (createReqVO.getType() != null && createReqVO.getType() != 0){
|
||||
if(createReqVO.getAmount() == null || createReqVO.getWorkTime() == null){
|
||||
throw exception(TASK_REPORT_PARAMS_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
//先取出总的派工数量和预计工时
|
||||
ZjPgMasterLineDO zjPgMasterLineDO = zjPgMasterLineMapper.selectById(createReqVO.getZjMxId());
|
||||
//然后再取出这条ID明细ID下的所有工时和报工数量相加
|
||||
ZjBgMasterLineDO zjBgMasterLineDO = zjBgMasterLineMapper.selectSum(createReqVO.getZjMxId());
|
||||
//然后加上用户传入的当前的工时和查出的工时进行相加,进行判断
|
||||
int value1 = 0;
|
||||
if(zjBgMasterLineDO!=null){
|
||||
//然后加上用户传入的当前的工时和查出的工时进行相加,进行判断
|
||||
value1 = zjBgMasterLineDO.getAmount()+createReqVO.getAmount();
|
||||
}else{
|
||||
value1 = createReqVO.getAmount();
|
||||
}
|
||||
//先判断报工数量是否大于派工数量
|
||||
if(value1>zjPgMasterLineDO.getAmount()){
|
||||
//这个地方返回错误:报工数量不允许超过派工数量请检查
|
||||
throw exception(TASK_REPORT_PARAMS_ERRORS);
|
||||
}else{
|
||||
//取出本派工单在报工明细中,有没有报
|
||||
ZjBgMasterLineDO zjBgMasterLineDO1 = zjBgMasterLineMapper.selectEnd(createReqVO.getZjMxId());
|
||||
if (createReqVO.getType() != null && createReqVO.getType() == 0){
|
||||
zjBgMasterLineDO1 = zjBgMasterLineMapper.selectLast(createReqVO.getZjMxId());
|
||||
}
|
||||
//判断报工user是否相等
|
||||
if(zjBgMasterLineDO1.getBgUser().equals(createReqVO.getBgUser())){
|
||||
//相同时判断报工数量和派工数量是否相等,相等设置为设置报工状态为1 已完成
|
||||
LocalDateTime currentDateTime = LocalDateTime.now();
|
||||
if(value1 == zjPgMasterLineDO.getAmount()){
|
||||
if(createReqVO.getType() != null && createReqVO.getType() == 0){
|
||||
//这个地方跟定是否完成状态
|
||||
zjPgMasterLineDO.setPgType(1);
|
||||
zjPgMasterLineDO.setDetilUser(Long.parseLong(createReqVO.getBgUser()));
|
||||
zjPgMasterLineDO.setActive("END");
|
||||
zjPgMasterLineDO.setEntTime(currentDateTime);
|
||||
zjPgMasterLineMapper.updateById(zjPgMasterLineDO);
|
||||
return zjPgMasterLineMapper.updateById(zjPgMasterLineDO);
|
||||
//更新工时
|
||||
|
||||
}else{
|
||||
@ -90,22 +100,23 @@ public class ZjBgMasterLineServiceImpl implements ZjBgMasterLineService {
|
||||
zjPgMasterLineDO.setActive("END");
|
||||
zjPgMasterLineDO.setEntTime(currentDateTime);
|
||||
zjPgMasterLineMapper.updateById(zjPgMasterLineDO);
|
||||
//更新报工信息
|
||||
//结束时间
|
||||
zjBgMasterLineDO1.setEntTime(currentDateTime);
|
||||
//报工工时
|
||||
zjBgMasterLineDO1.setWorkTime(createReqVO.getWorkTime());
|
||||
//报工数量
|
||||
zjBgMasterLineDO1.setAmount(createReqVO.getAmount());
|
||||
zjBgMasterLineDO1.setIsQua(createReqVO.getIsQua()==null ?null :createReqVO.getIsQua());
|
||||
zjBgMasterLineDO1.setIsRepre(createReqVO.getIsRepre()==null ?null :createReqVO.getIsRepre());
|
||||
zjBgMasterLineDO1.setRemark(createReqVO.getRemark()!=null && !createReqVO.getRemark().trim().equals("")?createReqVO.getRemark() :null);
|
||||
zjBgMasterLineDO1.setNotificationStatus(1);
|
||||
return zjBgMasterLineMapper.updateById(zjBgMasterLineDO1);
|
||||
}
|
||||
//更新报工信息
|
||||
//结束时间
|
||||
zjBgMasterLineDO1.setEntTime(currentDateTime);
|
||||
//报工工时
|
||||
zjBgMasterLineDO1.setWorkTime(createReqVO.getWorkTime());
|
||||
//报工数量
|
||||
zjBgMasterLineDO1.setAmount(createReqVO.getAmount());
|
||||
|
||||
return zjBgMasterLineMapper.updateById(zjBgMasterLineDO1);
|
||||
}else{
|
||||
//当创建人和报工人不一样时返回报错,不允许用户报工
|
||||
throw exception(TASK_REPORT_PARAMS_ERRORBG);
|
||||
}
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -187,27 +198,41 @@ public class ZjBgMasterLineServiceImpl implements ZjBgMasterLineService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteZjBgMasterLine(Integer id) {
|
||||
public void deleteZjBgMasterLine(Long id) {
|
||||
// 校验存在
|
||||
validateZjBgMasterLineExists(id);
|
||||
// 删除
|
||||
zjBgMasterLineMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateZjBgMasterLineExists(Integer id) {
|
||||
private void validateZjBgMasterLineExists(Long id) {
|
||||
if (zjBgMasterLineMapper.selectById(id) == null) {
|
||||
throw exception(ZJ_BG_MASTER_LINE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZjBgMasterLineDO getZjBgMasterLine(Integer id) {
|
||||
public ZjBgMasterLineDO getZjBgMasterLine(Long id) {
|
||||
return zjBgMasterLineMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ZjBgMasterLineDO> getZjBgMasterLinePage(ZjBgMasterLinePageReqVO pageReqVO) {
|
||||
return zjBgMasterLineMapper.selectPage(pageReqVO);
|
||||
PageResult<ZjBgMasterLineDO> pageResult = zjBgMasterLineMapper.selectPage(pageReqVO);
|
||||
List<ZjBgMasterLineDO> list = pageResult.getList();
|
||||
if(CollUtil.isNotEmpty(list)){
|
||||
for (ZjBgMasterLineDO bgMasterLineDO : list) {
|
||||
List<String> fileUrlList = new ArrayList<>();
|
||||
List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(bgMasterLineDO.getId(),1);
|
||||
if(CollUtil.isNotEmpty(unqualifiedNotificationFileDOS)){
|
||||
for (UnqualifiedNotificationFileDO unqualifiedNotificationFileDO : unqualifiedNotificationFileDOS) {
|
||||
fileUrlList.add(unqualifiedNotificationFileDO.getFileUrl());
|
||||
}
|
||||
bgMasterLineDO.setFileUrlList(fileUrlList);
|
||||
}
|
||||
}
|
||||
}
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public interface ZjPgMasterService {
|
||||
* @param createReqVO 作废
|
||||
* @return 编号
|
||||
*/
|
||||
Integer zfZjPgMaster(Integer id);
|
||||
Integer zfZjPgMaster(Long id);
|
||||
/**
|
||||
* 创建质量终检派工单主
|
||||
*
|
||||
|
@ -208,7 +208,7 @@ public class ZjPgMasterServiceImpl implements ZjPgMasterService {
|
||||
|
||||
|
||||
@Override
|
||||
public Integer zfZjPgMaster(Integer id) {
|
||||
public Integer zfZjPgMaster(Long id) {
|
||||
//作废先判断是否已经报工
|
||||
ZjBgMasterLineDO zjBgMasterLineDOS = zjBgMasterLineMapper.selectSum(id);
|
||||
|
||||
|
@ -108,4 +108,67 @@
|
||||
</if>
|
||||
order by t.createTime desc
|
||||
</select>
|
||||
</mapper>
|
||||
<select id="selectCountPageWx" parameterType="java.lang.Integer" resultType="java.lang.Long">
|
||||
SELECT count(gh.*)
|
||||
FROM (
|
||||
SELECT t.id as id, g.pg_number as code, g.project_sub_name as projectSubName,
|
||||
t.amount as amount, g.amount as totalAmount, '过程检' as typeName,
|
||||
t.ent_time as createTime,u.nickname as creatorName,g.project_sub_number as projectSubCode,
|
||||
g.project_name as projectName ,g.material_name as materialName,
|
||||
g.blueprint_no as blueprintNo, pr1.name as procedureName
|
||||
FROM quality_bg_master_line t
|
||||
LEFT JOIN quality_pg_master_line g ON t.zj_mx_id = g.id
|
||||
LEFT JOIN base_procedure pr1 ON pr1.id = g.procedure_id
|
||||
left join system_users u on u.id = t.bg_user
|
||||
WHERE t.deleted = 0 AND t.tenant_id = 2 AND g.deleted = 0 AND g.tenant_id = 2
|
||||
AND pr1.deleted = 0 AND pr1.tenant_id = 2
|
||||
AND t.notification_status = #{queryType}
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT zj.id as id, g1.pg_number as code, g1.project_sub_name as projectSubName,
|
||||
zj.amount as amount, g1.amount as totalAmount, '终检' as typeName,
|
||||
zj.ent_time as createTime,u1.nickname as creatorName,g1.project_sub_number as projectSubCode,
|
||||
g1.project_name as projectName , '' as materialName, '' as blueprintNo, '' as procedureName
|
||||
FROM quality_zj_bg_master_line zj
|
||||
LEFT JOIN quality_zj_pg_master_line g1 ON zj.zj_mx_id = g1.id
|
||||
left join system_users u1 on u1.id = zj.bg_user
|
||||
WHERE zj.deleted = 0 AND zj.tenant_id = 2 AND g1.deleted = 0 AND g1.tenant_id = 2
|
||||
AND zj.notification_status = #{queryType}
|
||||
) gh
|
||||
</select>
|
||||
<select id="selectPageWx" parameterType="java.lang.Integer" resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.unqualifiednotification.UnqualifiedNotificationDO">
|
||||
SELECT gh.id as id, gh.code as code, gh.projectSubName as projectSubName,
|
||||
gh.amount as amount, gh.totalAmount as totalAmount, gh.typeName as typeName,
|
||||
gh.createTime as createTime,gh.creatorName as creatorName,gh.projectSubCode as projectSubCode,
|
||||
gh.projectName as projectName, gh.materialName as materialName,
|
||||
gh.blueprintNo as blueprintNo, gh.procedureName as procedureName
|
||||
FROM (
|
||||
SELECT t.id as id, g.pg_number as code, g.project_sub_name as projectSubName,
|
||||
t.amount as amount, g.amount as totalAmount, '过程检' as typeName,
|
||||
t.ent_time as createTime,u.nickname as creatorName,g.project_sub_number as projectSubCode,
|
||||
g.project_name as projectName ,g.material_name as materialName,
|
||||
g.blueprint_no as blueprintNo, pr1.name as procedureName
|
||||
FROM quality_bg_master_line t
|
||||
LEFT JOIN quality_pg_master_line g ON t.zj_mx_id = g.id
|
||||
LEFT JOIN base_procedure pr1 ON pr1.id = g.procedure_id
|
||||
left join system_users u on u.id = t.bg_user
|
||||
WHERE t.deleted = 0 AND t.tenant_id = 2 AND g.deleted = 0 AND g.tenant_id = 2
|
||||
AND pr1.deleted = 0 AND pr1.tenant_id = 2
|
||||
AND t.notification_status = #{queryType}
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT zj.id as id, g1.pg_number as code, g1.project_sub_name as projectSubName,
|
||||
zj.amount as amount, g1.amount as totalAmount, '终检' as typeName,
|
||||
zj.ent_time as createTime,u1.nickname as creatorName,g1.project_sub_number as projectSubCode,
|
||||
g1.project_name as projectName , '' as materialName, '' as blueprintNo, '' as procedureName
|
||||
FROM quality_zj_bg_master_line zj
|
||||
LEFT JOIN quality_zj_pg_master_line g1 ON zj.zj_mx_id = g1.id
|
||||
left join system_users u1 on u1.id = zj.bg_user
|
||||
WHERE zj.deleted = 0 AND zj.tenant_id = 2 AND g1.deleted = 0 AND g1.tenant_id = 2
|
||||
AND zj.notification_status = #{queryType}
|
||||
) gh
|
||||
ORDER BY gh.createTime DESC LIMIT #{offset}, #{limit}
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -96,6 +96,12 @@
|
||||
"navigationBarTitleText": "过程检报工"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/pgMaster/components/showpicture",
|
||||
"style": {
|
||||
"navigationBarTitleText": "过程检图片"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/pgMaster/pgMaster-detail",
|
||||
"style": {
|
||||
@ -104,7 +110,7 @@
|
||||
},{
|
||||
"path": "pages/moJuSheJiReport/moJuSheJiReport",
|
||||
"style": {
|
||||
"navigationBarTitleText": "进度上报"
|
||||
"navigationBarTitleText": "进度上报"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -136,7 +142,7 @@
|
||||
},
|
||||
{
|
||||
"path" : "pages/messageNotification/messageNotification",
|
||||
"style" :
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "消息通知"
|
||||
}
|
||||
|
@ -120,10 +120,10 @@ if (historyList.value.length) {
|
||||
id,
|
||||
}
|
||||
const data = await getTaskDetailAPI(params)
|
||||
if (data.beforeProcedureStatus == 0) {
|
||||
//如果上一道工序没结束
|
||||
isOverBeforeProcedure.value = true;
|
||||
}
|
||||
// if (data.beforeProcedureStatus == 0) {
|
||||
// //如果上一道工序没结束
|
||||
// isOverBeforeProcedure.value = true;
|
||||
// }
|
||||
data.startTime = formatDate(data.startTime, 'YYYY-MM-DD HH:mm');
|
||||
data.endTime = formatDate(data.endTime, 'YYYY-MM-DD HH:mm'); // 去掉了末尾的空格
|
||||
|
||||
@ -162,16 +162,13 @@ if (historyList.value.length) {
|
||||
try {
|
||||
const data = await postOperateAPI(params);
|
||||
console.log(data)
|
||||
console.log('ai')
|
||||
} catch (error) {
|
||||
console.log('meijinlai ')
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
duration: 3000,
|
||||
title: error.data.msg,
|
||||
})
|
||||
} finally {
|
||||
console.log('jie')
|
||||
await getDetailData(detailInfo.value.id)
|
||||
await getData()
|
||||
const obj = historyList.value[0]
|
||||
@ -195,7 +192,7 @@ if (historyList.value.length) {
|
||||
workTime: workTime.value,
|
||||
}
|
||||
const data = await postOperateAPI(params)
|
||||
const pages = getCurrentPages(); // 获取当前页面栈
|
||||
const pages = getCurrentPages(); // 获取当前页面栈
|
||||
const currentPage = pages[pages.length - 1]; // 当前页面
|
||||
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
|
||||
uni.reLaunch({ url }); // 重新加载当前页面
|
||||
@ -246,7 +243,7 @@ if (historyList.value.length) {
|
||||
</script>
|
||||
<template>
|
||||
<view>
|
||||
<view v-if="isOverBeforeProcedure==true" class="data-detail">
|
||||
<view class="data-detail">
|
||||
<template v-if="!isLoading">
|
||||
<view class="module">
|
||||
<view class="module-info">
|
||||
@ -681,4 +678,4 @@ if (historyList.value.length) {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
118
mes-ui/mini-app/src/pages/pgMaster/components/showpicture.vue
Normal file
118
mes-ui/mini-app/src/pages/pgMaster/components/showpicture.vue
Normal file
@ -0,0 +1,118 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- <image v-for="(item, index) in src" :key="index" :src="item" @click="preview(item)" mode="aspectFill" @error="imageError"></image> -->
|
||||
<htz-image-upload v-model="src" :max="9" :remove="false" :add="false"></htz-image-upload>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, toRefs,nextTick,onMounted } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue'
|
||||
const title = ref('图片预览');
|
||||
const src = ref([]);
|
||||
const route = useRoute();
|
||||
const picture = ref('');
|
||||
const previewImage = ref(null);
|
||||
|
||||
const imageError = (event) => {
|
||||
console.error('Image load error:', event.detail.errMsg);
|
||||
};
|
||||
const preview = (url) => {
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
this.$nextTick(()=>{
|
||||
previewImage.value.open(url);
|
||||
})
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
previewImage.value.open(url);
|
||||
// #endif
|
||||
};
|
||||
|
||||
const onLongpress = e =>{
|
||||
console.log('当前长按的图片是' + e);
|
||||
uni.showActionSheet({
|
||||
itemList: ['转发给朋友', '保存到手机'],
|
||||
success: function (res) {
|
||||
console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res.errMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onLoad( (options) => {
|
||||
picture.value = options.picture;
|
||||
console.log(picture.value)
|
||||
if (picture.value) {
|
||||
try {
|
||||
var fileUrlList = decodeURIComponent(picture.value);
|
||||
src.value = JSON.parse(fileUrlList);
|
||||
console.log(src.value)
|
||||
} catch (error) {
|
||||
console.error('Error parsing picture data:', error);
|
||||
}
|
||||
}
|
||||
})
|
||||
// const previewImage = (index) => {
|
||||
// const urls = src.value.map(item => item.url);
|
||||
// uni.previewImage({
|
||||
// current: index,
|
||||
// urls: urls,
|
||||
// longPressActions: {
|
||||
// itemList: ['保存图片'],
|
||||
// success: (data) => {
|
||||
// saveImage(urls[data.index]);
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// console.error(err);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
|
||||
const saveImage = (url) => {
|
||||
uni.downloadFile({
|
||||
url: url,
|
||||
success: (res) => {
|
||||
if (res.statusCode === 200) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '图片保存成功',
|
||||
icon: 'success'
|
||||
});
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '图片保存失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* ... other styles ... */
|
||||
.thumbnail-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* Other styles */
|
||||
}
|
||||
.thumbnail-wrapper {
|
||||
margin: 10px;
|
||||
/* Other styles */
|
||||
}
|
||||
.clickable-image {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
@ -121,10 +121,10 @@
|
||||
id,
|
||||
}
|
||||
const data = await getTaskDetailAPI(params)
|
||||
if (data.beforeProcedureStatus == 0) {
|
||||
//如果上一道工序没结束
|
||||
isOverBeforeProcedure.value = true;
|
||||
}
|
||||
// if (data.beforeProcedureStatus == 0) {
|
||||
// //如果上一道工序没结束
|
||||
// isOverBeforeProcedure.value = true;
|
||||
// }
|
||||
if ("Y"==data.isOutsourcing){
|
||||
workTime.value=data.estimatedPrice
|
||||
}
|
||||
@ -157,13 +157,25 @@
|
||||
try {
|
||||
const data = await postOperateAPI(params);
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
duration: 3000,
|
||||
title: error.data.msg,
|
||||
})
|
||||
} finally {
|
||||
await getDetailData(detailInfo.value.id)
|
||||
await getData()
|
||||
const obj = historyList.value[0]
|
||||
// 最新的报工是否完成
|
||||
if (obj && obj?.workTime == null && obj.endTime) {
|
||||
popupShow.value = true
|
||||
}
|
||||
isLoading.value = false;
|
||||
}
|
||||
const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
|
||||
uni.redirectTo({
|
||||
url,
|
||||
})
|
||||
// const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
|
||||
// uni.redirectTo({
|
||||
// url,
|
||||
// })
|
||||
}
|
||||
// 提交报工
|
||||
const handleOk = async (active) => {
|
||||
@ -174,10 +186,15 @@
|
||||
workTime: workTime.value,
|
||||
}
|
||||
const data = await postOperateAPI(params)
|
||||
const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
|
||||
uni.redirectTo({
|
||||
url,
|
||||
})
|
||||
const pages = getCurrentPages(); // 获取当前页面栈
|
||||
const currentPage = pages[pages.length - 1]; // 当前页面
|
||||
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
|
||||
uni.reLaunch({ url }); // 重新加载当前页面
|
||||
|
||||
// const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
|
||||
// uni.redirectTo({
|
||||
// url,
|
||||
// })
|
||||
}
|
||||
// 开始生产
|
||||
const handleStart = async () => {
|
||||
@ -187,12 +204,15 @@
|
||||
ownerId: userId
|
||||
}
|
||||
productionTitle.value = '生产中';
|
||||
console.log(detailInfo.value)
|
||||
const data = await postOperateAPI(params)
|
||||
const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
|
||||
uni.redirectTo({
|
||||
url,
|
||||
})
|
||||
const pages = getCurrentPages(); // 获取当前页面栈
|
||||
const currentPage = pages[pages.length - 1]; // 当前页面
|
||||
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
|
||||
uni.reLaunch({ url }); // 重新加载当前页面
|
||||
// const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
|
||||
// uni.redirectTo({
|
||||
// url,
|
||||
// })
|
||||
}
|
||||
const popupShow = ref(false)
|
||||
const productionTitle = ref('开始生产')
|
||||
@ -214,7 +234,7 @@
|
||||
</script>
|
||||
<template>
|
||||
<view>
|
||||
<view v-if="isOverBeforeProcedure==true" class="data-detail">
|
||||
<view class="data-detail">
|
||||
<template v-if="!isLoading">
|
||||
<view class="module">
|
||||
<view class="module-info">
|
||||
|
@ -30,7 +30,8 @@ const isLoading = ref(false)
|
||||
const queryParams: Required<any> = {
|
||||
pageNo: 1,
|
||||
pageSize: 5,
|
||||
creator: userId,
|
||||
queryType: parseFloat(props.orderState) +1 ,
|
||||
// creator: userId,
|
||||
minCreateTime: '',
|
||||
maxCreateTime: ''
|
||||
}
|
||||
@ -43,6 +44,7 @@ const getListData = async () => {
|
||||
}
|
||||
isLoading.value = true
|
||||
// 发送请求
|
||||
|
||||
const data = await getNotificationPageAPI(queryParams)
|
||||
isLoading.value = false
|
||||
data.list.forEach((e) => {
|
||||
@ -116,12 +118,12 @@ const showpicture= (pictureArray:[])=>{
|
||||
@refresherrefresh="onRefresherrefresh" @scrolltolower="getListData">
|
||||
<view class="item" v-for="item in dataList" :key="item.id">
|
||||
<view class="hd">
|
||||
<view class="num">异常通知单:</view>
|
||||
<view class="num">检验单据:</view>
|
||||
<view class="statusLabel">(单号:{{ item.code }})</view>
|
||||
</view>
|
||||
<view class="md">
|
||||
|
||||
<view class="product-item">项目:<text class="blue">{{ item.projectCode + ' ' + item.projectName }}</text>
|
||||
<view class="product-item">项目:<text class="blue">{{ item.projectName}}</text>
|
||||
</view>
|
||||
<view class="product-item">通知日期:<text class="">{{ item.createTime }}</text></view>
|
||||
|
||||
@ -130,18 +132,26 @@ const showpicture= (pictureArray:[])=>{
|
||||
<view class="label">质检员:<text class="blue">{{ item.creatorName }}</text></view>
|
||||
</view>
|
||||
<view class="row-item">
|
||||
<view class="label">类型:<text class="blue">{{ item.type }}</text></view>
|
||||
<view class="label">类型:<text class="blue">{{ item.typeName }}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="product-row">
|
||||
<view class="row-item">
|
||||
<view class="label">检查数量:<text class="blue">{{ item.amount }}</text></view>
|
||||
</view>
|
||||
<view class="row-item">
|
||||
<view class="label">派工总数量:<text class="blue">{{ item.totalAmount }}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="product-item">子项目:<text class="blue">{{ item.projectSubCode || '' }} {{' ' +
|
||||
item.projectSubName }}</text></view>
|
||||
<!-- <view class="product-item">客户名称:<text class="blue">{{ item.customerName }}</text></view> -->
|
||||
<view v-if="item.fileUrlList && item.fileUrlList.length>0">
|
||||
<!-- <view v-if="item.fileUrlList && item.fileUrlList.length>0">
|
||||
<text class="blue" @click="showpicture(item.fileUrlList)">查看图片</text>
|
||||
</view>
|
||||
<view v-if="!item.fileUrlList">
|
||||
<text class="red">暂无图片</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="product-item">零件名称:<text class="blue">{{ item.materialName }}</text></view>
|
||||
<view class="product-row">
|
||||
<view class="row-item">
|
||||
|
@ -6,8 +6,8 @@ import detailPanel from './components/detailPanel.vue'
|
||||
const childRef = ref(null);
|
||||
// tabs 数据
|
||||
const orderTabs = ref([
|
||||
{ orderState: '0', title: '近三个月', isRender: false },
|
||||
{ orderState: '1', title: '三个月前', isRender: false },
|
||||
{ orderState: '0', title: '未审批', isRender: false },
|
||||
{ orderState: '1', title: '已审批', isRender: false },
|
||||
])
|
||||
// 高亮下标
|
||||
const activeIndex = ref(0)
|
||||
|
@ -98,7 +98,7 @@ const viewClick = async (item) => {
|
||||
const data = await postOperateAPIZF(item.id);
|
||||
if(data >0){
|
||||
const url = `/pages/zjPgMaster/zjPgMaster`
|
||||
|
||||
|
||||
uni.navigateTo({ url })
|
||||
}
|
||||
};
|
||||
@ -117,19 +117,6 @@ const onRefresherrefresh = async () => {
|
||||
// 关闭动画
|
||||
isTriggered.value = false
|
||||
}
|
||||
// const searchVal = ref('')
|
||||
// const dataListDefault = ref([])
|
||||
// const handleSearch = async () => {
|
||||
// const code = searchVal.value
|
||||
// if (code) {
|
||||
// dataListDefault.value = dataList.value
|
||||
// dataList.value = dataList.value.filter((e) => {
|
||||
// return e.code == code
|
||||
// })
|
||||
// } else {
|
||||
// dataList.value = dataListDefault.value
|
||||
// }
|
||||
// }
|
||||
</script>
|
||||
<template>
|
||||
<view class="cont">
|
||||
@ -244,7 +231,7 @@ const onRefresherrefresh = async () => {
|
||||
font-size: 24rpx;
|
||||
background: linear-gradient(149deg, #ffff00 4%, #cfcf00 98%);
|
||||
color: #fff;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,7 +259,7 @@ const onRefresherrefresh = async () => {
|
||||
.label {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
.val {
|
||||
color: #1D2129;
|
||||
&.high-color {
|
||||
@ -280,7 +267,7 @@ const onRefresherrefresh = async () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-01-04 12:54:56
|
||||
* @LastEditors: 王文杰
|
||||
* @LastEditors: 王文杰
|
||||
* @LastEditTime: 2024-03-29 15:44:53
|
||||
* @FilePath: /app-nx-personal/src/services/home.ts
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
@ -83,6 +83,18 @@ export const postOperateAPIZF = (id: Number) => {
|
||||
return http<any[]>({
|
||||
method: 'POST',
|
||||
url: '/heli/pg-master/zfPgMaster?id='+id,
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 操作生产任务-作废
|
||||
*/
|
||||
export const validExceed = (id: Number,amount:Number) => {
|
||||
return http<any[]>({
|
||||
method: 'GET',
|
||||
url: '/heli/bg-master-line/validExceed?id='+id+'&amount='+amount,
|
||||
|
||||
})
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import { http } from '@/utils/http'
|
||||
export const getNotificationPageAPI = (data: Object) => {
|
||||
return http<any[]>({
|
||||
method: 'GET',
|
||||
url: '/heli/unqualified-notification/page',
|
||||
url: '/heli/unqualified-notification/pageWx',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-01-04 12:54:56
|
||||
* @LastEditors: 王文杰
|
||||
* @LastEditors: 王文杰
|
||||
* @LastEditTime: 2024-03-29 15:44:53
|
||||
* @FilePath: /app-nx-personal/src/services/home.ts
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
@ -68,6 +68,16 @@ export const postOperateAPIZF = (id: number) => {
|
||||
return http<any[]>({
|
||||
method: 'POST',
|
||||
url: '/heli/zj-pg-master/zfZjPgMaster?id=' + id
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 操作生产任务-作废
|
||||
*/
|
||||
export const validExceed = (id: Number,amount:Number) => {
|
||||
return http<any[]>({
|
||||
method: 'GET',
|
||||
url: '/heli/zj-bg-master-line/validExceed?id='+id+'&amount='+amount,
|
||||
|
||||
})
|
||||
}
|
||||
|
BIN
mes-ui/mini-app/src/static/images/unqualifiedNotification.jpeg
Normal file
BIN
mes-ui/mini-app/src/static/images/unqualifiedNotification.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 383 KiB |
Loading…
Reference in New Issue
Block a user