Merge branch 'master' of ssh://139.186.142.91:29418/productDev/dmMes
已添加15个文件
已删除1个文件
已修改65个文件
| | |
| | | /web_standard/doumeeplant_web |
| | | /web_standard/.vscode |
| | | .idea |
| | | .DS_Store |
| | |
| | | # æ¥å£åç¼
|
| | | VUE_APP_API_PREFIX = ''
|
| | |
|
| | | #æµè¯æå¡å¨
|
| | | # VUE_APP_BASE_URL = 'http://139.186.142.91:10012/'
|
| | | #æ±æº
|
| | | #VUE_APP_BASE_URL = 'https://106.14.220.133:10012/'
|
| | |
|
| | | #任康æ¬å°
|
| | | # VUE_APP_BASE_URL = 'http://192.168.0.15:10012/'
|
| | | # VUE_APP_BASE_URL = 'https://hsky.doumee.com/doumeeplant_api/'
|
| | |
|
| | | #æ±èæ¬å°
|
| | | #VUE_APP_BASE_URL = 'http://192.168.0.12:10012/'
|
| | | #VUE_APP_BASE_URL = 'http://192.168.0.36:10021/'
|
| | |
|
| | | #åç£ç£æ¬å°
|
| | | #VUE_APP_BASE_URL = 'http://192.168.0.18:10012/'
|
| | | #VUE_APP_BASE_URL = 'http://192.168.0.176:10012/'
|
| | | #VUE_APP_BASE_URL = 'http://6201h1b706.zicp.fun:19470/'
|
| | | VUE_APP_BASE_URL = 'http://192.168.0.18:10021/'
|
| | | VUE_APP_BASE_URL = 'https://dmtest.ahapp.net/doumeeplant_api/' |
| | | # VUE_APP_BASE_URL = 'https://dmtest.ahapp.net/doumeeplant_api/' |
| | |
| | | this.form.fileurlfull = this.form.fileStoreAddr ? this.form.fileurlfull : '' |
| | | }) |
| | | }, |
| | | |
| | | typeChange() { |
| | | let tempDate = new Date(); |
| | | tempDate.setDate(tempDate.getDate() + (this.form.oepnType ? 365 : 15)) |
| | |
| | | @uploadBegin="isUploading=true" |
| | | /> |
| | | <div style="display: flex; flex-direction: column-reverse;" v-if="!!form.icon"> |
| | | <el-button style="margin-left: 5px; padding: 0 5px;" type="text" @click="form.icon=''">å é¤</el-button> |
| | | <el-button style="margin-left: 5px; padding: 0 5px;" type="text" @click="deletePic">å é¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | |
| | | // éæé¤éæ©çèåID |
| | | excludeMenuId: null, |
| | | uploadData: { |
| | | floader: 'company/menu' |
| | | // floader: 'company/menu' |
| | | folder: 'company/menu' |
| | | }, |
| | | parent: {}, |
| | | // è¡¨åæ°æ® |
| | |
| | | debugger |
| | | this.title = title |
| | | |
| | | console.log('-----',parent); |
| | | this.visible = true |
| | | // æ°å»ºï¼menu为空æ¶è¡¨ç¤ºæ°å»ºèå |
| | | if (target == null) { |
| | |
| | | this.form.id = null |
| | | this.form.parentId = parent == null ? null : parent.id |
| | | this.parentName = parent == null ? null : parent.name |
| | | this.form.fullIcon = '' |
| | | }) |
| | | return |
| | | } |
| | |
| | | uploadReverseSuccess(file) { |
| | | this.form.icon = file.imgurl; |
| | | this.form.fullIcon = file.imgurlfull; |
| | | }, |
| | | deletePic() { |
| | | this.form.fullIcon='' |
| | | this.form.icon='' |
| | | } |
| | | }, |
| | | } |
| | |
| | | name: 'OperaPermissionWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | props: { |
| | | type: { |
| | | type: Number|String, |
| | | default: 0 |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | // åæéç |
| | |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | this.form.type = this.type |
| | | }) |
| | | return |
| | | } |
| | |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | this.form.type = this.type |
| | | }) |
| | | }, |
| | | confirm () { |
| | |
| | | <el-table-column prop="name" label="èååç§°" fixed="left" align="center" min-width="160px"></el-table-column> |
| | | <el-table-column prop="icon" label="徿 " align="center" min-width="80px" class-name="table-column-icon"> |
| | | <template slot-scope="{row}"> |
| | | <el-image v-if="row.icon != null && row.icon !== ''" style="width: 40px; height: 40px;" :src="row.icon"></el-image> |
| | | <el-image v-if="row.icon != null && row.icon !== ''" style="width: 40px; height: 40px;" :src="row.resourcePath + row.icon"></el-image> |
| | | <template v-else>æªè®¾ç½®</template> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | ></pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaPermissionWindow ref="operaPermissionWindow" @success="handlePageChange"/> |
| | | <OperaPermissionWindow ref="operaPermissionWindow" :type="0" @success="handlePageChange"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['system:permission:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="æéç¼ç " prop="code"> |
| | | <el-input v-model="searchForm.code" v-trim placeholder="请è¾å
¥æéç¼ç " @keypress.enter.native="search"/> |
| | | </el-form-item> |
| | | <el-form-item label="æéåç§°" prop="name"> |
| | | <el-input v-model="searchForm.name" v-trim placeholder="请è¾å
¥æéåç§°" @keypress.enter.native="search"/> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['system:permission:create', 'system:permission:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaPermissionWindow.open('æ°å»ºç³»ç»æé')" icon="el-icon-plus" v-permissions="['system:permission:create']">æ°å»º</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" v-permissions="['system:permission:delete']">å é¤</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | :default-sort = "{prop: 'createTime', order: 'descending'}" |
| | | stripe |
| | | border |
| | | @selection-change="handleSelectionChange" |
| | | @sort-change="handleSortChange" |
| | | > |
| | | <el-table-column type="selection" fixed="left" align="center" width="55"></el-table-column> |
| | | <el-table-column prop="code" label="æéç¼ç " fixed="left" align="center" min-width="200px"></el-table-column> |
| | | <el-table-column prop="name" label="æéåç§°" fixed="left" align="center" min-width="120px"></el-table-column> |
| | | <el-table-column prop="remark" label="æé夿³¨" align="center" min-width="120px"></el-table-column> |
| | | <el-table-column prop="createUser" label="å建人" align="center" min-width="100px"> |
| | | <template slot-scope="{row}">{{row.createUserInfo == null ? '' : row.createUserInfo.username}}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="å建æ¶é´" align="center" min-width="140px" sortable="custom" sort-by="perm.CREATE_TIME"></el-table-column> |
| | | <el-table-column prop="updateUser" label="æ´æ°äºº" align="center" min-width="100px"> |
| | | <template slot-scope="{row}">{{row.updateUserInfo == null ? '' : row.updateUserInfo.username}}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="updateTime" label="æ´æ°æ¶é´" align="center" min-width="140px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['system:permission:update', 'system:permission:delete'])" |
| | | label="æä½" |
| | | align="center" |
| | | min-width="130" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button v-if="!row.fixed" type="text" @click="$refs.operaPermissionWindow.open('ç¼è¾ç³»ç»æé', row)" v-permissions="['system:permission:update']">ç¼è¾</el-button> |
| | | <el-button v-if="!row.fixed" type="text" @click="deleteById(row)" style="color: red" v-permissions="['system:permission:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | ></pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaPermissionWindow ref="operaPermissionWindow" :type="1" @success="handlePageChange"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/common/Pagination' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import OperaPermissionWindow from '@/components/system/permission/OperaPermissionWindow' |
| | | export default { |
| | | name: 'SystemPermission', |
| | | extends: BaseTable, |
| | | components: { OperaPermissionWindow, TableLayout, Pagination }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | code: '', |
| | | name: '', |
| | | remark: '', |
| | | type: 1 |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'æé', |
| | | api: '/system/permission', |
| | | sorts: [{ |
| | | property: 'perm.CREATE_TIME', |
| | | direction: 'DESC' |
| | | }] |
| | | }) |
| | | this.search() |
| | | } |
| | | } |
| | | </script> |
| | |
| | | import doumeemes.dao.ext.dto.SalaryParamDTO; |
| | | import doumeemes.service.business.SalaryParamService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.multipart.commons.CommonsMultipartResolver; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(salaryParamService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹é导å
¥è®¡å", notes = "æ¹é导å
¥è®¡å", httpMethod = "POST", position = 6) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "folder", value = "æä»¶å¤¹", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class), |
| | | }) |
| | | @PostMapping(value = "/importBatch", headers = "content-type=multipart/form-data") |
| | | // @RequiresPermissions("business:salaryparam:create") |
| | | public ApiResponse importBatch(String folder, HttpServletRequest request, HttpServletResponse response) throws Exception { |
| | | CommonsMultipartResolver multipartResovler = new CommonsMultipartResolver(); |
| | | if (multipartResovler.isMultipart(request)) { |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | Iterator<String> it = multipartRequest.getFileNames(); |
| | | while (it.hasNext()) { |
| | | MultipartFile file = multipartRequest.getFile((String) it.next()); |
| | | salaryParamService.importPlans(file); |
| | | break; |
| | | } |
| | | } |
| | | return ApiResponse.success( null); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package doumeemes.api.business; |
| | | |
| | | import doumeemes.api.BaseController; |
| | | import doumeemes.core.annotation.excel.ExcelExporter; |
| | | import doumeemes.core.annotation.pr.PreventRepeat; |
| | | import doumeemes.core.model.ApiResponse; |
| | | import doumeemes.core.model.PageWrap; |
| | | import doumeemes.core.model.PageData; |
| | | import doumeemes.dao.business.model.UnqualifiedRecord; |
| | | import doumeemes.service.business.UnqualifiedRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @since 2023/08/16 14:15 |
| | | */ |
| | | @Api(tags = "å·¥åç±»-æ¥å·¥ä¸è¯è®°å½ç±»å表") |
| | | @RestController |
| | | @RequestMapping("/business/unqualifiedRecord") |
| | | public class UnqualifiedRecordController extends BaseController { |
| | | |
| | | @Autowired |
| | | private UnqualifiedRecordService unqualifiedRecordService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:unqualifiedrecord:create") |
| | | public ApiResponse create(@RequestBody UnqualifiedRecord unqualifiedRecord) { |
| | | return ApiResponse.success(unqualifiedRecordService.create(unqualifiedRecord)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:unqualifiedrecord:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | unqualifiedRecordService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:unqualifiedrecord:update") |
| | | public ApiResponse updateById(@RequestBody UnqualifiedRecord unqualifiedRecord) { |
| | | unqualifiedRecordService.updateById(unqualifiedRecord); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:unqualifiedrecord:query") |
| | | public ApiResponse<PageData<UnqualifiedRecord>> findPage (@RequestBody PageWrap<UnqualifiedRecord> pageWrap) { |
| | | return ApiResponse.success(unqualifiedRecordService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:unqualifiedrecord:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(unqualifiedRecordService.findById(id)); |
| | | } |
| | | } |
| | |
| | | return ApiResponse.success(categoryExtService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("å表æ¥è¯¢") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("ext:categoryext:query") |
| | | public ApiResponse<List<CategoryExtListVO>> list(@RequestBody QueryCategoryExtDTO queryCategoryExtDTO) { |
| | | queryCategoryExtDTO.setDeleted(Constants.ZERO); |
| | | queryCategoryExtDTO.setRootDepartId(getLoginUser().getRootDepartment().getId()); |
| | | return ApiResponse.success(categoryExtService.findList(queryCategoryExtDTO)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("ext:categoryext:exportExcel") |
| | |
| | | import doumeemes.config.rocketmq.MqConfig; |
| | | import doumeemes.config.rocketmq.RocketMessageProducer; |
| | | import doumeemes.core.utils.DateUtil; |
| | | import doumeemes.dao.business.dto.AutoWorkReportDTO; |
| | | import doumeemes.dao.business.model.Workorder; |
| | | import doumeemes.dao.ext.vo.PlansExtListCountVO; |
| | | import doumeemes.dao.ext.vo.PlansExtListH5VO; |
| | |
| | | plansExtService.backByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("ext:plansext:query") |
| | |
| | | return ApiResponse.success(plansExtService.pageCount(param)); |
| | | } |
| | | |
| | | @ApiOperation("ä¸é®æ¥å·¥") |
| | | @PostMapping("/autoWorkReport") |
| | | public ApiResponse autoWorkReport (@RequestBody AutoWorkReportDTO autoWorkReportDTO) { |
| | | plansExtService.autoWorkReport(getLoginUser(),autoWorkReportDTO); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹é导å
¥è®¡å |
| | | * |
| | |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®å¯¹è±¡ä¿¡æ¯æ¥è¯¢") |
| | | @PostMapping("/queryOne") |
| | | @RequiresPermissions("business:salaryparam:query") |
| | | public ApiResponse<SalaryParam> queryOne(@RequestBody SalaryParam salaryParam) { |
| | | SalaryParam data = salaryParamService.findOne(salaryParam); |
| | | return ApiResponse.success(data); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:salaryparam:query") |
| | |
| | | return ApiResponse.success(workorderRecordStandardService.choiceStockPageForWorkorder(pageWrap,getLoginUser())); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®ä¾éè®¡åæ¥è¯¢å¯ç¨åºå") |
| | | @PostMapping("/getStockByPlansForStandard") |
| | | public ApiResponse<PageData<WStockExtListVO>> getStockByPlansForStandard (@RequestBody PageWrap<QueryWStockDto> pageWrap) { |
| | | return ApiResponse.success(workorderRecordStandardService.choiceStockPageForPlans(pageWrap,getLoginUser())); |
| | | } |
| | | |
| | | } |
| | |
| | | String rPath =systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+systemDictDataBiz.queryByCode(Constants.OSS,Constants.MENU_IMG).getCode(); |
| | | for (SystemMenu menu : menus) { |
| | | if(Constants.equalsInteger(menu.getType(),Constants.PlatType.companyH5) && StringUtils.isNotBlank(menu.getIcon())){ |
| | | menu.setIcon(rPath+menu.getIcon()); |
| | | menu.setIcon(menu.getIcon()); |
| | | menu.setResourcePath(rPath); |
| | | } |
| | | if (menu.getParentId() == null) { |
| | |
| | | menus.removeIf(menu -> menu.getParentId() == null); |
| | | for (SystemMenuListVO child : rootMenus) { |
| | | if(Constants.equalsInteger(child.getType(),Constants.PlatType.companyH5) && StringUtils.isNotBlank(child.getIcon())){ |
| | | child.setIcon(rPath+child.getIcon()); |
| | | child.setIcon(child.getIcon()); |
| | | child.setResourcePath(rPath); |
| | | } |
| | | this.fillChildren(child, menus); |
| | |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * èªå®ä¹Realmï¼å¤ç认è¯åæé |
| | |
| | | if(com == null){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼è¯¥è´¦æ·å¼å¸¸ï¼"); |
| | | } |
| | | |
| | | if(com.getOepnValidDate().before(new Date())){ |
| | | if(Constants.equalsInteger( com.getStatus(),Constants.ZERO) ){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼è¯¥ä¼ä¸å·²è¿ç¦ç¨ï¼"); |
| | | } |
| | | if(com.getOepnValidDate() != null && com.getOepnValidDate().before(new Date())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼è¯¥ä¼ä¸å·²è¿ä½¿ç¨æææï¼"); |
| | | } |
| | | //妿æ¯ä¼ä¸ç¨æ· |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * titleRows : æ é¢å å è¡ |
| | | * headerRows : åå å è¡ |
| | | * excel常è§å¯¼å
¥(é»è®¤åªè¯»å第ä¸å¼ sheetå·¥ä½ç°¿) |
| | | */ |
| | | public static <T> List<T> importExcel(MultipartFile file, Integer titleRows, Integer headerRows, Class<T> pojoClass){ |
| | |
| | | } |
| | | return list; |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package doumeemes.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import doumeemes.dao.business.model.UnqualifiedRecord; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @since 2023/08/16 14:15 |
| | | */ |
| | | public interface UnqualifiedRecordMapper extends BaseMapper<UnqualifiedRecord> { |
| | | |
| | | } |
| | |
| | | package doumeemes.dao.business.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import doumeemes.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | @ApiModelProperty(value = "å·¥åºè®¡å主é®") |
| | | private Integer plansId; |
| | | |
| | | @ApiModelProperty(value = "设å¤ä¸»é®", example = "1") |
| | | private Integer proGroupId; |
| | | |
| | | @ApiModelProperty(value = "ç产人åç¼ç éå" ) |
| | | @TableField(exist = false) |
| | | private List<Integer> proUserList; |
| | | |
| | | @ApiModelProperty(value = "ææè®°å½") |
| | | private List<MaterialListDTO> recordList ; |
| | | |
| | | @ApiModelProperty(value = "产åºè®°å½") |
| | | private CreateWorkorderRecordDTO createWorkorderRecordDTO; |
| | | |
| | | @ApiModelProperty(value = "ä¸è¯åå类记å½") |
| | | private List<CreateUnqualifiedDTO> createUnqualifiedDTOList ; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package doumeemes.dao.business.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2022/05/12 10:18 |
| | | */ |
| | | @Data |
| | | public class CreateUnqualifiedDTO { |
| | | |
| | | @ApiModelProperty(value = "ä¸è¯ç±»å«ä¸»é®" ) |
| | | private Integer categoryId; |
| | | |
| | | @ApiModelProperty(value = "æ£éªä¸åæ ¼æ°é") |
| | | private BigDecimal unQualifiedNum; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import cn.afterturn.easypoi.excel.annotation.Excel; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import doumeemes.core.annotation.excel.ExcelColumn; |
| | | import doumeemes.dao.ext.vo.BomExtListVO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @ApiModelProperty(value = "æå计å主é®ï¼å
³èwork_plans表ï¼", example = "1") |
| | | private Integer workPlansId; |
| | | |
| | | @ApiModelProperty(value = "å
³èBOM对象",hidden = true) |
| | | @TableField(exist = false) |
| | | private BomExtListVO bomModel; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "æ åæ¶é¿ï¼ç§ï¼") |
| | | @ExcelColumn(name="æ åæ¶é¿ï¼ç§ï¼") |
| | | private String times; |
| | | private Integer times; |
| | | |
| | | @ApiModelProperty(value = "ä¸è¯åæ¯å¦è®¡å
¥ 0å¦ 1æ¯") |
| | | @ExcelColumn(name="ä¸è¯åæ¯å¦è®¡å
¥ 0å¦ 1æ¯") |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package doumeemes.dao.business.model; |
| | | |
| | | import doumeemes.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * å·¥åç±»-æ¥å·¥ä¸è¯è®°å½ç±»å表 |
| | | * @author æ±è¹è¹ |
| | | * @since 2023/08/16 14:15 |
| | | */ |
| | | @Data |
| | | @ApiModel("å·¥åç±»-æ¥å·¥ä¸è¯è®°å½ç±»å表") |
| | | @TableName("`unqualified_record`") |
| | | public class UnqualifiedRecord { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å·²å é¤ 0æªå é¤ 1å·²å é¤", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å·²å é¤ 0æªå é¤ 1å·²å é¤") |
| | | private Integer deleted; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date updateTime; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "主ç»ç»ç¼ç ï¼å
³èdepartmentè¡¨æ ¹ç»ç»ï¼", example = "1") |
| | | @ExcelColumn(name="主ç»ç»ç¼ç ï¼å
³èdepartmentè¡¨æ ¹ç»ç»ï¼") |
| | | private Integer rootDepartId; |
| | | |
| | | @ApiModelProperty(value = "å
¬å¸çº§ç»ç»ç¼ç ï¼å
³èdepartment表ï¼", example = "1") |
| | | @ExcelColumn(name="å
¬å¸çº§ç»ç»ç¼ç ï¼å
³èdepartment表ï¼") |
| | | private Integer departId; |
| | | |
| | | @ApiModelProperty(value = "å·¥å主é®", example = "1") |
| | | @ExcelColumn(name="å·¥å主é®") |
| | | private Integer workorderId; |
| | | |
| | | @ApiModelProperty(value = "产åºè®°å½ä¸»é®", example = "1") |
| | | @ExcelColumn(name="产åºè®°å½ä¸»é®") |
| | | private Integer recordId; |
| | | |
| | | @ApiModelProperty(value = "ç±»å«ä¸»é®", example = "1") |
| | | @ExcelColumn(name="ç±»å«ä¸»é®") |
| | | private Integer categoryId; |
| | | |
| | | @ApiModelProperty(value = "æ£éªä¸åæ ¼æ°é", example = "1") |
| | | @ExcelColumn(name="æ£éªä¸åæ ¼æ°é") |
| | | private BigDecimal unqualifiedNum; |
| | | |
| | | } |
| | |
| | | @TableField(exist = false) |
| | | private List<WorkorderUser> workorderUserList; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ¥å·¥æ¶é¿ï¼ç§ï¼", example = "1") |
| | | @ExcelColumn(name="æ¥å·¥æ¶é¿ï¼ç§ï¼") |
| | | private Integer duration; |
| | | |
| | | @ApiModelProperty(value = "å·¥èµç»æï¼å
)", example = "1") |
| | | @ExcelColumn(name="å·¥èµç»æï¼å
)") |
| | | private Integer salary; |
| | | @ApiModelProperty(value = "å·¥èµåä»·ï¼å
)", example = "1") |
| | | @ExcelColumn(name="å·¥èµåä»·ï¼å
)") |
| | | private Integer salaryPrice; |
| | | @ApiModelProperty(value = "æ åæ°é", example = "1") |
| | | @ExcelColumn(name="æ åæ°é") |
| | | private Integer salaryNum; |
| | | |
| | | @ApiModelProperty(value = "æ åæ¶é¿ï¼ç§ï¼") |
| | | @ExcelColumn(name="æ åæ¶é¿ï¼ç§ï¼") |
| | | private String salaryTimes; |
| | | |
| | | @ApiModelProperty(value = "ä¸è¯åæ¯å¦è®¡å
¥ 0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="ä¸è¯åæ¯å¦è®¡å
¥ 0å¦ 1æ¯") |
| | | private Integer salaryUnqualified; |
| | | |
| | | @ApiModelProperty(value = "计价æ¹å¼ 0计件 1计æ¶", example = "1") |
| | | @ExcelColumn(name="计价æ¹å¼ 0计件 1计æ¶") |
| | | private Integer salaryType; |
| | | } |
| | |
| | | public class SalaryParamVO { |
| | | |
| | | @ApiModelProperty(value = "主é®") |
| | | @ExcelColumn(name="åºå·",index = 1) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | @ExcelColumn(name="å建人ç¼ç ",index = 11) |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´",index = 10, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "主ç»ç»ç¼ç ï¼å
³èdepartmentè¡¨æ ¹ç»ç»ï¼") |
| | |
| | | private Integer procedureId; |
| | | |
| | | @ApiModelProperty(value = "å·¥åºç¼ç ï¼å
³èprocedure表ï¼") |
| | | @ExcelColumn(name="å·¥åºç¼ç ï¼å
³èprocedure表ï¼") |
| | | // @ExcelColumn(name="å·¥åºç¼ç ï¼å
³èprocedure表ï¼") |
| | | @NotEmpty(message = "å·¥åºç¼ç ä¸è½ä¸ºç©º") |
| | | private Integer procedureCode; |
| | | |
| | | @ApiModelProperty(value = "å·¥åºç¼ç ï¼å
³èprocedure表ï¼") |
| | | @ExcelColumn(name="å·¥åºç¼ç ï¼å
³èprocedure表ï¼") |
| | | @ExcelColumn(name="å·¥åºåç§°",index =5) |
| | | private String procedureName; |
| | | |
| | | @ApiModelProperty(value = "产ååç§°" ) |
| | | @Excel(name="产ååç§°",orderNum ="3") |
| | | @ExcelColumn(name="ç©æåç§°",index =3) |
| | | private String materialName; |
| | | |
| | | @ApiModelProperty(value = "产åç¼ç " ) |
| | | @Excel(name="产åç¼ç ",orderNum ="4") |
| | | @ExcelColumn(name="ç©æç¼ç ",index =4) |
| | | private String materialCode; |
| | | |
| | | @ApiModelProperty(value = "ç©æç¼ç ï¼å
³èmaterial_distribute表ï¼", example = "1") |
| | | private Integer materialId; |
| | | |
| | | @ApiModelProperty(value = "å·¥èµåä»·ï¼å
)") |
| | | @ExcelColumn(name="å·¥èµåä»·ï¼å
)") |
| | | @ExcelColumn(name="å·¥èµåä»·ï¼å
)",index =6) |
| | | private BigDecimal salary; |
| | | |
| | | @ApiModelProperty(value = "æ åæ°é") |
| | | @ExcelColumn(name="æ åæ°é") |
| | | @ExcelColumn(name="æ å产åº",index =7) |
| | | private Integer num; |
| | | |
| | | @ApiModelProperty(value = "æ åæ¶é¿ï¼ç§ï¼") |
| | | @ExcelColumn(name="æ åæ¶é¿ï¼ç§ï¼") |
| | | @ExcelColumn(name="æ åæ¶é¿ï¼ç§ï¼",index =8) |
| | | private String times; |
| | | |
| | | @ApiModelProperty(value = "ä¸è¯åæ¯å¦è®¡å
¥ 0å¦ 1æ¯") |
| | | @ExcelColumn(name="ä¸è¯åæ¯å¦è®¡å
¥ 0å¦ 1æ¯") |
| | | @ExcelColumn(name="ä¸è¯åæ¯å¦è®¡å
¥ 0å¦ 1æ¯",index = 9 ,valueMapping = "0=å¦;1=æ¯") |
| | | private Integer unqualified; |
| | | |
| | | @ApiModelProperty(value = "计价æ¹å¼ 0计件 1计æ¶") |
| | | @ExcelColumn(name="计价æ¹å¼ 0计件 1计æ¶") |
| | | @ExcelColumn(name="计价æ¹å¼",index = 2 ,valueMapping = "0=计件;1=计æ¶") |
| | | private Integer type; |
| | | } |
| | |
| | | private Integer factoryId; |
| | | |
| | | @ApiModelProperty(value = "å·¥ååç§°", example = "1") |
| | | @ExcelColumn(name="å·¥ååç§°",index = 4,width =15) |
| | | @ExcelColumn(name="å·¥ååç§°",index = 5,width =15) |
| | | private String factoryName; |
| | | |
| | | @ApiModelProperty(value = "æ¥æº 0人工å建ã1Excel导å
¥", example = "1") |
| | |
| | | @ExcelColumn(name="计åç¼ç ",index = 0,width =15) |
| | | private String planCode; |
| | | |
| | | @ApiModelProperty(value = "è®¡åæ¥æ") |
| | | @ExcelColumn(name="è®¡åæ¥æ",index = 3,width =15) |
| | | @ApiModelProperty(value = "计åå®ææ¥æ") |
| | | @ExcelColumn(name="è®¡åæ¥æ",index = 4,width =15) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date planDate; |
| | | @ApiModelProperty(value = "计åå¼å§æ¥æ") |
| | | @ExcelColumn(name="计åå¼å§æ¥æ",index = 17,width =15) |
| | | @ExcelColumn(name="计åå¼å§æ¥æ",index = 3,width =15) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date startDate; |
| | | @ApiModelProperty(value = "éå®åå·" ) |
| | |
| | | private Integer unitId; |
| | | |
| | | @ApiModelProperty(value = "åä½ç¼ç åç§°", example = "1") |
| | | @ExcelColumn(name="åä½åç§°",index = 6,width =15) |
| | | @ExcelColumn(name="åä½åç§°",index = 7,width =15) |
| | | private String unitName; |
| | | |
| | | @ApiModelProperty(value = "è®¡åæ°é", example = "1") |
| | | @ExcelColumn(name="è®¡åæ°é",index = 5,width =15) |
| | | @ExcelColumn(name="è®¡åæ°é",index = 6,width =15) |
| | | private Integer num; |
| | | |
| | | @ApiModelProperty(value = "æ¹æ¬¡å·") |
| | | @ExcelColumn(name="æ¹æ¬¡å·",index = 7,width =15) |
| | | @ExcelColumn(name="æ¹æ¬¡å·",index = 8,width =15) |
| | | private String batch; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 1=å·²çæ;2=å·²åå¸ã3已忶ã4å·²åé
ã5å·²æåã6å·²å®å·¥ã7å·²å
¥åºã8å·²å
³é", example = "1") |
| | | @ExcelColumn(name="计åç¶æ",valueMapping = "0=å·²çæ;1=æ§è¡ä¸;3=已忶;4=å·²åé
;5=å·²æå;6=å·²å®å·¥;7=å·²å
¥åº;8=å·²å
³é;",index = 8,width =15) |
| | | @ExcelColumn(name="计åç¶æ",valueMapping = "0=å·²çæ;1=æ§è¡ä¸;3=已忶;4=å·²åé
;5=å·²æå;6=å·²å®å·¥;7=å·²å
¥åº;8=å·²å
³é;",index = 9,width =15) |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "导å
¥æ¹å·ï¼å
³èplan_import表)", example = "1") |
| | | private Integer importId; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦æå 0æªæå 1å·²æå", example = "1") |
| | | @ExcelColumn(name="æ¯å¦æå",valueMapping = "0=å¦;1=æ¯",index = 9,width =15) |
| | | @ExcelColumn(name="æ¯å¦æå",valueMapping = "0=å¦;1=æ¯",index = 10,width =15) |
| | | private Integer paused; |
| | | |
| | | @ApiModelProperty(value = "计ååç¼ç ï¼ä¸system_user表å
³èï¼", example = "1") |
| | |
| | | private Integer urgent; |
| | | |
| | | @ApiModelProperty(value = "计ååå§å", example = "1") |
| | | @ExcelColumn(name="计ååå§å",index = 14,width =15) |
| | | @ExcelColumn(name="计ååå§å",index = 15,width =15) |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "计ååææºå·", example = "1") |
| | | @ExcelColumn(name="计ååææºå·",index = 15,width =15) |
| | | @ExcelColumn(name="计ååææºå·",index = 16,width =15) |
| | | private String userMobile; |
| | | |
| | | @ApiModelProperty(value = "计åå叿¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @ExcelColumn(name="计åå叿¶é´",index = 13,width =15) |
| | | @ExcelColumn(name="计åå叿¶é´",index = 14,width =15) |
| | | private Date publishDate; |
| | | |
| | | @ApiModelProperty(value = "ç¨æ·é¨é¨åç§°", example = "1") |
| | | private String userDepartName; |
| | | |
| | | @ApiModelProperty(value = "å®å·¥æ°é", example = "1") |
| | | @ExcelColumn(name="å®å·¥æ°é" ,index = 10,width =15) |
| | | @ExcelColumn(name="å®å·¥æ°é" ,index = 11,width =15) |
| | | private Integer finishNum; |
| | | |
| | | @ApiModelProperty(value = "å®å·¥åæ ¼æ°é", example = "1") |
| | | @ExcelColumn(name="å®å·¥åæ ¼æ°é",index = 11,width =15) |
| | | @ExcelColumn(name="å®å·¥åæ ¼æ°é",index = 12,width =15) |
| | | private Integer finishQualifiedNum; |
| | | |
| | | @ApiModelProperty(value = "å®å·¥ä¸è¯æ°é", example = "1") |
| | | @ExcelColumn(name="å®å·¥ä¸è¯æ°é",index = 12,width =15) |
| | | @ExcelColumn(name="å®å·¥ä¸è¯æ°é",index = 13,width =15) |
| | | private Integer finishUnQualifiedNum; |
| | | |
| | | @ApiModelProperty(value = "å计åæç»ä¿¡æ¯", example = "1") |
| | |
| | | @ApiModelProperty(value = "å·¥å主é®") |
| | | private Integer workorderId; |
| | | |
| | | @ApiModelProperty(value = "å·¥åºè®¡å主é®") |
| | | private Integer plansId; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "å·¥åç¼ç ", example = "1",hidden = true) |
| | | private Integer workorderId; |
| | | |
| | | @ApiModelProperty(value = "å·¥åºè®¡å主é®", example = "1",hidden = true) |
| | | private Integer plansId; |
| | | @ApiModelProperty(value = "ç©ææ¸
åä¿¡æ¯è¡¨æåå¯ç¨æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date bmodelValidTime; |
| | |
| | | package doumeemes.dao.ext.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import doumeemes.dao.ext.vo.BomExtListVO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty(value = "ç©ææ¸
åä¿¡æ¯è¡¨ä¸»é®", example = "1") |
| | | private Integer bmodelId; |
| | | |
| | | |
| | | } |
| | |
| | | private String mixParam; |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date startDate; |
| | | private String planDateStartDate; |
| | | @ApiModelProperty(value = "æªæ¢æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date endDate; |
| | | private String planDateEndDate; |
| | | } |
| | |
| | | private Integer rootDepartId; |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date startDate; |
| | | private String startDate; |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date endDate; |
| | | private String endDate; |
| | | @ApiModelProperty(value = "æ°æ®æéé¨é¨ç¼ç éå" ,hidden = true) |
| | | private List<Integer> departIds; |
| | | |
| | |
| | | package doumeemes.dao.ext.dto; |
| | | |
| | | import cn.afterturn.easypoi.excel.annotation.Excel; |
| | | import cn.afterturn.easypoi.excel.annotation.ExcelTarget; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | |
| | | */ |
| | | @Data |
| | | @ApiModel("绩æå·¥èµé
置导å
¥") |
| | | @ExcelTarget("SalaryParamImportDTO") |
| | | public class SalaryParamImportDTO { |
| | | |
| | | @Excel(name="计价æ¹å¼",orderNum ="1") |
| | |
| | | @Excel(name="å·¥ååç§°",orderNum ="2") |
| | | private String departName; |
| | | |
| | | @Excel(name="产ååç§°",orderNum ="3") |
| | | @Excel(name="ç©æåç§°",orderNum ="3") |
| | | private String materialName; |
| | | |
| | | @Excel(name="产åç¼ç ",orderNum ="4") |
| | | @Excel(name="ç©æç¼ç ",orderNum ="4") |
| | | private String materialCode; |
| | | |
| | | @Excel(name="å·¥åºåç§°",orderNum ="5") |
| | |
| | | private BigDecimal salary; |
| | | |
| | | @Excel(name="æ å产åº",orderNum ="7") |
| | | private Integer NUM; |
| | | private String num; |
| | | |
| | | @Excel(name="æ åå·¥æ¶",orderNum ="8") |
| | | private String timesName; |
| | |
| | | @ExcelColumn(name="å
¬å¸çº§ç»ç»ç¼ç ï¼å
³èdepartment表ï¼") |
| | | private Integer departId; |
| | | |
| | | @ApiModelProperty(value = "ç©æIDï¼å
³èmaterial表ï¼", example = "1") |
| | | @ExcelColumn(name="ç©æIDï¼å
³èmaterial表ï¼") |
| | | @ApiModelProperty(value = "ç©æIDï¼è¯¥å段å
³è material_distribute 表ID ï¼ï¼ï¼ï¼ ï¼", example = "1") |
| | | @ExcelColumn(name="ç©æIDï¼å
³èmaterial_distribute表ï¼") |
| | | private Integer materialId; |
| | | |
| | | @ApiModelProperty(value = "çæ¬å·") |
| | |
| | | @ApiModelProperty(value = "å·¥åºåç§°") |
| | | private String procedureName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "material id") |
| | | private Integer realMaterialId; |
| | | } |
| | |
| | | @ApiModelProperty(value = "ç¾ç¾å¹³å°åºç¨åæ°ï¼jsonæ ¼å¼åå¨{app_key:,aes_key:,app_secret:}" ) |
| | | private String lingyangInfo; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 1 å¼å¯ 0 ç¦ç¨") |
| | | private Integer status; |
| | | |
| | | } |
| | |
| | | private Integer lessDistributNum; |
| | | |
| | | @ApiModelProperty(value = "计åç±»å 0æ£å¸¸1å¼å¸¸2è¿å·¥", example = "1") |
| | | @ExcelColumn(name="计åç±»å",valueMapping = "0=æ£å¸¸;1=å¼å¸¸;2=è¿å·¥;",index = 11,width =15) |
| | | @ExcelColumn(name="计åç±»å",valueMapping = "0=æ£å¸¸;1=å¼å¸¸;2=è¿å·¥;",index = 12,width =15) |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "ç产工åºç¼ç ï¼å
³èprocedures表ï¼", example = "1") |
| | |
| | | private Integer unitId; |
| | | |
| | | @ApiModelProperty(value = "è®¡åæ°é", example = "1") |
| | | @ExcelColumn(name="è®¡åæ°é",index = 6,width =15) |
| | | @ExcelColumn(name="è®¡åæ°é",index = 7,width =15) |
| | | private Integer num; |
| | | |
| | | @ApiModelProperty(value = "æ¹æ¬¡å·") |
| | | @ExcelColumn(name="çäº§æ¹æ¬¡å·",index = 8,width =15) |
| | | @ExcelColumn(name="çäº§æ¹æ¬¡å·",index = 9,width =15) |
| | | private String batch; |
| | | |
| | | @ApiModelProperty(value = "ä¼å
çº§ï¼æåºç ï¼å段", example = "1") |
| | | @ExcelColumn(name="ä¼å
级",index = 9,width =15) |
| | | @ExcelColumn(name="ä¼å
级",index = 10,width =15) |
| | | private Integer urgent; |
| | | |
| | | @ApiModelProperty(value = "导å
¥æ¹å·ï¼å
³èplan_import表)", example = "1") |
| | |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å·²çæã1å·²åå¸ã2å·²æ¤åã3已忶ã4å·²åé
ã5å·²æåã6å·²å®å·¥ã7å·²å
¥åºã8å·²å
³é", example = "1") |
| | | @ExcelColumn(name="计åç¶æ",valueMapping = "0=å·²çæ;1=å·²åå¸;2=å·²æ¤å;3=已忶;4=å·²åé
;5=å·²æå;6=å·²å®å·¥;7=å·²å
¥åº;8=å·²å
³é;",index = 10,width =15) |
| | | @ExcelColumn(name="计åç¶æ",valueMapping = "0=å·²çæ;1=å·²åå¸;2=å·²æ¤å;3=已忶;4=å·²åé
;5=å·²æå;6=å·²å®å·¥;7=å·²å
¥åº;8=å·²å
³é;",index = 11,width =15) |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "è¿ä¿®ç³è¯·åå·ï¼å
³èbackorder表ï¼", example = "1") |
| | | private Integer backorderId; |
| | | |
| | | @ApiModelProperty(value = "计åå叿¶é´") |
| | | @ExcelColumn(name="å叿¥æ",index = 15,width =15) |
| | | @ExcelColumn(name="å叿¥æ",index = 16,width =15) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date publishDate; |
| | | |
| | |
| | | @ApiModelProperty(value = "å·²å®å·¥æ°é", example = "0") |
| | | private Integer doneNum; |
| | | @ApiModelProperty(value = "åæ ¼æ°é", example = "0") |
| | | @ExcelColumn(name="åæ ¼æ°é",index = 13,width =15) |
| | | @ExcelColumn(name="åæ ¼æ°é",index = 14,width =15) |
| | | private Integer qulifiedNum; |
| | | @ApiModelProperty(value = "ä¸è¯æ°é", example = "0") |
| | | @ExcelColumn(name="ä¸è¯æ°é",index = 14,width =15) |
| | | @ExcelColumn(name="ä¸è¯æ°é",index = 15,width =15) |
| | | private Integer unqulifiedNum; |
| | | @ApiModelProperty(value = "å·²åé
ç产æ°é", example = "1",hidden = true) |
| | | private Integer distributNum; |
| | | @ApiModelProperty(value = "å·¥åå·²åé
ç产æ°é", example = "1",hidden = true) |
| | | private Integer workorderDistributNum; |
| | | @ApiModelProperty(value = "å·²åé
æªå®å·¥ç产æ°é", example = "1",hidden = true) |
| | | @ExcelColumn(name="å·²åé
æªå®å·¥ç产æ°é",index = 12,width =15) |
| | | @ExcelColumn(name="å·²åé
æªå®å·¥ç产æ°é",index = 13,width =15) |
| | | private Integer distributNoDoneNum; |
| | | @ApiModelProperty(value = "åºåæ¯å¦æ»¡è¶³ 0䏿»¡è¶³ 1满足", example = "0") |
| | | private Integer isStock; |
| | | @ApiModelProperty(value = "æ¯å¦å»¶æ") |
| | | private Boolean hasExpire; |
| | | @ApiModelProperty(value = "æå计åå¼å§æ¥æ") |
| | | @ExcelColumn(name="è®¡åæ¥æ",index = 4,width =15) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date workPlanPlanDate; |
| | | @ApiModelProperty(value = "æå计åå¼å§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date workPlanStartDate; |
| | | |
| | | |
| | | @ExcelColumn(name="ç©æåç§°",index = 1,width =15) |
| | |
| | | @ExcelColumn(name="ç©æç¼ç ",index = 2,width =15) |
| | | private String materialCode; |
| | | |
| | | @ExcelColumn(name="å·¥å",index = 4,width =15) |
| | | @ExcelColumn(name="å·¥å",index = 5,width =15) |
| | | private String factoryName; |
| | | |
| | | @ExcelColumn(name="å·¥åº",index = 5,width =15) |
| | | @ExcelColumn(name="å·¥åº",index = 6,width =15) |
| | | private String produceName; |
| | | |
| | | @ExcelColumn(name="计åå",index = 16,width =15) |
| | | @ExcelColumn(name="计åå",index = 17,width =15) |
| | | private String planUserName; |
| | | |
| | | @ExcelColumn(name="åä½åç§°",index = 7,width =15) |
| | | @ExcelColumn(name="åä½åç§°",index = 8,width =15) |
| | | private String unitName; |
| | | |
| | | @ExcelColumn(name="æå计åç¼ç ") |
| | | private String workPlanCode; |
| | | |
| | | @ExcelColumn(name="éå®è®¢å") |
| | | private String salesOrder; |
| | | |
| | | @ApiModelProperty(value = "æå计åç»ææ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date workPlanEndDate; |
| | | |
| | | @ApiModelProperty(value = "å·²ç产æ°é") |
| | | private Integer produceNum; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦æbomé
ç½® 0æ 1æ", example = "1") |
| | | private Integer hasBom; |
| | | @ApiModelProperty(value = "bomæææ¹å¼ 0æ¨å¼ 1æå¼", example = "1") |
| | | private Integer bomType; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package doumeemes.service.business; |
| | | |
| | | import doumeemes.core.model.PageData; |
| | | import doumeemes.core.model.PageWrap; |
| | | import doumeemes.dao.business.model.UnqualifiedRecord; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å·¥åç±»-æ¥å·¥ä¸è¯è®°å½ç±»å表Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @since 2023/08/16 14:15 |
| | | */ |
| | | public interface UnqualifiedRecordService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param unqualifiedRecord å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(UnqualifiedRecord unqualifiedRecord); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param unqualifiedRecord å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(UnqualifiedRecord unqualifiedRecord); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param unqualifiedRecord å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(UnqualifiedRecord unqualifiedRecord); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param unqualifiedRecords å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<UnqualifiedRecord> unqualifiedRecords); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return UnqualifiedRecord |
| | | */ |
| | | UnqualifiedRecord findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param unqualifiedRecord å®ä½å¯¹è±¡ |
| | | * @return UnqualifiedRecord |
| | | */ |
| | | UnqualifiedRecord findOne(UnqualifiedRecord unqualifiedRecord); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param unqualifiedRecord å®ä½å¯¹è±¡ |
| | | * @return List<UnqualifiedRecord> |
| | | */ |
| | | List<UnqualifiedRecord> findList(UnqualifiedRecord unqualifiedRecord); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<UnqualifiedRecord> |
| | | */ |
| | | PageData<UnqualifiedRecord> findPage(PageWrap<UnqualifiedRecord> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param unqualifiedRecord å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(UnqualifiedRecord unqualifiedRecord); |
| | | } |
| | |
| | | import doumeemes.dao.business.model.Company; |
| | | import doumeemes.dao.business.model.CompanyLog; |
| | | import doumeemes.dao.business.model.CompanyOpen; |
| | | import doumeemes.dao.ext.vo.CompanyExtListVO; |
| | | import doumeemes.service.business.CompanyLogService; |
| | | import doumeemes.service.business.CompanyOpenService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import doumeemes.service.ext.DepartmentExtService; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | |
| | | @Autowired |
| | | CompanyLogService companyLogService; |
| | | |
| | | @Autowired |
| | | @Lazy |
| | | private DepartmentExtService departmentExtService; |
| | | |
| | | @Override |
| | | public Integer create(CompanyOpen companyOpen) { |
| | |
| | | company.setOepnValidDate(companyOpen.getValidDate()); |
| | | company.setOepnType(companyOpen.getOepnType()); |
| | | companyMapper.updateById(company); |
| | | |
| | | Company company1 = companyMapper.selectById(companyOpen.getCompanyId()); |
| | | |
| | | CompanyLog companyLog = new CompanyLog(); |
| | | companyLog.setDeleted((byte) Constants.ZERO); |
| | |
| | | companyLog.setUpdateType(Constants.CompanyUpdateType.UPDATE_VAIL_DATE.getKey()); |
| | | companyLog.setDetail("æææä»"+format.format(cyResult.getOepnValidDate())+"æ¥è°æ´è³"+format.format(companyOpen.getValidDate())); |
| | | companyLogService.create(companyLog); |
| | | |
| | | initRedisCache(company1); |
| | | } |
| | | |
| | | private void initRedisCache(Company com) { |
| | | CompanyExtListVO c = new CompanyExtListVO(); |
| | | BeanUtils.copyProperties(com,c); |
| | | departmentExtService.loadComDepart(c); |
| | | departmentExtService.initCompnayCodesByCom(com); |
| | | } |
| | | |
| | | @Override |
| | |
| | | QueryWrapper<CompanyOpen> wrapper = new QueryWrapper<>(companyOpen); |
| | | return companyOpenMapper.selectList(wrapper); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public PageData<CompanyOpen> findPage(PageWrap<CompanyOpen> pageWrap) { |
| | | IPage<CompanyOpen> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | |
| | | import doumeemes.dao.business.model.CompanyLog; |
| | | import doumeemes.dao.business.model.Multifiles; |
| | | import doumeemes.dao.ext.dto.DingDingConfig; |
| | | import doumeemes.dao.ext.vo.CompanyExtListVO; |
| | | import doumeemes.service.business.CompanyLogService; |
| | | import doumeemes.service.business.CompanyService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import doumeemes.service.business.MultifilesService; |
| | | import doumeemes.service.ext.DepartmentExtService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | |
| | | @Autowired |
| | | private CompanyLogService companyLogService; |
| | | |
| | | @Autowired |
| | | @Lazy |
| | | private DepartmentExtService departmentExtService; |
| | | |
| | | |
| | | @Override |
| | |
| | | update.setStatus(company.getStatus()); |
| | | update.setDingdingInfo(company.getDingdingInfo()); |
| | | companyMapper.updateById(update); |
| | | |
| | | // æ´æ°è®°å½ |
| | | |
| | | CompanyLog companyLog = new CompanyLog(); |
| | | companyLog.setDeleted((byte)Constants.ZERO); |
| | | companyLog.setUpdateUser(principal.getId()); |
| | | companyLog.setCreateUser(principal.getId()); |
| | | companyLog.setCreateTime(new Date()); |
| | | companyLog.setUpdateTime(new Date()); |
| | | companyLog.setCompanyId(company.getId()); |
| | | if(Objects.nonNull(company.getStatus())){ |
| | | CompanyLog companyLog = new CompanyLog(); |
| | | companyLog.setDeleted((byte)Constants.ZERO); |
| | | companyLog.setUpdateUser(principal.getId()); |
| | | companyLog.setCreateUser(principal.getId()); |
| | | companyLog.setCreateTime(new Date()); |
| | | companyLog.setUpdateTime(new Date()); |
| | | companyLog.setRemark(company.getStatus() == 1 ? "æ°æ®å¯ç¨" : "æ°æ®ç¦ç¨"); |
| | | companyLog.setCompanyId(company.getId()); |
| | | companyLog.setUpdateType(company.getStatus() == 1 ? Constants.CompanyUpdateType.UPDATE_ENABLE.getKey() |
| | | : Constants.CompanyUpdateType.UPDATE_DISABLE.getKey()); |
| | | companyLog.setDetail(company.getStatus() == 1 ? "æ°æ®å¯ç¨" : "æ°æ®ç¦ç¨"); |
| | | companyLogService.create(companyLog); |
| | | }else { |
| | | CompanyLog companyLog = new CompanyLog(); |
| | | companyLog.setDeleted((byte)Constants.ZERO); |
| | | companyLog.setUpdateUser(principal.getId()); |
| | | companyLog.setCreateUser(principal.getId()); |
| | | companyLog.setCreateTime(new Date()); |
| | | companyLog.setUpdateTime(new Date()); |
| | | companyLog.setRemark("æ´æ°ä¼ä¸æ°æ®"); |
| | | companyLog.setCompanyId(company.getId()); |
| | | companyLog.setUpdateType(Constants.CompanyUpdateType.UPDATE_CONTENT.getKey()); |
| | | companyLog.setDetail("æ´æ°ä¼ä¸æ°æ®"); |
| | | companyLogService.create(companyLog); |
| | | } |
| | | companyLogService.create(companyLog); |
| | | Company company1 = companyMapper.selectById(company.getId()); |
| | | initRedisCache(company1); |
| | | } |
| | | |
| | | |
| | | private void initRedisCache(Company com) { |
| | | CompanyExtListVO c = new CompanyExtListVO(); |
| | | BeanUtils.copyProperties(com,c); |
| | | departmentExtService.loadComDepart(c); |
| | | departmentExtService.initCompnayCodesByCom(com); |
| | | } |
| | | |
| | | private Boolean isParseObject(String dingdingInfo){ |
| | |
| | | QueryWrapper<Company> wrapper = new QueryWrapper<>(company); |
| | | return companyMapper.selectList(wrapper); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public PageData<Company> findPage(PageWrap<Company> pageWrap) { |
| | | IPage<Company> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 设置类-绩æå·¥èµé
置表Serviceå®ç° |
| | |
| | | |
| | | @Override |
| | | public Integer create(SalaryParam salaryParam) { |
| | | |
| | | |
| | | LoginUserInfo principal = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | |
| | | SalaryParam insert = new SalaryParam(); |
| | | insert.setRootDepartId(salaryParam.getRootDepartId()); |
| | | insert.setDepartId(salaryParam.getDepartId()); |
| | | insert.setProcedureId(salaryParam.getProcedureId()); |
| | | insert.setMaterialId(salaryParam.getMaterialId()); |
| | | insert.setDeleted((byte) Constants.ZERO); |
| | | if(findOne(insert) != null){ |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"åä¸ä¸ªç©æå¨ç¸åå·¥åºä¸è½éå¤é
ç½®å¦ï¼"); |
| | | } |
| | | insert.setCreateUser(principal.getId()); |
| | | insert.setCreateTime(new Date()); |
| | | insert.setUpdateUser(principal.getId()); |
| | | insert.setUpdateTime(new Date()); |
| | | insert.setRemark(salaryParam.getRemark()); |
| | | insert.setRootDepartId(salaryParam.getRootDepartId()); |
| | | insert.setDepartId(salaryParam.getDepartId()); |
| | | insert.setProcedureId(salaryParam.getProcedureId()); |
| | | insert.setMaterialId(salaryParam.getMaterialId()); |
| | | insert.setSalary(salaryParam.getSalary()); |
| | | insert.setNum(salaryParam.getNum()); |
| | | insert.setTimes(salaryParam.getTimes()); |
| | |
| | | .set(SalaryParam::getUpdateTime,new Date()) |
| | | .set(SalaryParam::getUpdateUser,principal.getId()) |
| | | .set(SalaryParam::getType,salaryParam.getType()) |
| | | .set(SalaryParam::getDepartId,salaryParam.getDepartId()) |
| | | .set(SalaryParam::getMaterialId,salaryParam.getMaterialId()) |
| | | .set(SalaryParam::getProcedureId,salaryParam.getProcedureId()) |
| | | // .set(SalaryParam::getDepartId,salaryParam.getDepartId()) |
| | | // .set(SalaryParam::getMaterialId,salaryParam.getMaterialId()) |
| | | // .set(SalaryParam::getProcedureId,salaryParam.getProcedureId()) |
| | | .set(SalaryParam::getSalary,salaryParam.getSalary()) |
| | | .set(SalaryParam::getNum,salaryParam.getNum()) |
| | | .set(SalaryParam::getTimes,salaryParam.getTimes()) |
| | |
| | | @Override |
| | | public SalaryParam findOne(SalaryParam salaryParam) { |
| | | QueryWrapper<SalaryParam> wrapper = new QueryWrapper<>(salaryParam); |
| | | wrapper.last("limit 1"); |
| | | return salaryParamMapper.selectOne(wrapper); |
| | | } |
| | | |
| | |
| | | || Objects.isNull(s.getDepartName()) |
| | | || Objects.isNull(s.getMaterialCode()) |
| | | || Objects.isNull(s.getProcedureName()) |
| | | || Objects.isNull(s.getNUM())){ |
| | | || Objects.isNull(s.getNum())){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "导å
¥æ°æ®å
容æè¯¯ï¼"); |
| | | } |
| | | }); |
| | |
| | | proceduresWrapper.lambda() |
| | | .eq(Procedures::getName,salaryParamImportDTO.getProcedureName()) |
| | | .eq(Procedures::getRootDepartId,department.getRootId()) |
| | | .eq(Procedures::getDepartId,department.getId()) |
| | | .eq(Procedures::getOrgId,department.getId()) |
| | | .last("limit 1"); |
| | | Procedures procedures = proceduresMapper.selectOne(proceduresWrapper); |
| | | if (Objects.isNull(procedures)){ |
| | |
| | | salaryParam.setProcedureId(procedures.getId()); |
| | | salaryParam.setMaterialId(material.getId()); |
| | | salaryParam.setSalary(salaryParamImportDTO.getSalary()); |
| | | salaryParam.setNum(salaryParamImportDTO.getNUM()); |
| | | //todo |
| | | // salaryParam.setTimes(); |
| | | // salaryParam.setUnqualified(salaryParamImportDTO.getUnqualified() ); |
| | | // salaryParam.setType(salaryParamImportDTO.getType()); |
| | | salaryParam.setNum(new BigDecimal(salaryParamImportDTO.getNum())); |
| | | salaryParam.setTimes(getIntegerTimes(salaryParamImportDTO.getTimesName())); |
| | | Integer unqualified = Optional.ofNullable(salaryParamImportDTO.getUnqualified()).map(s -> { |
| | | if ("å¦".equals(s)) { |
| | | return 0; |
| | | } else { |
| | | return 1; |
| | | } |
| | | }).orElse(0); |
| | | salaryParam.setUnqualified(unqualified); |
| | | |
| | | Integer type = Optional.ofNullable(salaryParamImportDTO.getUnqualified()).map(s -> { |
| | | if ("计件".equals(s)) { |
| | | return 0; |
| | | } else { |
| | | return 1; |
| | | } |
| | | }).orElse(0); |
| | | salaryParam.setType(type); |
| | | create(salaryParam); |
| | | } |
| | | |
| | | } |
| | | |
| | | private Integer getIntegerTimes(String a) { |
| | | int h =0,m=0,s=0; |
| | | try{ |
| | | int hIndex =a.lastIndexOf("å°æ¶"); |
| | | int mIndex=a.lastIndexOf("åé"); |
| | | int sIndex =a.lastIndexOf("ç§"); |
| | | if( hIndex>0){ |
| | | h = Integer.parseInt(a.substring(0,hIndex)); |
| | | } |
| | | if(mIndex > hIndex){ |
| | | m = Integer.parseInt(a.substring(hIndex >=0?hIndex+2:0,mIndex)); |
| | | } |
| | | if(sIndex > mIndex){ |
| | | s = Integer.parseInt(a.substring(mIndex >= 0 ? mIndex+2 : 0, sIndex)); |
| | | } |
| | | return h*3600+m*60+s; |
| | | }catch (Exception e){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼æ¶é¿ã"+a+"ãæ ¼å¼ä¸æ£ç¡®ï¼" ); |
| | | } |
| | | |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package doumeemes.service.business.impl; |
| | | |
| | | import doumeemes.core.model.PageData; |
| | | import doumeemes.core.model.PageWrap; |
| | | import doumeemes.core.utils.Utils; |
| | | import doumeemes.dao.business.UnqualifiedRecordMapper; |
| | | import doumeemes.dao.business.model.UnqualifiedRecord; |
| | | import doumeemes.service.business.UnqualifiedRecordService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å·¥åç±»-æ¥å·¥ä¸è¯è®°å½ç±»å表Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @since 2023/08/16 14:15 |
| | | */ |
| | | @Service |
| | | public class UnqualifiedRecordServiceImpl implements UnqualifiedRecordService { |
| | | |
| | | @Autowired |
| | | private UnqualifiedRecordMapper unqualifiedRecordMapper; |
| | | |
| | | @Override |
| | | public Integer create(UnqualifiedRecord unqualifiedRecord) { |
| | | unqualifiedRecordMapper.insert(unqualifiedRecord); |
| | | return unqualifiedRecord.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | unqualifiedRecordMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(UnqualifiedRecord unqualifiedRecord) { |
| | | UpdateWrapper<UnqualifiedRecord> deleteWrapper = new UpdateWrapper<>(unqualifiedRecord); |
| | | unqualifiedRecordMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | unqualifiedRecordMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(UnqualifiedRecord unqualifiedRecord) { |
| | | unqualifiedRecordMapper.updateById(unqualifiedRecord); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<UnqualifiedRecord> unqualifiedRecords) { |
| | | if (CollectionUtils.isEmpty(unqualifiedRecords)) { |
| | | return; |
| | | } |
| | | for (UnqualifiedRecord unqualifiedRecord: unqualifiedRecords) { |
| | | this.updateById(unqualifiedRecord); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public UnqualifiedRecord findById(Integer id) { |
| | | return unqualifiedRecordMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public UnqualifiedRecord findOne(UnqualifiedRecord unqualifiedRecord) { |
| | | QueryWrapper<UnqualifiedRecord> wrapper = new QueryWrapper<>(unqualifiedRecord); |
| | | return unqualifiedRecordMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<UnqualifiedRecord> findList(UnqualifiedRecord unqualifiedRecord) { |
| | | QueryWrapper<UnqualifiedRecord> wrapper = new QueryWrapper<>(unqualifiedRecord); |
| | | return unqualifiedRecordMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<UnqualifiedRecord> findPage(PageWrap<UnqualifiedRecord> pageWrap) { |
| | | IPage<UnqualifiedRecord> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<UnqualifiedRecord> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.lambda() |
| | | .eq(pageWrap.getModel().getId() != null, UnqualifiedRecord::getId, pageWrap.getModel().getId()) |
| | | .eq(pageWrap.getModel().getDeleted() != null, UnqualifiedRecord::getDeleted, pageWrap.getModel().getDeleted()) |
| | | .eq(pageWrap.getModel().getCreateUser() != null, UnqualifiedRecord::getCreateUser, pageWrap.getModel().getCreateUser()) |
| | | .ge(pageWrap.getModel().getCreateTime() != null, UnqualifiedRecord::getCreateTime, Utils.Date.getStart(pageWrap.getModel().getCreateTime())) |
| | | .le(pageWrap.getModel().getCreateTime() != null, UnqualifiedRecord::getCreateTime, Utils.Date.getEnd(pageWrap.getModel().getCreateTime())) |
| | | .eq(pageWrap.getModel().getUpdateUser() != null, UnqualifiedRecord::getUpdateUser, pageWrap.getModel().getUpdateUser()) |
| | | .ge(pageWrap.getModel().getUpdateTime() != null, UnqualifiedRecord::getUpdateTime, Utils.Date.getStart(pageWrap.getModel().getUpdateTime())) |
| | | .le(pageWrap.getModel().getUpdateTime() != null, UnqualifiedRecord::getUpdateTime, Utils.Date.getEnd(pageWrap.getModel().getUpdateTime())) |
| | | .eq(pageWrap.getModel().getRemark() != null, UnqualifiedRecord::getRemark, pageWrap.getModel().getRemark()) |
| | | .eq(pageWrap.getModel().getRootDepartId() != null, UnqualifiedRecord::getRootDepartId, pageWrap.getModel().getRootDepartId()) |
| | | .eq(pageWrap.getModel().getDepartId() != null, UnqualifiedRecord::getDepartId, pageWrap.getModel().getDepartId()) |
| | | .eq(pageWrap.getModel().getWorkorderId() != null, UnqualifiedRecord::getWorkorderId, pageWrap.getModel().getWorkorderId()) |
| | | .eq(pageWrap.getModel().getRecordId() != null, UnqualifiedRecord::getRecordId, pageWrap.getModel().getRecordId()) |
| | | .eq(pageWrap.getModel().getCategoryId() != null, UnqualifiedRecord::getCategoryId, pageWrap.getModel().getCategoryId()) |
| | | .eq(pageWrap.getModel().getUnqualifiedNum() != null, UnqualifiedRecord::getUnqualifiedNum, pageWrap.getModel().getUnqualifiedNum()) |
| | | ; |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(unqualifiedRecordMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | | public long count(UnqualifiedRecord unqualifiedRecord) { |
| | | QueryWrapper<UnqualifiedRecord> wrapper = new QueryWrapper<>(unqualifiedRecord); |
| | | return unqualifiedRecordMapper.selectCount(wrapper); |
| | | } |
| | | } |
| | |
| | | WOutboundInBodyBean wOutboundInBodyBean = wOutboundInBodyBeans.get(Constants.ZERO); |
| | | //累计å
¥åºæ°é |
| | | wOutboundInBodyBean.setNum(wOutboundInBodyBeans.stream().map(s -> s.getNum()).reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | if(wOutboundInBodyBean.getNum().compareTo(BigDecimal.ZERO)<=Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "æ°éå¼å¸¸,è¯·æ£æ¥æ°é!"); |
| | | } |
| | | WOutboundDetail wOutboundDetail = new WOutboundDetail(); |
| | | //æ¥è¯¢ç©ææ°æ® |
| | | MaterialDistribute materialDistribute = materialDistributeMapper.selectById(wOutboundInBodyBean.getMaterialId()); |
| | |
| | | CategoryExtListVO getByCategoryId(Integer comid, Integer id); |
| | | CategoryExtListVO getByCategoryId(Integer comid, Integer id,List<CategoryExtListVO> allList); |
| | | void loadAll(); |
| | | |
| | | List<CategoryExtListVO> findList(QueryCategoryExtDTO queryCategoryExtDTO); |
| | | } |
| | |
| | | List<WorkorderRecord> getWorkorderRecordList(Integer workorderId); |
| | | |
| | | PageData<WStockExtListVO> choiceStockPageForWorkorder(PageWrap<QueryWStockDto> pageWrap, LoginUserInfo userInfo); |
| | | |
| | | PageData<WStockExtListVO> choiceStockPageForPlans(PageWrap<QueryWStockDto> pageWrap,LoginUserInfo userInfo); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<CategoryExtListVO> findList(QueryCategoryExtDTO queryCategoryExtDTO) { |
| | | List<CategoryExtListVO> result = categoryExtMapper.selectList(queryCategoryExtDTO); |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public List<CategoryExtListVO> getListByType(String type,Integer rootDepartId,String cateType,String id) { |
| | | QueryCategoryExtDTO queryCategoryExtDTO=new QueryCategoryExtDTO(); |
| | | queryCategoryExtDTO.setDeleted(Constants.ZERO); |
| | |
| | | return companyInfoListVO; |
| | | } |
| | | String rPath =systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+systemDictDataBiz.queryByCode(Constants.OSS,Constants.MENU_IMG).getCode(); |
| | | companyInfoListVO.setFileurlfull(rPath+"/"+companyInfoListVO.getFileStoreAddr()); |
| | | companyInfoListVO.setFileurlfull(rPath+companyInfoListVO.getFileStoreAddr()); |
| | | |
| | | companyInfoListVO.setSystemUrl( systemDictDataBiz.queryByCode(Constants.EDGP_PARAM,Constants.SYSTEM_URL).getCode()+companyInfoListVO.getId()); |
| | | |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | //å å
¥redisç¼åï¼åå¨ä¼ä¸ä¿¡æ¯ |
| | | RedisUtil.addObject(redisTemplate,Constants.RedisKeys.COM_DEPART_TREE_KEY+com.getId(),rootDepart); |
| | | } |
| | | @PostConstruct |
| | | @Override |
| | | public void loadAllDepart() { |
| | | QueryCompanyExtDTO dto = new QueryCompanyExtDTO(); |
| | |
| | | for (Department department:departmentList ) { |
| | | this.dealDepartmentData(department,user); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void dealDepartmentData(Department department,LoginUserInfo user){ |
| | |
| | | import doumeemes.core.utils.excel.EasyExcelUtil; |
| | | import doumeemes.core.utils.redis.RedisUtil; |
| | | import doumeemes.dao.business.PlansMapper; |
| | | import doumeemes.dao.business.UnqualifiedRecordMapper; |
| | | import doumeemes.dao.business.WorkorderMapper; |
| | | import doumeemes.dao.business.dto.*; |
| | | import doumeemes.dao.business.model.*; |
| | | import doumeemes.dao.ext.*; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | private WorkorderHistoryExtMapper workorderHistoryExtMapper; |
| | | @Autowired |
| | | private WorkorderRecordExtMapper workorderRecordExtMapper; |
| | | |
| | | @Autowired |
| | | private WorkorderMapper workorderMapper; |
| | | @Autowired |
| | | private RouteProcedureExtMapper routeProcedureExtMapper; |
| | | @Autowired |
| | |
| | | private WStockExtService wStockExtService; |
| | | @Autowired |
| | | private WorkorderRecordStandardService workorderRecordStandardService; |
| | | @Autowired |
| | | private UnqualifiedRecordMapper unqualifiedRecordMapper; |
| | | |
| | | @Override |
| | | public PlansExtListVO findById(Integer id){ |
| | |
| | | // //ç»è®¡å·²å®å·¥æ°é |
| | | // param.setStatus(Constants.WORKORDER_STATUS.done); |
| | | // plan.setDoneNum(workorderExtMapper.sumOrderNum(param)); |
| | | QueryBomExtDTO bb = new QueryBomExtDTO(); |
| | | bb.setDepartId(plan.getDepartId()); |
| | | bb.setDeleted(Constants.ZERO); |
| | | bb.setRootDepartId(user.getRootDepartment().getId()); |
| | | bb.setMaterialId(plan.getMaterialId()); |
| | | bb.setProcedureId(plan.getProcedureId()); |
| | | BomExtListVO versionBom = bomExtMapper.selectByModel( bb); |
| | | if(versionBom == null || StringUtils.isBlank(versionBom.getVersion()) || versionBom.getBomVersionId() == null){ |
| | | plan.setHasBom(Constants.ZERO); |
| | | }else { |
| | | plan.setBomType(Constants.formatIntegerNum(versionBom.getType())); |
| | | plan.setHasBom(Constants.ONE); |
| | | } |
| | | return plan; |
| | | } |
| | | |
| | |
| | | // p.setDistributNum(tp.getDistributNum()); |
| | | // p.setDoneNum(tp.getDoneNum()); |
| | | p.setIsStock(wStockExtService.isStockForPlan(p)); |
| | | p.setHasExpire(false); |
| | | p.setStatus(Constants.formatIntegerNum(p.getStatus())); |
| | | if ( !p.getStatus().equals(Constants.PLAN_STATUS.done) && |
| | | !p.getStatus().equals(Constants.PLAN_STATUS.close)){ |
| | | if (Objects.nonNull(p.getPlanDate())){ |
| | | p.setHasExpire(DateUtil.toDateLocalDateTime(p.getWorkPlanPlanDate()).toLocalDate().isBefore(LocalDate.now())); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return PageData.from(new PageInfo<>(result)); |
| | |
| | | if(Constants.equalsInteger(mp.getPaused(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼è®¡åå·²æåï¼"); |
| | | } |
| | | if(Constants.formatIntegerNum(mp.getDistributNum())+thisPlanNum > Constants.formatIntegerNum(mp.getNum())){ |
| | | if(Constants.formatIntegerNum(mp.getWorkorderDistributNum())+thisPlanNum > Constants.formatIntegerNum(mp.getNum())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼ç´¯è®¡åé
æ°é大äºè®¡åæ°éï¼"); |
| | | } |
| | | if(!Constants.equalsInteger(mp.getStatus(),Constants.PLAN_STATUS.publish)&&!Constants.equalsInteger(mp.getStatus(),Constants.PLAN_STATUS.distribute)){ |
| | |
| | | if(ulist == null){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼ç产人åä¿¡æ¯ä¸æ£ç¡®ï¼è¯·å·æ°é¡µé¢éè¯ï¼"); |
| | | } |
| | | if(ulist.size() < param.getProUserList().size()){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼åå¨ç产人åä¿¡æ¯ä¸æ£ç¡®ï¼è¯·å·æ°é¡µé¢éè¯ï¼"); |
| | | } |
| | | // if(ulist.size() < param.getProUserList().size()){ |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼åå¨ç产人åä¿¡æ¯ä¸æ£ç¡®ï¼è¯·å·æ°é¡µé¢éè¯ï¼"); |
| | | // } |
| | | List<WorkorderUser> userList = new ArrayList<>(); |
| | | for(UserDeviceExtListVO uModel : ulist){ |
| | | WorkorderUser u = new WorkorderUser(); |
| | |
| | | } |
| | | /** |
| | | * æ¢å¤è®¡å |
| | | * @param p |
| | | * @param |
| | | */ |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | @Override |
| | |
| | | if(Objects.isNull(plans)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°å·¥åºè®¡åæ°æ®"); |
| | | } |
| | | if(plans.getStatus().equals(Constants.PLAN_STATUS.create)){ |
| | | if(!(plans.getStatus().equals(Constants.PLAN_STATUS.create)||plans.getStatus().equals(Constants.PLAN_STATUS.publish)||plans.getStatus().equals(Constants.PLAN_STATUS.distribute))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å·¥åºè®¡åå·²æµè½¬ï¼æ æ³æä½"); |
| | | } |
| | | if(plans.getPaused().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å·¥åºè®¡åå·²æåï¼æ æ³æä½"); |
| | | } |
| | | if(Objects.isNull(autoWorkReportDTO.getCreateWorkorderRecordDTO())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"åæ°é误ï¼äº§åºæ°æ®"); |
| | | } |
| | | //æ¥è¯¢å·¥åºè®¡åå·²åé
æ°é |
| | | List<Workorder> workorderList = workorderExtMapper.selectList(new QueryWrapper<Workorder>().eq("PLAN_ID",plans.getId())); |
| | | List<Workorder> workorderList = workorderMapper.selectList(new QueryWrapper<Workorder>().eq("PLAN_ID",plans.getId()) |
| | | .eq("STATUS",Constants.WORKORDER_STATUS.baogong)); |
| | | //æ¬æ¬¡äº§åºæ°é |
| | | BigDecimal num = autoWorkReportDTO.getCreateWorkorderRecordDTO().getQualifiedNum().add(autoWorkReportDTO.getCreateWorkorderRecordDTO().getUnQualifiedNum()); |
| | | if(num.compareTo(BigDecimal.ZERO)<=Constants.ZERO){ |
| | |
| | | Workorder param = new Workorder(); |
| | | param.setPlanId(autoWorkReportDTO.getPlansId()); |
| | | param.setPlanDate(new Date()); |
| | | List<Integer> proUserList = new ArrayList<Integer>(); |
| | | //TODO |
| | | proUserList.add(user.getId()); |
| | | param.setProUserList(proUserList); |
| | | param.setPlanNum(plans.getNum()); |
| | | param.setProGroupId(autoWorkReportDTO.getProGroupId()); |
| | | param.setProUserList(autoWorkReportDTO.getProUserList()); |
| | | param.setPlanNum(num.intValue()); |
| | | //çæå·¥åä¿¡æ¯ |
| | | Workorder workorder = this.distributeDone(user,param,plans.getNum()); |
| | | //å·¥åææè®°å½ |
| | |
| | | workorderRecordStandardService.createMaterialStandard(createMaterialDTO); |
| | | } |
| | | //å·¥å产åºè®°å½ |
| | | workorderRecordStandardService.createWorkorderRecord(autoWorkReportDTO.getCreateWorkorderRecordDTO(),user); |
| | | autoWorkReportDTO.getCreateWorkorderRecordDTO().setWorkorderId(workorder.getId()); |
| | | WorkorderRecord workorderRecord = workorderRecordStandardService.createWorkorderRecord(autoWorkReportDTO.getCreateWorkorderRecordDTO(),user); |
| | | //工忥工 |
| | | workorderRecordStandardService.comfirmDone(workorder); |
| | | |
| | | |
| | | //æ´æ°å·¥åç¶æ |
| | | if(num.compareTo(BigDecimal.valueOf(surplusNum))==Constants.ZERO){ |
| | | plans.setStatus(Constants.PLAN_STATUS.done); |
| | | }else{ |
| | | if(plans.getStatus().equals(Constants.PLAN_STATUS.create)){ |
| | | plans.setStatus(Constants.PLAN_STATUS.distribute); |
| | | } |
| | | } |
| | | plansExtMapper.updateById(plans); |
| | | //å卿¥å·¥ä¸è¯é¡¹æ°æ® |
| | | if(autoWorkReportDTO.getCreateWorkorderRecordDTO().getUnQualifiedNum().compareTo(BigDecimal.ZERO)<=Constants.ZERO){ |
| | | if(!Objects.isNull(autoWorkReportDTO.getCreateUnqualifiedDTOList())&&autoWorkReportDTO.getCreateUnqualifiedDTOList().size()>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸è¯é¡¹é误ï¼è¯·æ£æ¥ä¸è¯é¡¹æ°æ®"); |
| | | } |
| | | }else{ |
| | | List<CreateUnqualifiedDTO> createUnqualifiedDTOList = autoWorkReportDTO.getCreateUnqualifiedDTOList(); |
| | | BigDecimal unqualified = createUnqualifiedDTOList.stream().map(s -> s.getUnQualifiedNum()).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | if(unqualified.compareTo(autoWorkReportDTO.getCreateWorkorderRecordDTO().getUnQualifiedNum())!=Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸è¯é¡¹é误ï¼è¯·æ£æ¥ä¸è¯é¡¹æ°æ®"); |
| | | } |
| | | for (CreateUnqualifiedDTO createUnqualifiedDTO:createUnqualifiedDTOList) { |
| | | if(createUnqualifiedDTO.getUnQualifiedNum().compareTo(BigDecimal.ZERO)==Constants.ZERO |
| | | ||Objects.isNull(createUnqualifiedDTO.getCategoryId())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸è¯é¡¹é误ï¼è¯·æ£æ¥ä¸è¯é¡¹æ°æ®"); |
| | | } |
| | | UnqualifiedRecord unqualifiedRecord = new UnqualifiedRecord(); |
| | | unqualifiedRecord.setDeleted(Constants.ZERO); |
| | | unqualifiedRecord.setCreateUser(user.getId()); |
| | | unqualifiedRecord.setCreateTime(new Date()); |
| | | unqualifiedRecord.setRootDepartId(plans.getRootDepartId()); |
| | | unqualifiedRecord.setDepartId(plans.getDepartId()); |
| | | unqualifiedRecord.setWorkorderId(workorder.getId()); |
| | | unqualifiedRecord.setRecordId(workorderRecord.getId()); |
| | | unqualifiedRecord.setCategoryId(createUnqualifiedDTO.getCategoryId()); |
| | | unqualifiedRecord.setUnqualifiedNum(createUnqualifiedDTO.getUnQualifiedNum()); |
| | | unqualifiedRecordMapper.insert(unqualifiedRecord); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | i.setFinishUnQualifiedNum(Objects.isNull(plansExtListVO.getUnqulifiedNum())?Constants.ZERO:plansExtListVO.getUnqulifiedNum()); |
| | | i.setFinishNum(Objects.isNull(plansExtListVO.getDoneNum())?Constants.ZERO:plansExtListVO.getDoneNum()); |
| | | } |
| | | if (Objects.nonNull(i.getPlanDate())){ |
| | | i.setHasExpire(DateUtil.toDateLocalDateTime(i.getPlanDate()).toLocalDate().isBefore(LocalDate.now())); |
| | | }else { |
| | | i.setHasExpire(false); |
| | | i.setHasExpire(false); |
| | | i.setStatus(Constants.formatIntegerNum(i.getStatus())); |
| | | if ( !i.getStatus().equals(Constants.WORKPLANHISTORY_TYPE.done) && |
| | | !i.getStatus().equals(Constants.WORKPLANHISTORY_TYPE.close)){ |
| | | if (Objects.nonNull(i.getPlanDate())){ |
| | | i.setHasExpire(DateUtil.toDateLocalDateTime(i.getPlanDate()).toLocalDate().isBefore(LocalDate.now())); |
| | | } |
| | | } |
| | | |
| | | |
| | | }); |
| | | } |
| | | return PageData.from(new PageInfo<>(result)); |
| | |
| | | result.setStartNum(workorderExtMapper.selectCount(param)); |
| | | param.setStatusList(new ArrayList<>()); |
| | | param.getStatusList().add(Constants.WORKORDER_STATUS.done); |
| | | param.getStatusList().add(Constants.WORKORDER_STATUS.producing); |
| | | param.getStatusList().add(Constants.WORKORDER_STATUS.check); |
| | | //è¿è¡ä¸æ°é |
| | | result.setIngNum(workorderExtMapper.selectCount(param)); |
| | |
| | | private MaterialExtMapper materialExtMapper; |
| | | @Autowired |
| | | private SalaryParamMapper salaryParamMapper; |
| | | @Autowired |
| | | private PlansExtMapper plansExtMapper; |
| | | @Autowired |
| | | private DeviceExtMapper deviceExtMapper; |
| | | |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | @Override |
| | |
| | | return mp; |
| | | } |
| | | |
| | | private void getPlansAndValid(LoginUserInfo user, Plans mp) throws BusinessException{ |
| | | if(mp== null){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "对ä¸èµ·ï¼è¯¥è®°å½ä¸åå¨ï¼"); |
| | | } |
| | | if(Constants.equalsInteger(mp.getPaused(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼å·¥åå·²æåï¼"); |
| | | } |
| | | } |
| | | |
| | | private QueryBomDetailExtDTO initBomParam(LoginUserInfo user, Workorder mp) throws BusinessException{ |
| | | QueryBomExtDTO bb = new QueryBomExtDTO(); |
| | |
| | | bom.setBomId(versionBom.getBomVersionId()); |
| | | // bom.setProcedureId(mp.getProcedureId()); |
| | | bom.setWorkorderId(mp.getId()); |
| | | return bom; |
| | | } |
| | | |
| | | private QueryBomDetailExtDTO initBomParamForPlans(LoginUserInfo user, Plans plans) throws BusinessException{ |
| | | QueryBomExtDTO bb = new QueryBomExtDTO(); |
| | | bb.setDepartId(plans.getDepartId()); |
| | | bb.setDeleted(Constants.ZERO); |
| | | bb.setRootDepartId(user.getRootDepartment().getId()); |
| | | bb.setMaterialId(plans.getMaterialId()); |
| | | bb.setProcedureId(plans.getProcedureId()); |
| | | BomExtListVO versionBom = bomExtMapper.selectByModel( bb); |
| | | if(versionBom == null || StringUtils.isBlank(versionBom.getVersion()) || versionBom.getBomVersionId() == null){ |
| | | return null; |
| | | // throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "对ä¸èµ·ï¼è¯¥å·¥åç©æBOMä¿¡æ¯é
ç½®æè¯¯ï¼è¯·è系管çåï¼"); |
| | | } |
| | | plans.setBomModel(versionBom); |
| | | QueryBomDetailExtDTO bom = new QueryBomDetailExtDTO(); |
| | | bom.setDeleted(Constants.ZERO); |
| | | bom.setBomId(versionBom.getBomVersionId()); |
| | | // bom.setProcedureId(mp.getProcedureId()); |
| | | bom.setPlansId(plans.getId()); |
| | | return bom; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | private void updateOrderInfo(LoginUserInfo user, Workorder mp,int status) { |
| | | |
| | | List<WorkorderHistory> whList = new ArrayList<>(); |
| | | //å·¥åå岿°æ® |
| | | Workorder order = new Workorder(); |
| | |
| | | order.setStatus(Constants.WORKORDER_STATUS.material); |
| | | }else if(status ==Constants.WORKORDER_HISTORY_STATUS.done){ |
| | | order.setStatus(Constants.WORKORDER_STATUS.done); |
| | | }else if(status ==Constants.WORKORDER_HISTORY_STATUS.material){ |
| | | }else if(status ==Constants.WORKORDER_HISTORY_STATUS.material ||status ==Constants.WORKORDER_HISTORY_STATUS.produce){ |
| | | //æææä½ |
| | | if(Constants.equalsInteger(mp.getStatus(),Constants.WORKORDER_STATUS.create) |
| | | ||Constants.equalsInteger(mp.getStatus(),Constants.WORKORDER_STATUS.material)){ |
| | |
| | | if (bomDetailList == null || bomDetailList.size() == 0) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼è¯¥çäº§ç©æçbomé
ç½®æè¯¯ï¼è¯·è系管çåï¼"); |
| | | } |
| | | for (BomDetailExtListVO i :bomDetailList) { |
| | | //æ¥è¯¢æ¯å¦ææ |
| | | if(workorderRecordExtMapper.selectCount(new QueryWrapper<WorkorderRecord>() |
| | | .eq("DELETED",Constants.ZERO).eq("MATERIAL_ID",i.getMaterialId()).eq("TYPE",Constants.ZERO))<=0){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å卿ªææBOMç©æï¼æ æ³è¿è¡æ¥å·¥"); |
| | | } |
| | | } |
| | | // for (BomDetailExtListVO i :bomDetailList) { |
| | | // //æ¥è¯¢æ¯å¦ææ |
| | | // if(workorderRecordExtMapper.selectCount(new QueryWrapper<WorkorderRecord>() |
| | | // .eq("DELETED",Constants.ZERO).eq("MATERIAL_ID",i.getMaterialId()).eq("TYPE",Constants.ZERO))<=0){ |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å卿ªææBOMç©æï¼æ æ³è¿è¡æ¥å·¥"); |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | WOutbound outbound = new WOutbound(); |
| | |
| | | |
| | | |
| | | |
| | | // private void dealAppliancePro(Workorder mp |
| | | // , LoginUserInfo user |
| | | // , List<WorkorderRecordExtListVO> allRecordList |
| | | // , List<Appliances> updateApplianceList |
| | | // , List<Appliances> updateApplianceProList |
| | | // , List<WOutboundDetail> outboundDetailList |
| | | // , List<WStock> stockList) { |
| | | // WOutbound outbound = new WOutbound(); |
| | | // outbound.setDeleted(Constants.ZERO); |
| | | // outbound.setCreateTime(DateUtil.getCurrentDate()); |
| | | // outbound.setDealDate(outbound.getCreateTime()); |
| | | // outbound.setValidDate(outbound.getCreateTime()); |
| | | // outbound.setCreateUser(user.getId()); |
| | | // outbound.setRootDepartId(mp.getRootDepartId()); |
| | | // outbound.setDepartId(mp.getDepartId()); |
| | | // outbound.setStatus(Constants.WOUTBOUND_STATUS.dealed); |
| | | // outbound.setType(Constants.WOUTBOUND_TYPE.in); |
| | | // //2022å¹´7æ1æ¥14:42:41 å å
¥åæ®ç±»å« |
| | | // outbound.setBillType(Constants.WOUTBOUND_BILLTYPE.workerOrderIn); |
| | | // outbound.setCode(wOutboundService.getNextInCode(user.getCompany().getId())); |
| | | // outbound.setOrigin(Constants.ONE); |
| | | // outbound.setOriginType(Constants.WOUTBOUND_ORIGIN_TYPE.produce); |
| | | // outbound.setOriginCode(mp.getCode()); |
| | | // outbound.setOriginId(mp.getId()); |
| | | // outbound.setPlanDate(DateUtil.getCurrentDate()); |
| | | // outbound.setProcedureId(mp.getProcedureId()); |
| | | // outbound.setUserId(user.getId()); |
| | | // outbound.setWarehouseId(mp.getFinishWarehouseId()); |
| | | // wOutboundService.create(outbound); |
| | | // |
| | | // List<WOutboundDetail> detailList = new ArrayList<>(); |
| | | // List<WOutboundRecord> recordList = new ArrayList<>(); |
| | | // for(WorkorderRecordExtListVO tModel :allRecordList){ |
| | | // if(Constants.equalsInteger(tModel.getType(),Constants.WORKORDER_RECORD_TYPE.produce)){ |
| | | // if(tModel.getNum().compareTo(BigDecimal.ZERO)<=Constants.ZERO){ |
| | | // continue; |
| | | // } |
| | | // //妿æ¯äº§åº |
| | | // mp.setHasProduceNum(Constants.formatBigdecimal(tModel.getNum()).intValue()+Constants.formatIntegerNum(mp.getHasProduceNum())); |
| | | // |
| | | // //ç©æ+æ¹æ¬¡+å·¥åº+è´¨é屿§å»é |
| | | // WOutboundDetail detail =getWoutbondDetailByList(tModel,detailList); |
| | | // if(detail!=null){ |
| | | // detail.setNum(Constants.formatBigdecimal(detail.getNum()).add(tModel.getNum())); |
| | | // }else{ |
| | | // detail = new WOutboundDetail(); |
| | | // detail.setDeleted(Constants.ZERO); |
| | | // detail.setCreateTime(DateUtil.getCurrentDate()); |
| | | // detail.setCreateUser(user.getId()); |
| | | // detail.setOutboundId(outbound.getId()); |
| | | // detail.setRootDepartId(outbound.getRootDepartId()); |
| | | // detail.setWarehouseId(outbound.getWarehouseId()); |
| | | // detail.setLocationId(mp.getFinishWarehouseLocationId()); |
| | | // detail.setNum(tModel.getNum()); |
| | | // detail.setStatus(Constants.ONE); |
| | | // detail.setDoneNum(tModel.getNum()); |
| | | // detail.setDoneDate(new Date()); |
| | | // detail.setUnitId(tModel.getUnitId()); |
| | | // detail.setBatch(tModel.getMaterialBatch()); |
| | | // detail.setProcedureId(tModel.getProcedureId()); |
| | | // detail.setMaterialId(tModel.getMaterialId()); |
| | | // detail.setQualityType(tModel.getDoneType()); |
| | | // detail.setWOutboundRecordInList(new ArrayList<>()); |
| | | // detailList.add(detail); |
| | | // } |
| | | // |
| | | // WOutboundRecord record = new WOutboundRecord(); |
| | | // record.setDeleted(Constants.ZERO); |
| | | // record.setCreateTime(DateUtil.getCurrentDate()); |
| | | // record.setCreateUser(user.getId()); |
| | | // record.setAppliancesId(tModel.getAppliancesId()); |
| | | // record.setBatch(detail.getBatch()); |
| | | // record.setRootDepartId(mp.getRootDepartId()); |
| | | // record.setNum(tModel.getNum()); |
| | | // record.setOutboundId(detail.getOutboundId()); |
| | | // record.setUnitId(detail.getUnitId()); |
| | | // record.setWarehouseId(detail.getWarehouseId()); |
| | | // record.setMaterialId(detail.getMaterialId()); |
| | | // record.setProcedureId(detail.getProcedureId()); |
| | | // record.setLocationId(detail.getLocationId()); |
| | | // record.setQualityType(detail.getQualityType()); |
| | | // detail.getWOutboundRecordInList().add(record); |
| | | // |
| | | // WStock stock = getFromStockList(mp.getFinishWarehouseLocationId(),detail.getWarehouseId(),detail.getMaterialId(),detail.getBatch(), |
| | | // tModel.getProcedureId(),tModel.getDoneType(),stockList); |
| | | // if(stock!=null){ |
| | | // //妿åºå对象已åå¨ï¼ç´æ¥å¢å 对åºçåºåé |
| | | // stock.setNum(Constants.formatBigdecimal(stock.getNum()).add(Constants.formatBigdecimal(tModel.getNum()))); |
| | | // }else{ |
| | | // stock = new WStock(); |
| | | // stock.setMaterialId(detail.getMaterialId()); |
| | | // stock.setBatch(detail.getBatch()); |
| | | // stock.setWarehouseId(outbound.getWarehouseId()); |
| | | // stock.setLocationId(mp.getFinishWarehouseLocationId()); |
| | | // stock.setUnitId(detail.getUnitId()); |
| | | // stock.setNum(Constants.formatBigdecimal(tModel.getNum())); |
| | | // stock.setProcedureId(tModel.getProcedureId()); |
| | | // stock.setQualityType(tModel.getDoneType()); |
| | | // //å¾
æ´æ°åºåä¿¡æ¯ |
| | | // stockList.add(stock); |
| | | // } |
| | | // } |
| | | // } |
| | | // for(WOutboundDetail detail : detailList){ |
| | | // wOutboundDetailExtMapper.insert(detail); |
| | | // //è®°å½åºååå¨è®°å½ |
| | | // wStockRecordExtService.saveRecord(Constants.ONE,detail.getId(),user); |
| | | // if(detail.getWOutboundRecordInList()!=null){ |
| | | // for(WOutboundRecord r : detail.getWOutboundRecordInList()){ |
| | | // r.setDetailId(detail.getId()); |
| | | // wOutboundRecordExtMapper.insert(r); |
| | | // } |
| | | // } |
| | | // } |
| | | // if(Constants.formatIntegerNum(mp.getHasProduceNum()) >Constants.formatIntegerNum(mp.getPlanNum())){ |
| | | // throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼è¯¥å·¥åçäº§åºæ°éä¸è½å¤§äºå·¥åè®¡åæ°éï¼"); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | private void dealAppliancePro(Workorder mp |
| | | , LoginUserInfo user |
| | | , List<WorkorderRecordExtListVO> allRecordList |
| | |
| | | } |
| | | //妿æ¯äº§åº |
| | | mp.setHasProduceNum(Constants.formatBigdecimal(tModel.getNum()).intValue()+Constants.formatIntegerNum(mp.getHasProduceNum())); |
| | | if(tModel.getDoneType() == null){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼å·¥è£
å¨å
·ã"+tModel.getAmodel().getCode()+"ã产åºè´¨é屿§ä¸ºç©ºï¼æ æ³æ¥å·¥ï¼"); |
| | | } |
| | | if(!Constants.equalsInteger(tModel.getDoneType(),Constants.ZERO)){ |
| | | //妿ä¸è¯ï¼ç´¯è®¡å·¥åçä¸è¯äº§åº |
| | | mp.setUnqualifiedNum(Constants.formatIntegerNum(mp.getUnqualifiedNum())+(Constants.formatBigdecimal(tModel.getNum()).intValue())); |
| | | }else{ |
| | | //妿æ¯åæ ¼ï¼ç´¯è®¡å·¥åçåæ ¼æ°é |
| | | mp.setQualifiedNum(Constants.formatIntegerNum(mp.getQualifiedNum())+(Constants.formatBigdecimal(tModel.getNum()).intValue())); |
| | | } |
| | | |
| | | //ç©æ+æ¹æ¬¡+å·¥åº+è´¨é屿§å»é |
| | | WOutboundDetail detail =getWoutbondDetailByList(tModel,detailList); |
| | | if(detail!=null){ |
| | | detail.setNum(Constants.formatBigdecimal(detail.getNum()).add(tModel.getNum())); |
| | | }else{ |
| | | detail = new WOutboundDetail(); |
| | | detail.setDeleted(Constants.ZERO); |
| | | detail.setCreateTime(DateUtil.getCurrentDate()); |
| | | detail.setCreateUser(user.getId()); |
| | | detail.setOutboundId(outbound.getId()); |
| | | detail.setRootDepartId(outbound.getRootDepartId()); |
| | | detail.setWarehouseId(outbound.getWarehouseId()); |
| | | detail.setLocationId(mp.getFinishWarehouseLocationId()); |
| | | detail.setNum(tModel.getNum()); |
| | | detail.setStatus(Constants.ONE); |
| | | detail.setDoneNum(tModel.getNum()); |
| | | detail.setDoneDate(new Date()); |
| | | detail.setUnitId(tModel.getUnitId()); |
| | | detail.setBatch(tModel.getMaterialBatch()); |
| | | detail.setProcedureId(tModel.getProcedureId()); |
| | | detail.setMaterialId(tModel.getMaterialId()); |
| | | detail.setQualityType(tModel.getDoneType()); |
| | | detail.setWOutboundRecordInList(new ArrayList<>()); |
| | | detailList.add(detail); |
| | | } |
| | | |
| | | WOutboundRecord record = new WOutboundRecord(); |
| | | record.setDeleted(Constants.ZERO); |
| | | record.setCreateTime(DateUtil.getCurrentDate()); |
| | | record.setCreateUser(user.getId()); |
| | | record.setAppliancesId(tModel.getAppliancesId()); |
| | | record.setBatch(detail.getBatch()); |
| | | record.setRootDepartId(mp.getRootDepartId()); |
| | | record.setNum(tModel.getNum()); |
| | | record.setOutboundId(detail.getOutboundId()); |
| | | record.setUnitId(detail.getUnitId()); |
| | | record.setWarehouseId(detail.getWarehouseId()); |
| | | record.setMaterialId(detail.getMaterialId()); |
| | | record.setProcedureId(detail.getProcedureId()); |
| | | record.setLocationId(detail.getLocationId()); |
| | | record.setQualityType(detail.getQualityType()); |
| | | detail.getWOutboundRecordInList().add(record); |
| | | |
| | | WStock stock = getFromStockList(mp.getFinishWarehouseLocationId(),detail.getWarehouseId(),detail.getMaterialId(),detail.getBatch(), |
| | | tModel.getProcedureId(),tModel.getDoneType(),stockList); |
| | | if(stock!=null){ |
| | | //妿åºå对象已åå¨ï¼ç´æ¥å¢å 对åºçåºåé |
| | | stock.setNum(Constants.formatBigdecimal(stock.getNum()).add(Constants.formatBigdecimal(tModel.getNum()))); |
| | | }else{ |
| | | stock = new WStock(); |
| | | stock.setMaterialId(detail.getMaterialId()); |
| | | stock.setBatch(detail.getBatch()); |
| | | stock.setWarehouseId(outbound.getWarehouseId()); |
| | | stock.setLocationId(mp.getFinishWarehouseLocationId()); |
| | | stock.setUnitId(detail.getUnitId()); |
| | | stock.setNum(Constants.formatBigdecimal(tModel.getNum())); |
| | | stock.setProcedureId(tModel.getProcedureId()); |
| | | stock.setQualityType(tModel.getDoneType()); |
| | | //å¾
æ´æ°åºåä¿¡æ¯ |
| | | stockList.add(stock); |
| | | } |
| | | //产åºåæ ¼ |
| | | this.createOutDetail(user,outbound,mp,tModel,Constants.ZERO,detailList,stockList); |
| | | //产åºä¸è¯ |
| | | this.createOutDetail(user,outbound,mp,tModel,Constants.ONE,detailList,stockList); |
| | | } |
| | | } |
| | | for(WOutboundDetail detail : detailList){ |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼è¯¥å·¥åçäº§åºæ°éä¸è½å¤§äºå·¥åè®¡åæ°éï¼"); |
| | | } |
| | | } |
| | | |
| | | |
| | | public void createOutDetail(LoginUserInfo user,WOutbound outbound,Workorder mp,WorkorderRecordExtListVO tModel,Integer doneType |
| | | ,List<WOutboundDetail> detailList,List<WStock> stockList ){ |
| | | //ç©æ+æ¹æ¬¡+å·¥åº+è´¨é屿§å»é |
| | | WOutboundDetail detail = new WOutboundDetail(); |
| | | detail.setDeleted(Constants.ZERO); |
| | | detail.setCreateTime(DateUtil.getCurrentDate()); |
| | | detail.setCreateUser(user.getId()); |
| | | detail.setOutboundId(outbound.getId()); |
| | | detail.setRootDepartId(outbound.getRootDepartId()); |
| | | detail.setWarehouseId(outbound.getWarehouseId()); |
| | | detail.setLocationId(mp.getFinishWarehouseLocationId()); |
| | | detail.setNum(BigDecimal.valueOf(doneType.equals(Constants.ZERO)?tModel.getQualifiedNum():tModel.getUnqualifiedNum())); |
| | | detail.setStatus(Constants.ONE); |
| | | detail.setDoneNum(detail.getNum()); |
| | | detail.setDoneDate(new Date()); |
| | | detail.setUnitId(tModel.getUnitId()); |
| | | detail.setBatch(tModel.getMaterialBatch()); |
| | | detail.setProcedureId(tModel.getProcedureId()); |
| | | detail.setMaterialId(tModel.getMaterialId()); |
| | | detail.setQualityType(doneType); |
| | | detail.setWOutboundRecordInList(new ArrayList<>()); |
| | | detailList.add(detail); |
| | | |
| | | WOutboundRecord record = new WOutboundRecord(); |
| | | record.setDeleted(Constants.ZERO); |
| | | record.setCreateTime(DateUtil.getCurrentDate()); |
| | | record.setCreateUser(user.getId()); |
| | | record.setAppliancesId(tModel.getAppliancesId()); |
| | | record.setBatch(detail.getBatch()); |
| | | record.setRootDepartId(mp.getRootDepartId()); |
| | | record.setNum(tModel.getNum()); |
| | | record.setOutboundId(detail.getOutboundId()); |
| | | record.setUnitId(detail.getUnitId()); |
| | | record.setWarehouseId(detail.getWarehouseId()); |
| | | record.setMaterialId(detail.getMaterialId()); |
| | | record.setProcedureId(detail.getProcedureId()); |
| | | record.setLocationId(detail.getLocationId()); |
| | | record.setQualityType(detail.getQualityType()); |
| | | detail.getWOutboundRecordInList().add(record); |
| | | |
| | | WStock stock = getFromStockList(mp.getFinishWarehouseLocationId(),detail.getWarehouseId(),detail.getMaterialId(),detail.getBatch(), |
| | | tModel.getProcedureId(),tModel.getDoneType(),stockList); |
| | | if(stock!=null){ |
| | | //妿åºå对象已åå¨ï¼ç´æ¥å¢å 对åºçåºåé |
| | | stock.setNum(Constants.formatBigdecimal(stock.getNum()).add(Constants.formatBigdecimal(tModel.getNum()))); |
| | | }else{ |
| | | stock = new WStock(); |
| | | stock.setMaterialId(detail.getMaterialId()); |
| | | stock.setBatch(detail.getBatch()); |
| | | stock.setWarehouseId(outbound.getWarehouseId()); |
| | | stock.setLocationId(mp.getFinishWarehouseLocationId()); |
| | | stock.setUnitId(detail.getUnitId()); |
| | | stock.setNum(Constants.formatBigdecimal(tModel.getNum())); |
| | | stock.setProcedureId(tModel.getProcedureId()); |
| | | stock.setQualityType(tModel.getDoneType()); |
| | | //å¾
æ´æ°åºåä¿¡æ¯ |
| | | stockList.add(stock); |
| | | } |
| | | } |
| | | |
| | | |
| | | private WStock initMaterialNum(Integer materialId, BigDecimal num) { |
| | | WStock s = new WStock(); |
| | |
| | | return PageData.from(new PageInfo<>(result)); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public PageData<WStockExtListVO> choiceStockPageForPlans(PageWrap<QueryWStockDto> pageWrap,LoginUserInfo userInfo) { |
| | | Plans plans =plansExtMapper.selectById(pageWrap.getModel().getPlansId()); |
| | | if(Objects.isNull(plans)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼æªæ¥è¯¢å°å·¥åºè®¡åä¿¡æ¯ï¼"); |
| | | } |
| | | Device device = deviceExtMapper.selectById(pageWrap.getModel().getDeviceId()); |
| | | if(Objects.isNull(plans)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼æªæ¥è¯¢å°è®¾å¤ä¿¡æ¯ï¼"); |
| | | } |
| | | //æ¥è¯¢å¹¶éªè¯å·¥åä¿¡æ¯ |
| | | this.getPlansAndValid(userInfo,plans); |
| | | //æ¥è¯¢å
¨é¨bomç»ææ°æ®ï¼å¦ææBOMé
ç½®ï¼æç
§BOMç»æè¿è¡ææï¼å¦ææ²¡æBOMé
ç½®ï¼åææç©æä¸ºå¾
ç产åºä½çç©ææ¬èº« |
| | | QueryBomDetailExtDTO bdparam = initBomParamForPlans(userInfo,plans); |
| | | List<BomDetailExtListVO> bomDetailList = null; |
| | | if(bdparam!=null){ |
| | | bomDetailList = bomDetailExtMapper.selectList(bdparam); |
| | | List<Integer> materialDistributeId = bomDetailList.stream().map(BomDetailExtListVO::getMaterialId).collect(Collectors.toList()); |
| | | pageWrap.getModel().setMaterialDistributeId(materialDistributeId); |
| | | }else{ |
| | | //æ¥è¯¢ç©æBOMä¿¡æ¯ |
| | | Bom bom = bomExtMapper.selectOne(new QueryWrapper<Bom>().eq("MATERIAL_ID",plans.getMaterialId()).eq("DELETED",Constants.ZERO).last(" limit 1 ")); |
| | | if(Objects.isNull(bom)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼æªæ¥è¯¢å°BOMä¿¡æ¯ï¼"); |
| | | } |
| | | RouteProcedure currentRouteProcedure = routeProcedureExtMapper.selectOne(new QueryWrapper<RouteProcedure>() |
| | | .eq("ROUTE_ID",bom.getRouteId()) |
| | | .eq("PROCEDURE_ID",plans.getProcedureId()) |
| | | .last(" limit 1 ") |
| | | ); |
| | | if(currentRouteProcedure!=null){ |
| | | RouteProcedure routeProcedure = routeProcedureExtMapper.selectOne(new QueryWrapper<RouteProcedure>() |
| | | .eq("ROUTE_ID",currentRouteProcedure.getRouteId()).apply(" SORTNUM < " + currentRouteProcedure.getSortnum() ).eq("STATUS",Constants.ONE).orderByDesc(" SORTNUM ").last(" limit 1 ") |
| | | ); |
| | | if(Objects.isNull(routeProcedure)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼æªæ¥è¯¢å°çäº§ç©æä¸ä¸æ¥å·¥åºä¿¡æ¯ï¼"); |
| | | } |
| | | pageWrap.getModel().setProcedureId(routeProcedure.getProcedureId()); |
| | | pageWrap.getModel().setMaterialId(plans.getMaterialId()); |
| | | } |
| | | } |
| | | pageWrap.getModel().setLocationId(device.getProduceWarehouseLocationId()); |
| | | PageHelper.startPage(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | List<WStockExtListVO> result = wStockExtMapper.choiceStockList(pageWrap.getModel()); |
| | | return PageData.from(new PageInfo<>(result)); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | |
| | | workorderRecord.setSalaryPrice(salaryParam.getSalary()); |
| | | workorderRecord.setSalaryType(salaryParam.getType()); |
| | | workorderRecord.setSalaryUnqualified(salaryParam.getUnqualified()); |
| | | |
| | | //è®¡ä»¶å·¥èµ |
| | | if(salaryParam.getType().equals(Constants.ZERO)){ |
| | | workorderRecord.setSalaryNum(salaryParam.getNum()); |
| | | workorderRecord.setSalary(salaryParam.getSalary().multiply(salaryParam.getUnqualified()==Constants.ZERO?num:createWorkorderRecordDTO.getUnQualifiedNum())); |
| | | workorderRecord.setSalary(salaryParam.getSalary().multiply(salaryParam.getUnqualified()==Constants.ONE?num:createWorkorderRecordDTO.getQualifiedNum())); |
| | | }else{ |
| | | workorderRecord.setDuration(createWorkorderRecordDTO.getDuration()); |
| | | workorderRecord.setSalary(BigDecimal.valueOf(createWorkorderRecordDTO.getDuration()).multiply(salaryParam.getSalary()).divide(new BigDecimal(3600))); |
| | | } |
| | | |
| | | //æå
¥å·¥åæä½è®°å½ï¼å¹¶ä¸å¤ææ¯å¦æ´æ¹ä¸ºå·¥åçç¶æãç产ä¸ã |
| | | updateOrderInfo(loginUserInfo,workorder,Constants.WORKORDER_HISTORY_STATUS.produce); |
| | | workorderRecordExtMapper.insert(workorderRecord); |
| | | return workorderRecord; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | loginLog.setSuccess(Boolean.TRUE); |
| | | systemLoginLogService.create(loginLog); |
| | | String session = (String)subject.getSession().getId(); |
| | | wxLoginVO.setLoginStatus(Constants.ONE); |
| | | wxLoginVO.setLoginStatus(Constants.ZERO); |
| | | wxLoginVO.setSession(session); |
| | | return wxLoginVO; |
| | | }catch (AuthenticationException e) { |
| | |
| | | <select id="selectByModel" parameterType="doumeemes.dao.ext.dto.QueryPlansExtDTO" resultMap="PlansExtListVO"> |
| | | SELECT |
| | | `a`.* |
| | | ,( SELECT sum( b.PLAN_NUM ) FROM workorder b WHERE b.deleted = 0 AND b.PLAN_ID = a.id and b.status !=6) AS workorderDistributNum |
| | | ,ifnull(( SELECT sum( b.PLAN_NUM ) FROM workorder b WHERE b.deleted = 0 AND b.PLAN_ID = a.id and b.status not in (7,8) ),0) AS workorderDistributNum |
| | | from plans a |
| | | <where> |
| | | <if test="id != null"> |
| | |
| | | `usermodel`.`SYSTEMID` AS USERMODEL_SYSTEMID, |
| | | `usermodel`.`INVALID_TIME` AS USERMODEL_INVALID_TIME, |
| | | `usermodel`.`TYPE` AS USERMODEL_TYPE |
| | | ,( SELECT sum( b.PLAN_NUM ) FROM workorder b WHERE b.deleted = 0 AND b.PLAN_ID = a.id and b.status !=6) AS workorderDistributNum , |
| | | , ifnull(( SELECT sum( b.PLAN_NUM ) FROM workorder b WHERE b.deleted = 0 AND b.PLAN_ID = a.id and b.status !=6),0) AS workorderDistributNum , |
| | | `mmodel`.name as materialName , `mmodel`.code as materialCode ,`fmodel`.name as factoryName , `pmodel`.name as produceName , |
| | | concat(`usermodel`.realname,' ',`usermodel`.mobile) as planUserName , `umodel`.name as unitName , |
| | | w.PLAN_CODE as workPlanCode |
| | | |
| | | w.PLAN_CODE as workPlanCode , w.SALESORDER as salesOrder , |
| | | w.START_DATE as workPlanStartDate , w.PLAN_DATE as workPlanEndDate, |
| | | w.`PLAN_DATE` as workPlanPlanDate, |
| | | ifnull((select sum(worder.PLAN_NUM) from workorder worder where worder.PLAN_ID = a.id and worder.STATUS not in (7,8) ),0) as produceNum |
| | | FROM `plans` `a` |
| | | LEFT JOIN `department` `dmodel` ON a.DEPART_ID=dmodel.ID |
| | | LEFT JOIN `material_distribute` `mdmodel` ON a.MATERIAL_ID=mdmodel.ID |
| | |
| | | </if> |
| | | <if test="planDate != null"> |
| | | AND `a`.`PLAN_DATE` = #{planDate} |
| | | </if> |
| | | <if test="planDateStartDate != null and planDateStartDate != ''"> |
| | | AND `a`.`PLAN_DATE` >= concat(#{planDateStartDate},' 00:00:00') |
| | | </if> |
| | | <if test="planDateEndDate != null and planDateEndDate != ''"> |
| | | AND concat(#{planDateEndDate},' 23:59:59') >= `a`.`PLAN_DATE` |
| | | </if> |
| | | <if test="materialId != null"> |
| | | AND `a`.`MATERIAL_ID` = #{materialId} |
| | |
| | | <if test="usermodelInvalidTime != null"> |
| | | AND `usermodel`.`INVALID_TIME` = #{usermodelInvalidTime} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND `a`.`PLAN_DATE` >= #{startDate} |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND #{endDate} >= `a`.`PLAN_DATE` |
| | | </if> |
| | | <!-- <if test="startDate != null">--> |
| | | <!-- AND `a`.`PLAN_DATE` >= #{startDate}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="endDate != null">--> |
| | | <!-- AND #{endDate} >= `a`.`PLAN_DATE`--> |
| | | <!-- </if>--> |
| | | <if test="mixParam != null and mixParam!=''"> |
| | | AND (mmodel.name like concat('%',#{mixParam},'%') or mmodel.code like concat('%',#{mixParam},'%') or pmodel.name like concat('%',#{mixParam},'%')) |
| | | </if> |
| | |
| | | from |
| | | salary_param sp |
| | | LEFT JOIN procedures p on p.ID = sp.PROCEDURE_ID |
| | | LEFT JOIN material m on m.ID = sp.MATERIAL_ID |
| | | LEFT JOIN material_distribute md on md.ID = sp.MATERIAL_ID |
| | | LEFT JOIN material m on m.ID = md.MATERIAL_ID |
| | | LEFT JOIN `system_user` su on su.ID = sp.CREATE_USER |
| | | where |
| | | sp.DELETED = 0 |
| | | <if test="model.keyWord != null and model.keyWord != ''"> |
| | | ( and p`NAME` like concat('%',#{model.keyWord},'%') |
| | | or p.`CODE` = #{model.keyWord})</if> |
| | | and ( m.`NAME` like concat('%',#{model.keyWord},'%') |
| | | or m.`CODE` = #{model.keyWord})</if> |
| | | <if test="model.procedureName != null and model.procedureName != ''"> and p.`NAME` like concat('%',#{model.procedureName},'%')</if> |
| | | <if test="model.type != null"> and sp.`TYPE` = #{model.type}</if> |
| | | order by sp.CREATE_TIME desc |
| | | </select> |
| | | </mapper> |
| | |
| | | AND `umodel`.`ROOT_DEPART_ID` = #{umodelRootDepartId} |
| | | </if> |
| | | <if test="umodelName != null and umodelName != ''"> |
| | | AND `umodel`.`NAME` = #{umodelName} |
| | | AND `umodel`.`NAME` like concat('%', #{umodelName} , '%') |
| | | </if> |
| | | <if test="umodelPhone != null and umodelPhone != ''"> |
| | | AND `umodel`.`PHONE` = #{umodelPhone} |
| | |
| | | AND `a`.`SALESORDER` like concat('%',#{salesorder},'%') |
| | | </if> |
| | | <if test="startDateStart != null and startDateStart != ''"> |
| | | AND `a`.`START_DATE` >= concat(#{planDateStart},' 00:00:00') |
| | | AND `a`.`START_DATE` >= concat(#{startDateStart},' 00:00:00') |
| | | </if> |
| | | <if test="startDateEnd != null and startDateEnd != ''"> |
| | | AND concat(#{planDateEnd},' 23:59:59') >= `a`.`START_DATE` |
| | | AND concat(#{startDateEnd},' 23:59:59') >= `a`.`START_DATE` |
| | | </if> |
| | | <if test="planDateStart != null and planDateStart != ''"> |
| | | AND `a`.`PLAN_DATE` >= concat(#{planDateStart},' 00:00:00') |
| | |
| | | AND concat(#{planDateEnd},' 23:59:59') >= `a`.`PLAN_DATE` |
| | | </if> |
| | | </where> |
| | | order by a.PLAN_DATE desc, a.CREATE_TIME desc |
| | | order by a.START_DATE desc, a.CREATE_TIME desc |
| | | </select> |
| | | |
| | | |
| | |
| | | <if test="materialName != null and materialName !=''"> |
| | | AND (c.`name` like concat('%', #{materialName},'%') or c.`code` like concat('%', #{materialName},'%')) |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND a.`CREATE_TIME` >= #{startDate} |
| | | <if test="startDate != null and startDate != ''"> |
| | | AND a.`CREATE_TIME` >= concat(#{startDate},' 00:00:00') |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND #{endDate} >= a.`CREATE_TIME` |
| | | <if test="endDate != null and endDate != ''"> |
| | | AND concat(#{endDate},' 23:59:59') >= a.`CREATE_TIME` |
| | | </if> |
| | | <if test="userId != null"> |
| | | AND a.`CREATE_USER` = #{userId} |
| | |
| | | AND `CREATE_USER` = #{userId} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND a.`CREATE_TIME` >= #{startDate} |
| | | AND `CREATE_TIME` >= #{startDate} |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND #{endDate} >= a.`CREATE_TIME` |
| | | AND #{endDate} >= `CREATE_TIME` |
| | | </if> |
| | | group by `CREATE_USER` |
| | | <!-- order by `CREATE_TIME` desc--> |
| | |
| | | # æ¥å£åç¼ |
| | | VUE_APP_API_PREFIX = '' |
| | | |
| | | # æµè¯æå¡å¨ |
| | | # VUE_APP_BASE_URL = 'http://139.186.142.91:10012/' |
| | | # æ±æº |
| | | # VUE_APP_BASE_URL = 'https://106.14.220.133:10012/' |
| | | |
| | | # ç¦æ¾ |
| | | # VUE_APP_BASE_URL = 'http://192.168.0.36:10021/' |
| | | |
| | | # 任康 |
| | | VUE_APP_BASE_URL = 'http://192.168.0.15:10021/' |
| | | |
| | | # VUE_APP_BASE_URL = 'https://dmtest.ahapp.net/doumeeplant_api/' |
| | | # æ±è |
| | | # VUE_APP_BASE_URL = 'http://192.168.0.35:10021/' |
| | | |
| | | # æµè¯æå¡å¨ |
| | | VUE_APP_BASE_URL = 'https://dmtest.ahapp.net/doumeeplant_api/' |
| | | |
| | |
| | | VUE_APP_ROUTER_MODE = 'hash' |
| | | |
| | | # 项ç®ä¸ä¸æè·¯å¾ |
| | | # VUE_APP_CONTEXT_PATH = '/doumeeplant_web/' |
| | | VUE_APP_CONTEXT_PATH = '/web/' |
| | | |
| | | # æ¥å£åç¼ |
| | | VUE_APP_API_PREFIX = '/doumeeplant' |
| | | |
| | | # æµè¯æå¡å¨ |
| | | # VUE_APP_BASE_URL = 'http://139.186.142.91:10012/' |
| | | # æ¼ç¤ºæå¡å¨ |
| | | # VUE_APP_BASE_URL = 'http://121.41.112.139:10012/' |
| | | # æ£å¼ç¯å¢ |
| | | # VUE_APP_BASE_URL = 'http://127.0.0.1:10012/' |
| | | #è¾ä¸½æ ¼æ¯ https://hsky.doumee.com/doumeeplant_api/doc.html |
| | | # VUE_APP_BASE_URL = 'https://hsky.doumee.com/doumeeplant_api/' |
| | | |
| | | # VUE_APP_BASE_URL = 'https://dmtest.ahapp.net/doumeeplant_api/' |
| | | |
| | | VUE_APP_BASE_URL = 'https://www.mes.red/doumeeplant/' |
| | |
| | | "alias": "eva", |
| | | "command": "page", |
| | | "option": { |
| | | "resources": "workorder_check_attr_ext" |
| | | "resources": "salary_param" |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | return request.post('/business/salaryParam/page', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // 导åºExcel |
| | | export function exportExcel (data) { |
| | | return request.post('/business/salaryParam/exportExcel', data, { |
| | | trim: true, |
| | | download: true |
| | | }) |
| | | } |
| | | |
| | | // å建 |
| | | export function create (data) { |
| | | return request.post('/business/salaryParam/create', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/business/salaryParam/updateById', data) |
| | | } |
| | | |
| | | // å é¤ |
| | | export function deleteById (id) { |
| | | return request.get(`/business/salaryParam/delete/${id}`) |
| | | } |
| | | |
| | | // æ¹éå é¤ |
| | | export function deleteByIdInBatch (ids) { |
| | | return request.get('/business/salaryParam/delete/batch', { |
| | | params: { |
| | | ids |
| | | } |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | return request.post('/ext/workorderRecordExt/salaryStatistic', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // 导åºExcel |
| | | export function exportExcel (data) { |
| | | return request.post('/ext/workorderRecordExt/exportSalaryStatistics', data, { |
| | | trim: true, |
| | | download: true |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | return request.post('/ext/workorderRecordExt/userSalary', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // 导åºExcel |
| | | export function exportExcel (data) { |
| | | return request.post('/ext/workorderRecordExt/exportUserSalary', data, { |
| | | trim: true, |
| | | download: true |
| | | }) |
| | | } |
| | |
| | | .success{ color: #70B603; }
|
| | | .waring{ color: #F59A23; }
|
| | | .error{ color: #f00; }
|
| | | .c1{color: #111}.c2{color: #222}.c3{ color: #333;}.c6{ color: #666;}.cc{ color: #ccc;}.cf{ color: #fff;}
|
| | | /* /deep/ .uicon-close .u-icon--right{ position: absolute; right: 30px; top: 30px; z-index: 999;} */
|
| | | .popCloseBtn{ position: absolute; width:50px; height:50px; right: 20px; top: 20px;}
|
| | | .fixedHeader{ position: absolute; left: 0; top: 0;}
|
| | |
| | | .el-date-editor--daterange.el-input__inner, |
| | | .el-date-editor--timerange.el-input, |
| | | .el-date-editor--timerange.el-input__inner { |
| | | width: 220px !important; |
| | | width: 240px !important; |
| | | } |
| | | |
| | | .el-input__inner { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="计价æ¹å¼" prop="type"> |
| | | <el-select v-model="form.type" placeholder="è¯·éæ©è®¡ä»·æ¹å¼" clearable> |
| | | <el-option |
| | | v-for="item in type" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥å" prop="departId"> |
| | | <el-select v-model="form.departId" placeholder="è¯·éæ©å·¥å" :disabled="isEdit" clearable @change="selectFactoey"> |
| | | <el-option |
| | | v-for="item in factories" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æ" prop="materialId"> |
| | | <el-select v-model="form.materialId" placeholder="è¯·éæ©ç©æ" :disabled="isEdit" clearable @change="selectMaterial"> |
| | | <el-option |
| | | v-for="item in materials" |
| | | :key="item.realMaterialId" |
| | | :label="item.mmodel.name" |
| | | :value="item.realMaterialId" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åº" prop="procedureId"> |
| | | <el-select v-model="form.procedureId" placeholder="è¯·éæ©å·¥åº" :disabled="isEdit" clearable> |
| | | <el-option |
| | | v-for="item in productes" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥èµåä»·ï¼å
)" prop="salary"> |
| | | <el-input v-model="form.salary" placeholder="请è¾å
¥å·¥èµåä»·ï¼å
)" @input="inputZAction(form, 'salary')" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="æ åæç" prop="num"> |
| | | <div style="display: flex;"> |
| | | <el-input v-model="form.num" v-trim/>/ |
| | | <el-input v-model="form.hours" v-trim/><div class="unit">å°æ¶</div> |
| | | <el-input v-model="form.minute" v-trim/><div class="unit">åé</div> |
| | | <el-input v-model="form.second" v-trim/><div>ç§</div> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸è¯åæ¯å¦è®¡å
¥" prop="unqualified"> |
| | | <el-switch v-model="form.unqualified" :inactive-value="0" :active-value="1"></el-switch> |
| | | <!-- <el-input v-model="form.unqualified" placeholder="请è¾å
¥ä¸è¯åæ¯å¦è®¡å
¥ 0å¦ 1æ¯" v-trim/> --> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { getDepartmentListByConditon } from '@/api/ext/departmentExt' |
| | | import { getBomMaterialList } from '@/api/ext/bomExt' |
| | | import { routeExt as proceList } from '@/api/ext/routeProcedureExt' |
| | | import { numRule } from '@/utils/form' |
| | | export default { |
| | | name: 'OperaSalaryParamWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | materialId: '', |
| | | createUser: '', |
| | | createTime: '', |
| | | updateUser: '', |
| | | updateTime: '', |
| | | remark: '', |
| | | rootDepartId: '', |
| | | departId: '', |
| | | procedureId: '', |
| | | bomId: '', |
| | | salary: '', |
| | | num: '', |
| | | times: '', |
| | | hours: '', |
| | | minute: '', |
| | | second: '', |
| | | unqualified: 0, |
| | | type: '' |
| | | }, |
| | | isEdit: false, |
| | | type: [ |
| | | { label: '计件', value: 0 }, |
| | | { label: '计æ¶', value: 1 }, |
| | | ], |
| | | factories: [], |
| | | materials: [], |
| | | productes: [], |
| | | // éªè¯è§å |
| | | rules: { |
| | | departId: [ |
| | | { required: true, validator: numRule, message: 'è¯·éæ©å·¥å', tigger: 'change' } |
| | | ], |
| | | materialId: [ |
| | | { required: true, validator: numRule, message: 'è¯·éæ©ç©æ', tigger: 'change' } |
| | | ], |
| | | procedureId: [ |
| | | { required: true, validator: numRule, message: 'è¯·éæ©å·¥åº', tigger: 'change' } |
| | | ], |
| | | salary: [ |
| | | { required: true, validator: numRule, message: '请è¾å
¥å·¥èµåä»·', tigger: 'blur' } |
| | | ], |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/salaryParam', |
| | | 'field.id': 'id' |
| | | }) |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | open (title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.isEdit = false |
| | | // æ°å»º |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | this.form.times = '' |
| | | this.form.second = '' |
| | | this.form.minute = '' |
| | | this.form.hours = '' |
| | | this.form.departId = this.factories[0]?this.factories[0].id:'' |
| | | this.selectFactoey(this.form.departId) |
| | | }) |
| | | return |
| | | } |
| | | // ç¼è¾ |
| | | this.$nextTick(() => { |
| | | this.isEdit = true |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | let { times } = target |
| | | this.form.second = +times%60 |
| | | let lesMin = Math.floor(+times/60) |
| | | this.form.minute = lesMin%60 |
| | | this.form.hours = Math.floor(lesMin/60) |
| | | this.selectFactoey(this.form.departId, true) |
| | | |
| | | }) |
| | | }, |
| | | initData() { |
| | | getDepartmentListByConditon({ type: 1 }) |
| | | .then(res => { |
| | | this.factories = res |
| | | }) |
| | | .catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | selectFactoey (v, isEdit=false) { |
| | | |
| | | // console.log(v) |
| | | if (!isEdit) { |
| | | this.materials = [] |
| | | this.form.materialId = '' |
| | | this.form.procedureId = '' |
| | | this.productes = [] |
| | | } |
| | | getBomMaterialList({ departId: v }) |
| | | .then(res => { |
| | | // console.log(res) |
| | | this.materials = res |
| | | // if (!isEdit) { |
| | | // this.form.materialId = res[0]?res[0].materialId:'' |
| | | // } |
| | | // this.selectMaterial(this.form.materialId) |
| | | }) |
| | | .catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | selectMaterial (id, isEdit) { |
| | | |
| | | let routeId; |
| | | for (const item of this.materials) { |
| | | if (item.realMaterialId === id) { |
| | | routeId = item.routeId |
| | | } |
| | | } |
| | | proceList(routeId) |
| | | .then(res => { |
| | | // console.log(res) |
| | | this.productes = res.proceList |
| | | if (!isEdit) { |
| | | // debugger |
| | | this.form.procedureId = this.productes[0]?this.productes[0].id:'' |
| | | } |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | // 2使æéå®ï¼æ£ï¼ |
| | | inputZAction(item, key) { |
| | | item[key] = item[key].replace(/[^\d.]/g, '') |
| | | .replace(/\.{2,}/g, '.') |
| | | .replace('.', '$#$') |
| | | .replace(/\./g, '') |
| | | .replace('$#$', '.') |
| | | .replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') |
| | | .replace(/^\./g, '') |
| | | }, |
| | | confirm () { |
| | | // console.log((+this.form.hours) * 3600); |
| | | // console.log((+this.form.minute) * 60); |
| | | // console.log(this.form.second); |
| | | this.form.times = (+this.form.hours) * 3600 + (+this.form.minute)* 60 + (+this.form.second) |
| | | if (this.form.id == null || this.form.id === '') { |
| | | this.__confirmCreate() |
| | | return |
| | | } |
| | | this.__confirmEdit() |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .unit { |
| | | white-space: nowrap; |
| | | } |
| | | </style> |
| | |
| | | {{title}} |
| | | </h2> |
| | | <div class="user"> |
| | | <div class="user_help" @click="jumpWord"> |
| | | <img src="@/assets/images/ic_help@2x.png" alt="" /> |
| | | <span>å¸®å©ææ¡£</span> |
| | | <div class="help" @click="jumpWord"> |
| | | <div class="user_help"> |
| | | <img src="@/assets/images/ic_help@2x.png" alt="" /> |
| | | <span>å¸®å©ææ¡£</span> |
| | | </div> |
| | | <span class="ml5 mr5">|</span> |
| | | <span>ä¼ä¸ä»£ç ï¼ {{ tempId }}</span> |
| | | </div> |
| | | <div style="margin-right: 10px;">ä¼ä¸ä»£ç ï¼ {{ tempId }}</div> |
| | | <!-- <div style="margin-right: 10px;">ä¼ä¸ä»£ç ï¼ {{ tempId }}</div> --> |
| | | <el-dropdown trigger="click" style="margin-right: 20px;" v-userState @command="select"> |
| | | <span class="el-dropdown-link"> |
| | | {{ tempC }}<i class="el-icon-arrow-down el-icon--right"></i> |
| | | <span class="c2 f16">{{ tempC }}</span><i class="el-icon-arrow-down el-icon--right"></i> |
| | | </span> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item v-for="(item, index) in cList" :key="index" :command='item.id'>{{ item.name }}</el-dropdown-item> |
| | |
| | | created () { |
| | | if (this.userInfo.curComDepartment) { |
| | | this.tempC = this.userInfo.curComDepartment.name |
| | | this.tempId = this.userInfo.curComDepartment.id |
| | | this.tempId = this.userInfo.company.id |
| | | } |
| | | getDepartmentListByConditon({ |
| | | type: 0 |
| | |
| | | // width: 30%; |
| | | flex-shrink: 0; |
| | | // text-align: right; |
| | | vertical-align: middle; |
| | | display: flex; |
| | | align-items: center; |
| | | .user_help { |
| | | width: 111px; |
| | | height: 36px; |
| | | .help { |
| | | display: flex; |
| | | height: 29px; |
| | | line-height: 38px; |
| | | align-items: center; |
| | | justify-content: center; |
| | | background: #F7F7F7; |
| | | border-radius: 4px; |
| | | vertical-align: middle; |
| | | margin-right: 30px; |
| | | cursor: pointer; |
| | | img { |
| | | width: 16px; |
| | | height: 16px; |
| | | margin-right: 7px !important; |
| | | } |
| | | span { |
| | | font-size: 16px; |
| | | font-size: 12px; |
| | | font-family: PingFangSC-Regular, PingFang SC; |
| | | font-weight: 400; |
| | | vertical-align: middle; |
| | | color: #666666; |
| | | } |
| | | .user_help { |
| | | // width: 111px; |
| | | |
| | | // background: #F7F7F7; |
| | | |
| | | |
| | | cursor: pointer; |
| | | img { |
| | | width: 16px; |
| | | height: 16px; |
| | | margin-right: 7px !important; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | .el-dropdown { |
| | | flex-shrink: 0; |
| | | top: 2px; |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="1182px" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <GlobalWindow :title="title" width="1182px" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <div style="min-width:1150px"> |
| | | <el-form :model="form" ref="form" label-width="100px" label-suffix="ï¼" inline> |
| | | <div style="margin-bottom:15px"> |
| | | <span class="text-code">{{ form.procedureName + ' | ' + form.mmodel.name + ' ' + form.mmodel.code }}</span> |
| | | <!-- 0å·²å建ã1已夿ã2å·²å®å·¥æ£ã3å·²æ£éªã4å·²æ¥å·¥ãã6已忶 --> |
| | | <span v-if="form.status==0" style="background-color: #305ED5;" class="status-log">å·²å建</span> |
| | | <span v-else-if="form.status==6" style="background-color: #BBBBBB;" class="status-log">已忶</span> |
| | | <span v-else style="background-color: #03AF76;" class="status-log">{{ form.status==1 ? '已夿' : form.status==2 ? 'å·²å®å·¥æ£' : form.status==3 ? 'å·²æ£éª' : 'å·²æ¥å·¥' }}</span> |
| | | <span v-if="form.status == 0" style="background-color: #305ED5;" class="status-log">å·²å建</span> |
| | | <span v-else-if="form.status == 6" style="background-color: #BBBBBB;" class="status-log">已忶</span> |
| | | <span v-else style="background-color: #03AF76;" class="status-log">{{ form.status == 1 ? '已夿' : form.status == 2 ? |
| | | 'å·²å®å·¥æ£' : form.status == 3 ? 'å·²æ£éª' : 'å·²æ¥å·¥' }}</span> |
| | | <!-- <span v-if="form.status==3" style="background-color: #BBBBBB;" class="status-log">已忶</span> --> |
| | | </div> |
| | | <el-form-item label="å·¥åç¼å·" prop="workorderCode" class="count-style" > |
| | | <el-form-item label="å·¥åç¼å·" prop="workorderCode" class="count-style"> |
| | | {{ form.code }} |
| | | </el-form-item> |
| | | <el-form-item label="çäº§æ¥æ" prop="proTime" class="count-style" > |
| | | <el-form-item label="çäº§æ¥æ" prop="proTime" class="count-style"> |
| | | {{ form.planDate }} |
| | | </el-form-item> |
| | | <el-form-item label="çäº§æ¹æ¬¡å·" prop="batch" class="count-style" > |
| | | <el-form-item label="çäº§æ¹æ¬¡å·" prop="batch" class="count-style"> |
| | | {{ form.batch }} |
| | | </el-form-item> |
| | | <!-- <el-form-item label="计å人å" prop="planUser" class="count-style" > |
| | |
| | | <el-form-item label="è®¡åæ¥æ" prop="planDate" class="count-style" > |
| | | {{ form.pmodel.createTime }} |
| | | </el-form-item> --> |
| | | <el-form-item label="ç产æ°é" prop="machine" class="count-style" > |
| | | {{ form.planNum ? (form.planNum + (form.umodel.name ? form.umodel.name : '')) : '0' }} |
| | | <el-form-item label="ç产æ°é" prop="machine" class="count-style"> |
| | | {{ form.planNum ? (form.planNum + (form.umodel.name ? form.umodel.name : '')) : '0' }} |
| | | </el-form-item> |
| | | <!-- <el-form-item label="è®¡åæ°é" prop="planNum" class="count-style" > |
| | | {{ form.pmodel.num }} |
| | |
| | | <!-- <el-form-item label="å叿¥æ" prop="startDate" class="count-style" > |
| | | {{ form.pmodel.publishDate }} |
| | | </el-form-item> --> |
| | | <el-form-item label="åå·¥åå·" prop="originWorkorderId" class="count-style" > |
| | | <el-form-item label="åå·¥åå·" prop="originWorkorderId" class="count-style"> |
| | | {{ form.originWorkorderId }} |
| | | </el-form-item> |
| | | <el-form-item label="åé
人å" prop="distributeUser" class="count-style" > |
| | | <el-form-item label="åé
人å" prop="distributeUser" class="count-style"> |
| | | {{ form.userName }} |
| | | </el-form-item> |
| | | <el-form-item label="åé
æ¶é´" prop="distributeTime" class="count-style" > |
| | | <el-form-item label="åé
æ¶é´" prop="distributeTime" class="count-style"> |
| | | {{ form.createTime }} |
| | | </el-form-item> |
| | | <el-form-item label="ç产人å" prop="proUser" class="count-style" > |
| | | |
| | | <el-form-item label="ç产人å" prop="proUser" class="count-style"> |
| | | |
| | | <div v-for="(item, index) in form.proUserList" :key="index">{{ item.proUserDepartName }}</div> |
| | | <!-- {{ form.proUserName + (form.proUserDepartName ? ('/' + form.proUserDepartName) : '') }} --> |
| | | </el-form-item> |
| | | <el-form-item label="ç产设å¤" prop="machine" class="count-style" > |
| | | {{ form.pgmodel && `ã${form.pgmodel.code}ã${form.pgmodel.name}`}} |
| | | <el-form-item label="ç产设å¤" prop="machine" class="count-style"> |
| | | {{ form.pgmodel && `ã${form.pgmodel.code}ã${form.pgmodel.name}` }} |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="åæ ¼æ°é" prop="qualifiedNum" class="count-style" > |
| | | |
| | | <el-form-item label="åæ ¼æ°é" prop="qualifiedNum" class="count-style"> |
| | | {{ form.qualifiedNum ? (form.qualifiedNum + (form.umodel.name ? form.umodel.name : '')) : '0' }} |
| | | </el-form-item> |
| | | <el-form-item label="ä¸è¯æ°é" prop="unqualifiedNum" class="count-style" > |
| | | <el-form-item label="ä¸è¯æ°é" prop="unqualifiedNum" class="count-style"> |
| | | {{ form.unqualifiedNum ? (form.unqualifiedNum + (form.umodel.name ? form.umodel.name : '')) : '0' }} |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="ç产æ¥å·¥" name="first"> |
| | | <el-table |
| | | v-loading="isSearch" |
| | | :data="report" |
| | | border |
| | | show-summary |
| | | :summary-method="getReportSummaries" |
| | | > |
| | | <!-- stripe --> |
| | | <el-table v-loading="isSearch" :data="report" border show-summary :summary-method="getReportSummaries"> |
| | | <!-- stripe --> |
| | | <el-table-column prop="createTime" label="æ¥å·¥æ¶é´" min-width="140px"></el-table-column> |
| | | <el-table-column label="ç产人å" show-overflow-tooltip min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="machine" label="ç产设å¤" min-width="100px"> |
| | | {{ form.pgmodel && `ã${form.pgmodel.code}ã${form.pgmodel.name}`}} |
| | | {{ form.pgmodel && `ã${form.pgmodel.code}ã${form.pgmodel.name}` }} |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="amodel.code" label="å·¥è£
容å¨ç¼å·" show-overflow-tooltip="" min-width="100px"></el-table-column> --> |
| | | <el-table-column prop="mmodel.name" label="ç©æåç§°" show-overflow-tooltip min-width="100px"></el-table-column> |
| | | <el-table-column prop="doneType" label="æ¥å·¥ç±»å" min-width="60px"> |
| | | <el-table-column prop="qualifiedNum" label="åæ ¼æ°é" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span class="valid-style">{{ row.qualifiedNum + row.umodel.name }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unqualifiedNum" label="ä¸è¯æ°é" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span class="unvalid-style">{{ row.unqualifiedNum + row.umodel.name }}</span> |
| | | <!-- <span :class="row.materialDonetype==0 ? 'valid-style' : ''">{{ row.num + row.umodel.name }}</span> --> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="æ¥å·¥æ°é" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span>{{ row.num + row.umodel.name }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="doneType" label="æ¥å·¥ç±»å" min-width="60px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.doneType==0" class="valid-style">åæ ¼</span> |
| | | <span v-else-if="row.doneType==1" class="unvalid-style">ä¸è¯</span> |
| | |
| | | <template slot-scope="{row}"> |
| | | <span :class="row.doneType==0 ? 'valid-style' : (row.doneType==1 ? 'unvalid-style' :(row.doneType==2 ? 'scrap-style' : ''))">{{ row.num ? (row.num + (row.umodel.name ? row.umodel.name : '')) : '0' }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="ç产æ£éª" name="second"> |
| | | <el-table |
| | | v-loading="isSearch" |
| | | :data="verify" |
| | | stripe |
| | | border> |
| | | <el-table v-loading="isSearch" :data="verify" stripe border> |
| | | <el-table-column prop="code" label="æ£éªè®°å½ç¼å·" min-width="140px"></el-table-column> |
| | | <el-table-column prop="createTime" label="æ£éªæ¶é´" min-width="140px"></el-table-column> |
| | | <el-table-column prop="smodelRealName" label="æ£éªäººå" min-width="100px"></el-table-column> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="devmodel.code" label="ç产设å¤" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.devmodel && `ã${row.devmodel.code}ã${row.devmodel.name}`}} |
| | | {{ row.devmodel && `ã${row.devmodel.code}ã${row.devmodel.name}` }} |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="proUserids" label="ç产人å" show-overflow-tooltip min-width="100px"></el-table-column> --> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="ç产ææ" name="third"> |
| | | <el-table |
| | | v-loading="isSearch" |
| | | :data="feeds" |
| | | stripe |
| | | border |
| | | show-summary |
| | | :summary-method="getPutSummaries" |
| | | > |
| | | <el-table v-loading="isSearch" :data="feeds" stripe border show-summary :summary-method="getPutSummaries"> |
| | | <el-table-column prop="createTime" label="æææ¶é´" min-width="140px"></el-table-column> |
| | | <!-- <el-table-column prop="amodel.code" label="å·¥è£
容å¨ç¼å·" min-width="100px"></el-table-column> --> |
| | | <el-table-column prop="mmodel.name" label="ç©æåç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="promodel.name" label="å·¥åºåç§°" min-width="100px"></el-table-column> |
| | | <el-table-column label="è´¨é屿§" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.materialDonetype==0" class="valid-style">åæ ¼</span> |
| | | <span v-else-if="row.materialDonetype==1" class="unvalid-style">ä¸è¯</span> |
| | | <span v-else-if="row.materialDonetype==2" class="scrap-style">æ¥åº</span> |
| | | <span v-if="row.materialDonetype == 0" class="valid-style">åæ ¼</span> |
| | | <span v-else-if="row.materialDonetype == 1" class="unvalid-style">ä¸è¯</span> |
| | | <span v-else-if="row.materialDonetype == 2" class="scrap-style">æ¥åº</span> |
| | | <span v-else>-</span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="çäº§ç¹æ£" name="fourth"> |
| | | <el-table |
| | | v-loading="isSearch" |
| | | :data="check" |
| | | stripe |
| | | border |
| | | > |
| | | <el-table v-loading="isSearch" :data="check" stripe border> |
| | | <el-table-column prop="createTime" label="è®°å½æ¶é´" min-width="140px"></el-table-column> |
| | | <el-table-column prop="userName" label="æä½äººå" min-width="100px"></el-table-column> |
| | | <el-table-column prop="attrName" label="æ£ç¹å±æ§" min-width="100px"></el-table-column> |
| | |
| | | <el-table-column prop="value" align="left"></el-table-column> |
| | | </el-table> --> |
| | | </el-tab-pane> |
| | | <Pagination |
| | | style="margin-top:10px" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="pagination" |
| | | ></Pagination> |
| | | <Pagination style="margin-top:10px" @size-change="handleSizeChange" @current-change="handlePageChange" |
| | | :pagination="pagination"></Pagination> |
| | | </el-tabs> |
| | | </div> |
| | | <div slot="footer" class="window__header"> |
| | |
| | | name: 'OperaWorkorderDetailWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, Pagination }, |
| | | data () { |
| | | data() { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | |
| | | } |
| | | }, |
| | | inject: ['origins'], |
| | | created () { |
| | | created() { |
| | | this.config({ |
| | | api: '/ext/materialExt', |
| | | 'field.id': 'id' |
| | |
| | | // }) |
| | | }, |
| | | methods: { |
| | | open (title, target) { |
| | | open(title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.activeName = 'first', |
| | | // ç¼è¾ |
| | | this.$nextTick(() => { |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | // console.log('this.form', this.form) |
| | | workorderRecordExtPage( |
| | | { |
| | | capacity: this.pagination.pageSize, |
| | | model: { |
| | | type: 1, |
| | | workorderId: this.form.id |
| | | }, |
| | | page: this.pagination.pageIndex, |
| | | sorts: null |
| | | }) |
| | | .then(res => { |
| | | // console.log(res) |
| | | this.report = res.records |
| | | this.pagination.pageIndex = res.page |
| | | this.pagination.total = res.total |
| | | this.pagination.pageSize = res.capacity |
| | | }) |
| | | .catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }) |
| | | // ç¼è¾ |
| | | this.$nextTick(() => { |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | // console.log('this.form', this.form) |
| | | workorderRecordExtPage( |
| | | { |
| | | capacity: this.pagination.pageSize, |
| | | model: { |
| | | type: 1, |
| | | workorderId: this.form.id |
| | | }, |
| | | page: this.pagination.pageIndex, |
| | | sorts: null |
| | | }) |
| | | .then(res => { |
| | | // console.log(res) |
| | | this.report = res.records |
| | | this.pagination.pageIndex = res.page |
| | | this.pagination.total = res.total |
| | | this.pagination.pageSize = res.capacity |
| | | }) |
| | | .catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }) |
| | | }, |
| | | cancel () { |
| | | cancel() { |
| | | this.$refs.form.resetFields() |
| | | this.activeName = 'first' |
| | | this.pagination.pageIndex = 1 |
| | |
| | | this.pagination.total = 0 |
| | | this.visible = false |
| | | }, |
| | | statusToStr (status) { |
| | | statusToStr(status) { |
| | | for (const item of this.status) { |
| | | if (item.id === status) { |
| | | return item.name |
| | | } |
| | | } |
| | | }, |
| | | originToStr (id) { |
| | | originToStr(id) { |
| | | for (const item of this.origins()) { |
| | | if (item.id === id) { |
| | | return item.code |
| | | } |
| | | } |
| | | }, |
| | | columnStyle ({ row, column, rowIndex, columnIndex }) { |
| | | columnStyle({ row, column, rowIndex, columnIndex }) { |
| | | if (rowIndex % 2 === 0) { |
| | | // ä¿®æ¹æ¯è¡ç¬¬ä¸ä¸ªåå
æ ¼çèæ¯è² |
| | | return 'background:#f3f6fc;' |
| | |
| | | return 'background:#ffffff;' |
| | | } |
| | | }, |
| | | handleClick (tab, event) { |
| | | handleClick(tab, event) { |
| | | this.pagination.pageIndex = 1 |
| | | this.pagination.pageSize = 10 |
| | | this.pagination.total = 0 |
| | | this.search() |
| | | }, |
| | | handleSizeChange (pageSize) { |
| | | handleSizeChange(pageSize) { |
| | | this.pagination.pageSize = pageSize |
| | | this.search() |
| | | }, |
| | | handlePageChange (pageIndex) { |
| | | handlePageChange(pageIndex) { |
| | | this.pagination.pageIndex = pageIndex |
| | | // console.log('è·åæ°æ®') |
| | | this.search() |
| | | }, |
| | | search () { |
| | | search() { |
| | | if (this.activeName === 'first') { |
| | | workorderRecordExtPage( |
| | | { |
| | |
| | | workorderId: this.form.id |
| | | }, |
| | | page: this.pagination.pageIndex, |
| | | sorts: [{direction: "DESC", property: "CREATE_TIME"}] |
| | | sorts: [{ direction: "DESC", property: "CREATE_TIME" }] |
| | | }) |
| | | .then(res => { |
| | | // console.log(res) |
| | |
| | | workorderId: this.form.id |
| | | }, |
| | | page: this.pagination.pageIndex, |
| | | sorts: [{direction: "DESC", property: "CREATE_TIME"}] |
| | | sorts: [{ direction: "DESC", property: "CREATE_TIME" }] |
| | | }) |
| | | .then(res => { |
| | | // console.log(res.records) |
| | |
| | | workorderId: this.form.id |
| | | }, |
| | | page: this.pagination.pageIndex, |
| | | sorts: [{direction: "DESC", property: "CREATE_TIME"}] |
| | | sorts: [{ direction: "DESC", property: "CREATE_TIME" }] |
| | | }) |
| | | .then(res => { |
| | | // console.log(res) |
| | |
| | | workorderId: this.form.id |
| | | }, |
| | | page: this.pagination.pageIndex, |
| | | sorts: [{direction: "DESC", property: "CREATE_TIME"}] |
| | | sorts: [{ direction: "DESC", property: "CREATE_TIME" }] |
| | | }) |
| | | .then(res => { |
| | | // console.log(res) |
| | |
| | | }) |
| | | } |
| | | }, |
| | | getPutSummaries (param) { |
| | | getPutSummaries(param) { |
| | | const { columns, data } = param; |
| | | const sums = []; |
| | | columns.forEach((column, index) => { |
| | |
| | | } else if (index === 5) { |
| | | sums[index] = '-'; |
| | | return; |
| | | } |
| | | } |
| | | const values = data.map(item => Number(item[column.property])); |
| | | if (!values.every(value => isNaN(value))) { |
| | | sums[index] = 0 |
| | |
| | | }); |
| | | return sums |
| | | }, |
| | | getReportSummaries (param) { |
| | | getReportSummaries(param) { |
| | | const { columns, data } = param; |
| | | const sums = []; |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = 'å计'; |
| | | return; |
| | | } else if (index === 4) { |
| | | sums[index] = '-'; |
| | | return; |
| | | } |
| | | const values = data.map(item => Number(item[column.property])); |
| | |
| | | width: 23%; |
| | | // height: 32px; |
| | | } |
| | | |
| | | ::v-deep .el-form-item { |
| | | margin-bottom: 8px !important; |
| | | } |
| | | |
| | | .text-code { |
| | | color: #333; |
| | | font-weight: 500; |
| | | padding-right: 15px; |
| | | font-size: 15px; |
| | | vertical-align:middle; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .status-log { |
| | | padding: 1px 5px; |
| | | border-radius: 3px; |
| | | font-size: 12px; |
| | | color:#fff; |
| | | vertical-align:middle; |
| | | color: #fff; |
| | | vertical-align: middle; |
| | | } |
| | | </style> |
| | |
| | | this.form.planDate = new Date() |
| | | this.form.planId = target.id |
| | | this.form.planNum = target.num - target.distributNum |
| | | getDeviceByCondition({}) |
| | | getDeviceByCondition({procedureId: target.procedureId}) |
| | | .then(res => { |
| | | |
| | | this.device = res |
| | | this.form.proGroupId = res[0] ? res[0].id : '' |
| | | this.getUser(this.form.proGroupId) |
| | | }) |
| | | .catch(err => { |
| | | console.log(err) |
| | |
| | | <tr> |
| | | <td>æå°ä¿¡æ¯</td> |
| | | <td style="text-align:left; line-height:16px;" colspan="2"> |
| | | <div>{{ userInfo.realname + ', ' + current}}</div> |
| | | <div>{{ userInfo.companyUser.name + ', ' + current}}</div> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | |
| | | } |
| | | callback() |
| | | } |
| | | |
| | | export function numRule(rule, value, callback) { |
| | | // debugger |
| | | if (value == null || value < 0 || !value) { |
| | | callback(new Error()) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:salaryparam:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | |
| | | <el-form-item label="ç©æä¿¡æ¯" prop="keyWord"> |
| | | <el-input v-model="searchForm.keyWord" placeholder="请è¾å
¥ç©æåç§°/ç¼ç " @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åº" prop="procedureName"> |
| | | <el-input v-model="searchForm.procedureName" placeholder="请è¾å
¥å·¥åº" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="计价æ¹å¼" prop="type"> |
| | | <el-select v-model="searchForm.type" placeholder="è¯·éæ©è®¡ä»·æ¹å¼" clearable> |
| | | <el-option |
| | | v-for="item in type" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:salaryparam:create', 'business:salaryparam:delete', 'business:salaryparam:exportExcel', 'business:salaryparam:importExcel']"> |
| | | <li><el-button type="primary" @click="$refs.operaSalaryParamWindow.open('æ°å»ºç»©æå·¥èµé
ç½®')" v-permissions="['business:salaryparam:create']">æ°å»º</el-button></li> |
| | | <li><el-button type="primary" @click="deleteByIdInBatch" v-permissions="['business:salaryparam:delete']">æ¹éå é¤</el-button></li> |
| | | <li> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:salaryparam:exportExcel']" @click="exportExcel">导åº</el-button> |
| | | </li> |
| | | <li v-permissions="['business:salaryparam:importExcel']"> |
| | | <ImportButton |
| | | text="导å
¥" |
| | | template-name="salary_import_template.xlsx" |
| | | template-path="/template/salary_import_template.xlsx" |
| | | action="/business/salaryParam/importBatch" |
| | | @success="search" |
| | | /> |
| | | </li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | border |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="id" label="åºå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="type" label="计价æ¹å¼" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.type == 0 ? '计件' : '计æ¶' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="materialName" label="ç©æåç§°" min-width="140px"></el-table-column> |
| | | <el-table-column prop="materialCode" label="ç©æç¼ç " min-width="100px"></el-table-column> |
| | | <el-table-column prop="procedureName" label="å·¥åºåç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="salary" label="å·¥èµåä»·ï¼å
)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="num" label="æ å产åº" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.num == 0 ? '-' : row.num }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="times" label="æ åå·¥æ¶" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{ timesToStr(row.times) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unqualified" label="ä¸è¯åæ¯å¦è®¡å
¥" min-width="110px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.unqualified == 0 ? 'å¦' : 'æ¯' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="å建æ¶é´" min-width="150px"></el-table-column> |
| | | <el-table-column prop="createUserName" label="å建人" min-width="100px"></el-table-column> |
| | | <!-- <el-table-column prop="updateTime" label="æ´æ°æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="remark" label="夿³¨" min-width="100px"></el-table-column> |
| | | <el-table-column prop="rootDepartId" label="主ç»ç»ç¼ç ï¼å
³èdepartmentè¡¨æ ¹ç»ç»ï¼" min-width="100px"></el-table-column> |
| | | <el-table-column prop="departId" label="å·¥åç¼ç ï¼å
³èdepartment表ï¼" min-width="100px"></el-table-column> |
| | | <el-table-column prop="bomId" label="bomç¼ç ï¼å
³èbom表ï¼" min-width="100px"></el-table-column> --> |
| | | |
| | | <el-table-column |
| | | v-if="containPermissions(['business:salaryparam:update', 'business:salaryparam:delete'])" |
| | | label="æä½" |
| | | min-width="120" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaSalaryParamWindow.open('ç¼è¾ç»©æå·¥èµé
', row)" v-permissions="['business:salaryparam:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="deleteById(row)" v-permissions="['business:salaryparam:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaSalaryParamWindow ref="operaSalaryParamWindow" @success="handlePageChange"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import ImportButton from '@/components/common/ImportButton' |
| | | import OperaSalaryParamWindow from '@/components/business/OperaSalaryParamWindow' |
| | | export default { |
| | | name: 'SalaryParam', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaSalaryParamWindow, ImportButton }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | keyWord: '', |
| | | procedureName: '', |
| | | type: '' |
| | | }, |
| | | type: [ |
| | | { label: '计件', value: '0' }, |
| | | { label: '计æ¶', value: '1' }, |
| | | ] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: '设置类-绩æå·¥èµé
置表', |
| | | api: '/business/salaryParam', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | timesToStr(times) { |
| | | |
| | | if (times==0||!times) { |
| | | return '-' |
| | | } |
| | | let sec = times%60 |
| | | let lesMin = Math.floor(times/60) |
| | | let min = lesMin%60 |
| | | let hours = Math.floor(lesMin/60) |
| | | return `${hours}æ¶${min}å${sec}ç§` |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | <el-form-item label="æ¹æ¬¡å·" prop="batch"> |
| | | <el-input v-model="searchForm.batch" placeholder="请è¾å
¥" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="éå®åå·" prop="salesorder"> |
| | | <el-input v-model="searchForm.salesorder" placeholder="请è¾å
¥" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è®¡åæ¥æ" prop="planDate"> |
| | | <el-date-picker style="width: 300px;" @change="changeDate" v-model="searchForm.planDate" type="datetimerange" |
| | | value-format="yyyy-MM-dd" range-separator="è³" start-placeholder="å¼å§æ¥æ" end-placeholder="ç»ææ¥æ"> |
| | |
| | | <ImportButton |
| | | text="导å
¥" |
| | | template-name="workplans_import_template.xlsx" |
| | | template-path="template/workplans_import_template.xlsx" |
| | | template-path="/template/workplans_import_template.xlsx" |
| | | action="/business/workPlans/importBatch" |
| | | @success="search" |
| | | /> |
| | |
| | | </ul> |
| | | <el-table v-loading="isWorking.search" :data="tableData.list" border stripe @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="planCode" label="æå计åç¼ç " min-width="150px"> |
| | | <el-table-column prop="planCode" label="æå计åç¼ç " min-width="190px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.plannedProgress.open('è®¡åæ§è¡è¿åº¦', row)"> |
| | | <span class="long-title-style">{{ row.planCode }}</span> |
| | | </el-button> |
| | | <el-tag type="danger" size="mini" v-if="row.hasExpire">å»¶æ</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="materialName" label="ç©æåç§°" min-width="100px"></el-table-column> |
| | |
| | | <span v-else>-</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ä¼å
级" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | <el-table-column prop="urgent" label="ä¼å
级" min-width="80px"> |
| | | <!-- <template slot-scope="{row}"> |
| | | <span v-if="row.urgent">{{ row.urgent }}</span> |
| | | <span v-else>-</span> |
| | | </template> |
| | | </template> --> |
| | | </el-table-column> |
| | | <el-table-column label="æå" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.paused==0?'å¦':'æ¯' }} |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | |
| | |
| | | factoryId: '', |
| | | materialId: '', |
| | | batch: '', |
| | | salesorder: '', |
| | | planStatus: '', |
| | | planCode: '' |
| | | }, |
| | |
| | | @row-style="rowStyle" |
| | | > |
| | | <el-table-column type="selection" fixed="left" width="55"></el-table-column> |
| | | <el-table-column prop="id" label="计ååºå·" fixed="left" min-width="80px"></el-table-column> |
| | | <el-table-column prop="id" label="计ååºå·" fixed="left" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | <span>{{ row.id }}</span><el-tag type="danger" size="mini" v-if="row.hasExpire">å»¶æ</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="mmodel.name" fixed="left" label="ç©æåç§°" show-overflow-tooltip min-width="140px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" class="materail" @click="showPlan(row.id)"> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="mmodel.code" label="ç©æç¼ç " min-width="160px"> |
| | | </el-table-column> |
| | | <el-table-column prop="planDate" label="è®¡åæ¥æ" min-width="100px"></el-table-column> |
| | | |
| | | <el-table-column prop="fmodel.name" label="å·¥å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="pmodel.name" label="å·¥åº" show-overflow-tooltip min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span class="long-title-style">{{ row.pmodel ? row.pmodel.name : '-' }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="batch" label="çäº§æ¹æ¬¡å·" show-overflow-tooltip min-width="140px"></el-table-column> |
| | | <el-table-column prop="num" label="è®¡åæ°é" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span>{{ row.num + (row.umodel ? row.umodel.name : '') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="batch" label="çäº§æ¹æ¬¡å·" show-overflow-tooltip min-width="140px"></el-table-column> |
| | | <el-table-column prop="urgent" label="ä¼å
级" min-width="60px"></el-table-column> |
| | | <el-table-column prop="workPlanStartDate" label="计åå¼å§æ¥æ" min-width="100px"> |
| | | <!-- <template slot-scope="{row}"> |
| | | {{ row.workPlanStartDate ? row.workPlanStartDate.substring(0, row.workPlanStartDate.length-9) : '-' }} |
| | | </template> --> |
| | | </el-table-column> |
| | | <el-table-column prop="workPlanEndDate" label="计åç»ææ¥æ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.workPlanStartDate ? row.workPlanStartDate.substring(0, row.workPlanStartDate.length-9) : '-' }} |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="计åç¶æ" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | {{ statusToStr(row.status) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="计åç±»å" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | <span :style="typeColor(row.type)">{{ typeToStr(row.type) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æå" min-width="60px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.paused == 0 ? 'å¦' : 'æ¯' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="workPlanCode" label="æå计åç¼ç " min-width="140px"></el-table-column> |
| | | <el-table-column prop="distributNoDoneNum" label="å·²åé
æªæ¥å·¥æ°é" min-width="140px"> |
| | | <template slot-scope="{row}"> |
| | | <span>{{row.distributNoDoneNum ? (row.distributNoDoneNum + (row.umodel ? row.umodel.name : '')) : '-' }}</span> |
| | |
| | | <el-table-column prop="unqulifiedNum" label="ä¸è¯æ°é" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span>{{row.unqulifiedNum ? (row.unqulifiedNum + (row.umodel ? row.umodel.name : '')) : '-' }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="urgent" label="ä¼å
级" min-width="60px"></el-table-column> |
| | | <el-table-column label="æå" min-width="60px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.paused == 0 ? 'å¦' : 'æ¯' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="workPlanCode" label="主计åç¼ç " min-width="140px"></el-table-column> |
| | | <el-table-column label="ç±»å" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | <span :style="typeColor(row.type)">{{ typeToStr(row.type) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="publishDate" label="å叿¥æ" min-width="100px"> |
| | |
| | | if (index === 0) { |
| | | sums[index] = 'å计'; |
| | | return; |
| | | } else if (index === 1 || index === 8 || index === 9 || index === 16 || index === 17) { |
| | | } else if (index === 1 || index === 6 || index === 8 || index === 9 || index === 14 || index === 16 || index === 17) { |
| | | sums[index] = '-'; |
| | | return; |
| | | } else if (index === 8 ) { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout v-permissions="['ext:workorderrecordext:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" label-suffix="ï¼" inline> |
| | | <el-form-item label="ç产人å" prop="userId"> |
| | | <el-select v-model="searchForm.userId" clearable filterable placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in proUsers" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.userId"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æç¼ç " prop="mmodelCode"> |
| | | <el-input v-model="searchForm.mmodelCode" placeholder="请è¾å
¥ç©æç¼ç " @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åº" prop="procedureId"> |
| | | <el-select v-model="searchForm.procedureId" filterable clearable placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="(item, index) in procedures" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥å·¥æ¶é´"> |
| | | <el-date-picker |
| | | v-model="planDate" |
| | | type="daterange" |
| | | value-format="yyyy-MM-dd" |
| | | range-separator="~" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | @change="dateChange" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar"> |
| | | <!-- v-permissions="['ext:workorderrecordext:exportExcel']" --> |
| | | <li ><el-button type="primary" :loading="isWorking.export" @click="exportExcel">导åº</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | border |
| | | > |
| | | <el-table-column type="index" :index="customIndex" label="åºå·" fixed="left" min-width="80px"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column prop="userInfo.userName" label="ç产人å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="userInfo.departName" label="é¨é¨" min-width="100px"> </el-table-column> |
| | | <el-table-column prop="jijianSalary" label="计件工èµ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.jijianSalary / 100 }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="jishiSalary" label="计æ¶å·¥èµ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.jishiSalary / 100 }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="æ¥å·¥åæ»æ°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="totalSalary" label="å°è®¡å·¥èµ(å
)" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.totalSalary / 100 }} |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | ></pagination> |
| | | </template> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import { productesGroup } from '@/api/ext/proceduresExt' |
| | | import { companyUserExtAllUser } from '@/api/ext/companyUserExt' |
| | | export default { |
| | | name: 'WorkorderRecordExt', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | procedureId: '', |
| | | userId: '', |
| | | startDate: '', |
| | | endDate: '', |
| | | materialId: '', |
| | | }, |
| | | procedures: [ |
| | | ], |
| | | proUsers: [ |
| | | ], |
| | | |
| | | orderStatus:[ |
| | | // 0å·²å建ã1已颿ã2å·²å®å·¥æ£ã3å·²æ£éªã4å·²è¿å·¥ã5å·²å
¥åºã6å·²æåã7已忶ã8å·²å
³é |
| | | // 0å·²å建ã1已夿ã2å·²å®å·¥æ£ã3å·²æ£éªã4å·²æ¥å·¥ã5å·²å
¥åºã6已忶 |
| | | { name: 'å·²å建', id: 0 }, |
| | | { name: '已夿', id: 1 }, |
| | | { name: 'å·²å®å·¥æ£', id: 2 }, |
| | | { name: 'å·²æ£éª', id: 3 }, |
| | | { name: 'å·²æ¥å·¥', id: 4 }, |
| | | { name: '已忶', id: 6 } |
| | | ], |
| | | planDate: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'æ¥å·¥è®°å½', |
| | | api: '/ext/salaryStatistic', |
| | | 'field.id': 'id', |
| | | 'field.main': 'name', |
| | | sorts: [{ direction: 'DESC', property: 'CREATE_TIME' }] |
| | | }) |
| | | |
| | | this.search() |
| | | }, |
| | | activated() { |
| | | productesGroup({}) |
| | | .then(res => { |
| | | this.procedures = res |
| | | }) |
| | | .catch(err => { |
| | | console.log(err) |
| | | }) |
| | | companyUserExtAllUser({ departmentId: this.$store.state.userInfo.curComDepartment.id }) |
| | | .then(res => { |
| | | this.proUsers = res |
| | | }) |
| | | .catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | methods: { |
| | | dateChange (v) { |
| | | // console.log('æ¥æéæ©äº') |
| | | this.searchForm.startDate = v[0] |
| | | this.searchForm.endDate = v[1] |
| | | }, |
| | | reset () { |
| | | // console.log('rest', this.searchDate) |
| | | this.planDate = [] |
| | | this.searchForm.startDate = '' |
| | | this.searchForm.endDate = '' |
| | | this.$refs.searchForm.resetFields() |
| | | this.search() |
| | | }, |
| | | statusToStr (row) { |
| | | for (const item of this.orderStatus) { |
| | | if (item.id === row.omodel.status) { |
| | | return item.name |
| | | } |
| | | } |
| | | return '-' |
| | | }, |
| | | customIndex(index) { |
| | | console.log(); |
| | | return (this.tableData.pagination.pageIndex-1) * this.tableData.pagination.pageSize + index + 1 |
| | | } |
| | | } |
| | | } |
| | | |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout v-permissions="['ext:workorderrecordext:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" label-suffix="ï¼" inline> |
| | | <el-form-item label="ç产人å" prop="userId"> |
| | | <el-select v-model="searchForm.userId" clearable filterable placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in proUsers" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.userId"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æä¿¡æ¯" prop="materialName"> |
| | | <el-input v-model="searchForm.materialName" placeholder="请è¾å
¥ç©æåç§°/ç¼ç " @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åº" prop="procedureId"> |
| | | <el-select v-model="searchForm.procedureId" filterable clearable placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="(item, index) in procedures" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥å·¥æ¶é´"> |
| | | <el-date-picker |
| | | v-model="planDate" |
| | | type="daterange" |
| | | value-format="yyyy-MM-dd" |
| | | range-separator="~" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | @change="dateChange" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar"> |
| | | <!-- v-permissions="['ext:workorderrecordext:exportExcel']" --> |
| | | <li ><el-button type="primary" :loading="isWorking.export" @click="exportExcel">导åº</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | border |
| | | > |
| | | <el-table-column type="index" :index="customIndex" label="åºå·" fixed="left" min-width="80px"></el-table-column> |
| | | <el-table-column prop="userInfo.userName" label="ç产人å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="userInfo.departName" label="é¨é¨" min-width="100px"> </el-table-column> |
| | | <el-table-column prop="materialName" label="ç©æåç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="materialCode" label="ç©æç¼ç " min-width="140px"></el-table-column> |
| | | <el-table-column prop="procedureName" label="å·¥åºåç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="workorderCode" label="å·¥åç¼ç " min-width="150px"></el-table-column> |
| | | <el-table-column prop="unitName" label="åä½" min-width="100px"></el-table-column> |
| | | <el-table-column prop="num" label="æ¥å·¥æ°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="qualifiedNum" label="è¯åæ°" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.qualifiedNum || 0 }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unQualifiedNum" label="ä¸è¯åæ°" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.unQualifiedNum || 0 }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="rate" label="åæ ¼ç(%)" min-width="100px"></el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | ></pagination> |
| | | </template> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import { getDeviceByCondition } from '@/api/ext/deviceExt' |
| | | import { productesGroup } from '@/api/ext/proceduresExt' |
| | | import { companyUserExtAllUser } from '@/api/ext/companyUserExt' |
| | | import { addPrecision } from '@/utils/util' |
| | | export default { |
| | | name: 'WorkorderRecordExt', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | procedureId: '', |
| | | userId: '', |
| | | startDate: '', |
| | | endDate: '', |
| | | materialName: '', |
| | | }, |
| | | procedures: [ |
| | | ], |
| | | proUsers: [ |
| | | ], |
| | | |
| | | orderStatus:[ |
| | | // 0å·²å建ã1已颿ã2å·²å®å·¥æ£ã3å·²æ£éªã4å·²è¿å·¥ã5å·²å
¥åºã6å·²æåã7已忶ã8å·²å
³é |
| | | // 0å·²å建ã1已夿ã2å·²å®å·¥æ£ã3å·²æ£éªã4å·²æ¥å·¥ã5å·²å
¥åºã6已忶 |
| | | { name: 'å·²å建', id: 0 }, |
| | | { name: '已夿', id: 1 }, |
| | | { name: 'å·²å®å·¥æ£', id: 2 }, |
| | | { name: 'å·²æ£éª', id: 3 }, |
| | | { name: 'å·²æ¥å·¥', id: 4 }, |
| | | { name: '已忶', id: 6 } |
| | | ], |
| | | planDate: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'æ¥å·¥è®°å½', |
| | | api: '/ext/userSalary', |
| | | 'field.id': 'id', |
| | | 'field.main': 'name', |
| | | sorts: [{ direction: 'DESC', property: 'CREATE_TIME' }] |
| | | }) |
| | | let tempDate = new Date() |
| | | let year = tempDate.getFullYear() |
| | | let month = tempDate.getMonth() + 1 |
| | | let day = tempDate.getDate() |
| | | this.searchForm.startDate = `${year}-${month}-01` |
| | | this.searchForm.endDate = `${year}-${month}-${day}` |
| | | this.planDate = [this.searchForm.startDate, this.searchForm.endDate] |
| | | this.search() |
| | | }, |
| | | activated() { |
| | | productesGroup({}) |
| | | .then(res => { |
| | | this.procedures = res |
| | | }) |
| | | .catch(err => { |
| | | console.log(err) |
| | | }) |
| | | companyUserExtAllUser({ departmentId: this.$store.state.userInfo.curComDepartment.id }) |
| | | .then(res => { |
| | | this.proUsers = res |
| | | }) |
| | | .catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | methods: { |
| | | dateChange (v) { |
| | | // console.log('æ¥æéæ©äº') |
| | | this.searchForm.startDate = v[0] |
| | | this.searchForm.endDate = v[1] |
| | | }, |
| | | reset () { |
| | | // console.log('rest', this.searchDate) |
| | | this.planDate = [] |
| | | this.searchForm.startDate = '' |
| | | this.searchForm.endDate = '' |
| | | this.$refs.searchForm.resetFields() |
| | | this.search() |
| | | }, |
| | | statusToStr (row) { |
| | | for (const item of this.orderStatus) { |
| | | if (item.id === row.omodel.status) { |
| | | return item.name |
| | | } |
| | | } |
| | | return '-' |
| | | }, |
| | | getSummaries (param) { |
| | | const { columns, data } = param; |
| | | const sums = []; |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = 'å计'; |
| | | return; |
| | | } else if (index === 4 || index === 8 || index === 6 || index === 10) { |
| | | // || index === 8 || index === 9 || index === 16 || index === 17 |
| | | sums[index] = '-'; |
| | | return; |
| | | } |
| | | const values = data.map(item => { |
| | | if (index === 6) { |
| | | return Number(item.omodel.planNum) |
| | | } else { |
| | | return Number(item[column.property]) |
| | | } |
| | | |
| | | }); |
| | | if (!values.every(value => isNaN(value))) { |
| | | sums[index] = 0 |
| | | values.forEach(item => { |
| | | sums[index] = addPrecision(item, sums[index]) |
| | | }) |
| | | } else { |
| | | sums[index] = '-'; |
| | | } |
| | | }); |
| | | return sums |
| | | }, |
| | | customIndex(index) { |
| | | console.log(); |
| | | return (this.tableData.pagination.pageIndex-1) * this.tableData.pagination.pageSize + index + 1 |
| | | } |
| | | } |
| | | } |
| | | |
| | | </script> |
| | |
| | | status: '', |
| | | mixParam: '', |
| | | pgmodelId: '', |
| | | statusList: [0,1,2,3] |
| | | statusList: [0,1,2,3,7] |
| | | }, |
| | | origins: [], |
| | | types: [ |
| | |
| | | { name: 'å·²æ£éª', id: 3 }, |
| | | // { name: 'å·²æ¥å·¥', id: 4 }, |
| | | // { name: 'å·²å
¥åº', id: 5 }, |
| | | // { name: '已忶', id: 6 } |
| | | { name: 'ç产ä¸', id: 7 } |
| | | ], |
| | | productes: [ |
| | | ], |
| | |
| | | <span class="long-title-style">{{ row.procedureName }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="doneType" label="è´¨é屿§" min-width="100px"> |
| | | <el-table-column prop="qualifiedNum" label="åæ ¼æ°é" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.materialDonetype==0" class="valid-style">åæ ¼</span> |
| | | <span v-else-if="row.materialDonetype==1" class="unvalid-style">ä¸è¯</span> |
| | | <!-- <span v-else-if="row.doneType==2" class="scrap-style">æ¥åº</span> --> |
| | | <span v-else>-</span> |
| | | <span class="valid-style">{{ row.qualifiedNum + row.umodel.name }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="æ°é" min-width="100px"> |
| | | <el-table-column prop="unqualifiedNum" label="ä¸è¯æ°é" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span :class="row.materialDonetype==0 ? 'valid-style' : 'unvalid-style'">{{ row.num + row.umodel.name }}</span> |
| | | <span class="unvalid-style">{{ row.num + row.umodel.name}}</span> |
| | | <!-- <span :class="row.materialDonetype==0 ? 'valid-style' : ''">{{ row.num + row.umodel.name }}</span> --> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="æ¥å·¥æ°é" min-width="100px"></el-table-column> |
| | | <!-- <el-table-column prop="amodel.code" label="å·¥è£
å¨å
·" min-width="100px"></el-table-column> --> |
| | | <el-table-column prop="deviceCode" label="设å¤" show-overflow-tooltip min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="procedureName" label="ç产åå·¥" min-width="100px"></el-table-column> |
| | | <el-table-column prop="doneType" label="æ¥å·¥ç±»å" min-width="100px"> |
| | | <!-- <el-table-column prop="doneType" label="æ¥å·¥ç±»å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.doneType==0" class="valid-style">åæ ¼</span> |
| | | <span v-else-if="row.doneType==1" class="unvalid-style">ä¸è¯</span> |
| | |
| | | <template slot-scope="{row}"> |
| | | <span :class="row.doneType==0 ? 'valid-style' : (row.doneType==1 ? 'unvalid-style' : (row.doneType==2 ? 'scrap-style' : ''))">{{ row.num + row.umodel.name }}</span> |
| | | </template> |
| | | </el-table-column> --> |
| | | <el-table-column prop="qualifiedNum" label="åæ ¼æ°é" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span class="valid-style">{{ row.qualifiedNum + row.umodel.name }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unqualifiedNum" label="ä¸è¯æ°é" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span class="unvalid-style">{{ row.unqualifiedNum + row.umodel.name}}</span> |
| | | <!-- <span :class="row.materialDonetype==0 ? 'valid-style' : ''">{{ row.num + row.umodel.name }}</span> --> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="æ¥å·¥æ°é" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span>{{ row.num + row.umodel.name}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="amodel.code" label="å·¥è£
å¨å
·" min-width="100px"></el-table-column> --> |
| | | <el-table-column prop="deviceCode" label="设å¤" show-overflow-tooltip min-width="100px"> |