| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.jcdm.common.core.domain.R; |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService; |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:tileMatchRules:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(DaTileMatchRules daTileMatchRules) |
| | | { |
| | | public TableDataInfo list(DaTileMatchRules daTileMatchRules) { |
| | | startPage(); |
| | | List<DaTileMatchRules> list = daTileMatchRulesService.selectDaTileMatchRulesList(daTileMatchRules); |
| | | return getDataTable(list); |
| | |
| | | /** |
| | | * 曲轴配瓦 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:tileMatchRules:list')") |
| | | @GetMapping("/list2") |
| | | public TableDataInfo list2(DaTileMatchRules daTileMatchRules) |
| | | public TableDataInfo list2(DaTileMatchRules daTileMatchRules) throws Exception |
| | | { |
| | | startPage(); |
| | | List<DaTileMatchRules> list = daTileMatchRulesService.selectDaTileMatchRulesList(daTileMatchRules); |
| | | //这里取第一行的数据发送颜色信号 |
| | | if (CollUtil.isNotEmpty(list)){ |
| | | DaTileMatchRules daTileMatchRules1 = list.get(0); |
| | | String tileColor = daTileMatchRules1.getTileColor(); |
| | | //1绿色 2黑色 3红色 4蓝色 |
| | | Integer colorInt = null; |
| | | if ("#008000".equals(tileColor)){ |
| | | colorInt = 1; |
| | | } else if ("#000000".equals(tileColor)){ |
| | | colorInt = 2; |
| | | } else if ("#FF0000".equals(tileColor)){ |
| | | colorInt = 3; |
| | | } else if ("#0000FF".equals(tileColor)){ |
| | | colorInt = 4; |
| | | } |
| | | if (ObjectUtil.isNotEmpty(colorInt)){ |
| | | ReadWriteEntity entity = new ReadWriteEntity("CFL4HX.OP055.Color", colorInt); |
| | | miloService.writeToOpcByte(entity); |
| | | } |
| | | } |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | <result property="remarks" column="remarks" /> |
| | | <result property="connectingrodNo" column="connectingRod_no" /> |
| | | <result property="cylinder" column="cylinder" /> |
| | | <result property="createUser" column="create_user" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectDaTileMatchMiddlewareVo"> |
| | | select id, sfc_code, Pallet_no, crankshaft_no, state, remarks, connectingRod_no, cylinder from da_tile_match_middleware |
| | | select id, sfc_code, Pallet_no, crankshaft_no, state, remarks, connectingRod_no, cylinder, create_user, create_time, update_user, update_time from da_tile_match_middleware |
| | | </sql> |
| | | |
| | | <select id="selectDaTileMatchMiddlewareList" parameterType="DaTileMatchMiddleware" resultMap="DaTileMatchMiddlewareResult"> |
| | |
| | | <if test="remarks != null">remarks,</if> |
| | | <if test="connectingrodNo != null">connectingRod_no,</if> |
| | | <if test="cylinder != null">cylinder,</if> |
| | | <if test="createUser != null">create_user,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | |
| | | <if test="remarks != null">#{remarks},</if> |
| | | <if test="connectingrodNo != null">#{connectingrodNo},</if> |
| | | <if test="cylinder != null">#{cylinder},</if> |
| | | <if test="createUser != null">#{createUser},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="remarks != null">remarks = #{remarks},</if> |
| | | <if test="connectingrodNo != null">connectingRod_no = #{connectingrodNo},</if> |
| | | <if test="cylinder != null">cylinder = #{cylinder},</if> |
| | | <if test="createUser != null">create_user = #{createUser},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateUser != null">update_user = #{updateUser},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | }) |
| | | } |
| | | |
| | | export function listTileMatchRules2(query) { |
| | | return request({ |
| | | url: '/da/tileMatchRules/list2', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // 查询配瓦规则详细 |
| | | export function getTileMatchRules(id) { |
| | | return request({ |
| | |
| | | <script> |
| | | import VueQr from 'vue-qr' |
| | | import {setBarcode} from "@/api/main/da/tileMatchMiddleware/tileMatchMiddleware"; |
| | | import {listTileMatchRules} from "@/api/main/bs/tileMatchRules/tileMatchRules"; |
| | | import {listTileMatchRules2} from "@/api/main/bs/tileMatchRules/tileMatchRules"; |
| | | import {listTileMatchMiddleware} from "@/api/main/da/tileMatchMiddleware/tileMatchMiddleware"; |
| | | import {getSumDataMethod} from "@/api/main/bs/orderScheduling/orderScheduling"; |
| | | export default { |
| | |
| | | neckValue: this.queryParams.neckValue, |
| | | } |
| | | console.log('参数:',queryParams) |
| | | listTileMatchRules(queryParams).then(response => { |
| | | listTileMatchRules2(queryParams).then(response => { |
| | | console.log('this.queryParams',this.queryParams); |
| | | console.log('res',response) |
| | | if (response.rows.length>0){ |
| | |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | :disabled="create" |
| | | @click="CreatehandleUpdate" |
| | | >生成</el-button> |
| | | </el-col> |
| | |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | create: false, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | move: true, |
| | |
| | | console.log('this.single1111',this.single) |
| | | console.log('selecion',selection) |
| | | this.ids = selection.map(item => item.id) |
| | | const statusList = selection.map(item => item.orderStatus) |
| | | console.log('statusList',statusList) |
| | | console.log('statusList.filter( x => x !== "1").length',statusList.filter( x => x !== "1").length) |
| | | if (statusList.filter( x => x !== "1").length >0){ |
| | | this.create = true |
| | | } else { |
| | | this.create = false |
| | | } |
| | | if (selection.length >1){ |
| | | this.single = false |
| | | this.multiple = true |
| | |
| | | this.titleName = "添加生产订单"; |
| | | }, |
| | | /** 同步按钮操作 */ |
| | | CreatehandleUpdate(Row) { |
| | | CreatehandleUpdate() { |
| | | console.log('this.ids',this.ids) |
| | | if (this.ids.length === 0){ |
| | | this.$message.error('请勾选数据'); |
| | | }else { |
| | | this.initWorkshop(); |
| | | this.reset(); |
| | | const id = Row.id || this.ids |
| | | const id = this.ids |
| | | getProductionOrdes(id).then(response => { |
| | | console.log(response.data) |
| | | console.log(response.data.productCode) |
| | |
| | | this.titleName = "生成箱体条码"; |
| | | // return Array.from({ length: parseInt(this.actualQty) }, (_, index) => index + 1); |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | |
| | | }, `productionOrde_${new Date().getTime()}.xlsx`) |
| | | }, |
| | | goToPage() { |
| | | if (this.ids.length === 0){ |
| | | this.$message.error('请勾选数据'); |
| | | }else { |
| | | this.showDetailFlag=true |
| | | console.log('this.showDetailFlag',this.showDetailFlag) |
| | | //更新实际生产日期 |
| | | //updateOrderInfo(this.singleSelect) |
| | | } |
| | | |
| | | }, |
| | | } |
| | | }; |