| | |
| | | import com.zy.asrs.mapper.LocDetlMapper; |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.utils.MatUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | //更新辅料 |
| | | Mat mat = matService.selectByMatnr(matnr); |
| | | if (mat == null) { |
| | | return false; |
| | | } |
| | | |
| | | //转换关系 |
| | | String origin = mat.getOrigin(); |
| | | String[] split = origin.split("/"); |
| | | //辅单位 |
| | | Double weight = (anfme / Double.parseDouble(split[1])) / Double.parseDouble(split[0]); |
| | | //计算辅单位 |
| | | Double weight = MatUtils.calcWeight(matnr, anfme); |
| | | return this.baseMapper.updateWeight(weight, locNo, matnr, batch, brand, standby1, standby2, standby3, boxType1, boxType2, boxType3) > 0; |
| | | } |
| | | } |